From e1e781bb2135ef78592226f1a3eaba4925702f1f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 3 May 2021 16:38:41 -0700 Subject: :star: --- NET/worlds/scape/ASFSoundPlayer.java | 137 + NET/worlds/scape/ASFThread.java | 225 ++ NET/worlds/scape/Action.java | 163 + NET/worlds/scape/Action_Animation.java | 44 + NET/worlds/scape/Action_Motion.java | 59 + NET/worlds/scape/Action_Toggle.java | 41 + NET/worlds/scape/AddObjectAction.java | 99 + NET/worlds/scape/AdvancingAction.java | 186 ++ NET/worlds/scape/Animatable.java | 14 + NET/worlds/scape/AnimateAction.java | 262 ++ NET/worlds/scape/AnimatedAction.java | 397 +++ NET/worlds/scape/AnimatedActionCallback.java | 12 + NET/worlds/scape/AnimatedActionHandler.java | 16 + NET/worlds/scape/AnimatedActionHandlerImp.java | 49 + NET/worlds/scape/AnimatedActionManager.java | 401 +++ NET/worlds/scape/AnimatingDoor.java | 414 +++ NET/worlds/scape/Animation.java | 357 ++ NET/worlds/scape/Attribute.java | 740 +++++ NET/worlds/scape/AudibilityFilter.java | 496 +++ NET/worlds/scape/AudibleParams.java | 15 + NET/worlds/scape/BGLoaded.java | 18 + NET/worlds/scape/BackgroundLoader.java | 239 ++ NET/worlds/scape/BackgroundLoaderElement.java | 653 ++++ NET/worlds/scape/BackgroundLoaderQueue.java | 501 +++ NET/worlds/scape/BackgroundLoaderVector.java | 269 ++ NET/worlds/scape/BadFormatException.java | 35 + NET/worlds/scape/Billboard.java | 504 +++ NET/worlds/scape/BizCard.java | 161 + NET/worlds/scape/BooleanFieldEditorDialog.java | 46 + NET/worlds/scape/BooleanPropertyEditor.java | 76 + NET/worlds/scape/BoundBoxTemp.java | 130 + NET/worlds/scape/BoxBumpCalc.java | 128 + NET/worlds/scape/BuildRamp.java | 365 +++ NET/worlds/scape/BuildStairs.java | 302 ++ NET/worlds/scape/BumpAttribute.java | 89 + NET/worlds/scape/BumpCalc.java | 39 + NET/worlds/scape/BumpEventTemp.java | 396 +++ NET/worlds/scape/BumpHandler.java | 12 + NET/worlds/scape/BumpSensor.java | 43 + NET/worlds/scape/CDAudio.java | 597 ++++ NET/worlds/scape/CDControl.java | 112 + NET/worlds/scape/CDDBConnection.java | 465 +++ NET/worlds/scape/CDDBHash.java | 88 + NET/worlds/scape/CDDBHost.java | 397 +++ NET/worlds/scape/CDDBLookup.java | 381 +++ NET/worlds/scape/CDDBStatus.java | 60 + NET/worlds/scape/CDDiskInfo.java | 86 + NET/worlds/scape/CDPlayerAction.java | 336 ++ NET/worlds/scape/CDPositionEditorDialog.java | 55 + NET/worlds/scape/CDPositionPropertyEditor.java | 104 + NET/worlds/scape/CDTrackInfo.java | 85 + NET/worlds/scape/CallbackPropertyOperator.java | 64 + NET/worlds/scape/Camera.java | 616 ++++ NET/worlds/scape/CameraHeightAction.java | 116 + NET/worlds/scape/ChangeAvatarDialog.java | 81 + NET/worlds/scape/ChangeAvatarImageButtons.java | 121 + NET/worlds/scape/CheckboxEditorDialog.java | 83 + NET/worlds/scape/ClassProperty.java | 27 + NET/worlds/scape/ClickEventHandler.java | 20 + NET/worlds/scape/ClickSensor.java | 664 ++++ NET/worlds/scape/ClickWidget.java | 37 + NET/worlds/scape/ClipboardEntry.java | 67 + NET/worlds/scape/ColorAttribute.java | 111 + NET/worlds/scape/ColorEditorDialog.java | 84 + NET/worlds/scape/ColorPropertyEditor.java | 102 + NET/worlds/scape/CopyWidget.java | 36 + NET/worlds/scape/CrashAction.java | 78 + NET/worlds/scape/CutWidget.java | 36 + NET/worlds/scape/DPAction.java | 386 +++ NET/worlds/scape/DPLoadTracker.java | 119 + NET/worlds/scape/DPState.java | 221 ++ NET/worlds/scape/DeepEnumeration.java | 193 ++ NET/worlds/scape/DialogAction.java | 171 + NET/worlds/scape/DiffRoomSensor.java | 87 + NET/worlds/scape/DirectShow.java | 59 + NET/worlds/scape/DiskShadow.java | 115 + NET/worlds/scape/DispenserAction.java | 158 + NET/worlds/scape/DoorBasedFilter.java | 351 ++ NET/worlds/scape/DoorBasedParams.java | 18 + NET/worlds/scape/Drone.java | 1289 ++++++++ NET/worlds/scape/DroneAnimator.java | 175 + NET/worlds/scape/DroneLoader.java | 155 + NET/worlds/scape/DropInfo.java | 724 ++++ NET/worlds/scape/DynamicForwardAttribute.java | 308 ++ NET/worlds/scape/EditMusicDialog.java | 792 +++++ NET/worlds/scape/EditRoomDialog.java | 903 +++++ NET/worlds/scape/EditTile.java | 709 ++++ NET/worlds/scape/EnumFieldEditorDialog.java | 47 + NET/worlds/scape/EnumProperties.java | 50 + NET/worlds/scape/EnumPropertyEditor.java | 104 + NET/worlds/scape/EquipAction.java | 78 + NET/worlds/scape/EquippableItem.java | 182 ++ NET/worlds/scape/Event.java | 130 + NET/worlds/scape/EventQueue.java | 220 ++ NET/worlds/scape/ExtensionFilter.java | 38 + NET/worlds/scape/Facer.java | 31 + NET/worlds/scape/FieldEditorDialog.java | 69 + NET/worlds/scape/FieldWithListEditorDialog.java | 105 + NET/worlds/scape/FileList.java | 144 + NET/worlds/scape/FileTexture.java | 112 + NET/worlds/scape/FileTextureDecoder.java | 154 + NET/worlds/scape/FloatArrayEditorDialog.java | 70 + NET/worlds/scape/FloatArrayPropertyEditor.java | 88 + NET/worlds/scape/FloatFieldEditorDialog.java | 60 + NET/worlds/scape/FloatPropertyEditor.java | 97 + NET/worlds/scape/FloorPatch.java | 16 + NET/worlds/scape/ForwardAttribute.java | 115 + NET/worlds/scape/FrameEvent.java | 113 + NET/worlds/scape/FrameHandler.java | 12 + NET/worlds/scape/FrameSensor.java | 45 + NET/worlds/scape/GravityAction.java | 241 ++ NET/worlds/scape/HTransWidget.java | 44 + NET/worlds/scape/Handler.java | 12 + NET/worlds/scape/HandsOffDriver.java | 251 ++ NET/worlds/scape/HighJump.java | 97 + NET/worlds/scape/HoloCallback.java | 12 + NET/worlds/scape/HoloDrone.java | 444 +++ NET/worlds/scape/HoloPilot.java | 956 ++++++ NET/worlds/scape/Hologram.java | 842 +++++ NET/worlds/scape/HorizontalRect.java | 86 + NET/worlds/scape/Iconic.java | 16 + NET/worlds/scape/ImageConverter.java | 186 ++ NET/worlds/scape/IncrementalRestorer.java | 13 + NET/worlds/scape/IndentStream.java | 138 + NET/worlds/scape/IntegerFieldEditorDialog.java | 60 + NET/worlds/scape/IntegerPropertyEditor.java | 97 + NET/worlds/scape/InterpolatedDrone.java | 298 ++ NET/worlds/scape/InventoryAction.java | 49 + NET/worlds/scape/InventoryAvatar.java | 32 + NET/worlds/scape/InventoryCallback.java | 12 + NET/worlds/scape/InventoryDialog.java | 434 +++ NET/worlds/scape/InventoryItem.java | 89 + NET/worlds/scape/InventoryList.java | 474 +++ NET/worlds/scape/InventoryManager.java | 435 +++ NET/worlds/scape/ItemNotAvailableDialog.java | 62 + NET/worlds/scape/Key.java | 60 + NET/worlds/scape/KeyCharEvent.java | 44 + NET/worlds/scape/KeyCharHandler.java | 12 + NET/worlds/scape/KeyDownEvent.java | 43 + NET/worlds/scape/KeyDownHandler.java | 12 + NET/worlds/scape/KeyEvent.java | 60 + NET/worlds/scape/KeyHandler.java | 12 + NET/worlds/scape/KeyUpEvent.java | 43 + NET/worlds/scape/KeyUpHandler.java | 12 + NET/worlds/scape/LibEntContentEditorDialog.java | 170 + NET/worlds/scape/LibEntContentPropertyEditor.java | 188 ++ NET/worlds/scape/LibEventHandler.java | 12 + NET/worlds/scape/LibrariesTile.java | 406 +++ NET/worlds/scape/Library.java | 216 ++ NET/worlds/scape/LibraryDrop.java | 12 + NET/worlds/scape/LibraryDropTarget.java | 9 + NET/worlds/scape/LibraryEntry.java | 151 + NET/worlds/scape/Light.java | 100 + NET/worlds/scape/ListAdderDialog.java | 118 + NET/worlds/scape/ListChooserDialog.java | 83 + NET/worlds/scape/ListEditorDialog.java | 53 + NET/worlds/scape/LoadedAttribute.java | 12 + NET/worlds/scape/LoadedURLSelf.java | 14 + NET/worlds/scape/MCISoundCommand.java | 212 ++ NET/worlds/scape/MCISoundPlayer.java | 211 ++ NET/worlds/scape/MCIThread.java | 259 ++ NET/worlds/scape/Manifest.java | 126 + NET/worlds/scape/Material.java | 1053 ++++++ NET/worlds/scape/MaterialTexture.java | 1238 +++++++ NET/worlds/scape/MaybeNullDialog.java | 46 + NET/worlds/scape/MaybeNullPropertyEditor.java | 68 + NET/worlds/scape/MetaEnumeration.java | 74 + NET/worlds/scape/Mirror.java | 91 + NET/worlds/scape/MomentumBehavior.java | 14 + NET/worlds/scape/MontyDoor.java | 255 ++ NET/worlds/scape/MoreInfoDialog.java | 75 + NET/worlds/scape/Motion.java | 484 +++ NET/worlds/scape/MouseButtonEvent.java | 46 + NET/worlds/scape/MouseButtonHandler.java | 12 + NET/worlds/scape/MouseDeltaEvent.java | 54 + NET/worlds/scape/MouseDeltaHandler.java | 12 + NET/worlds/scape/MouseDownEvent.java | 55 + NET/worlds/scape/MouseDownHandler.java | 12 + NET/worlds/scape/MouseDragEvent.java | 43 + NET/worlds/scape/MouseDragHandler.java | 12 + NET/worlds/scape/MouseEnterEvent.java | 41 + NET/worlds/scape/MouseEnterHandler.java | 12 + NET/worlds/scape/MouseEvent.java | 46 + NET/worlds/scape/MouseExitEvent.java | 41 + NET/worlds/scape/MouseExitHandler.java | 12 + NET/worlds/scape/MouseHandler.java | 12 + NET/worlds/scape/MouseMoveEvent.java | 43 + NET/worlds/scape/MouseMoveHandler.java | 12 + NET/worlds/scape/MousePositionEvent.java | 44 + NET/worlds/scape/MousePositionHandler.java | 12 + NET/worlds/scape/MouseUpEvent.java | 49 + NET/worlds/scape/MouseUpHandler.java | 12 + NET/worlds/scape/MoveAction.java | 622 ++++ NET/worlds/scape/MoveCameraAction.java | 127 + NET/worlds/scape/MultiManifestAction.java | 144 + NET/worlds/scape/MultiMotion.java | 698 ++++ NET/worlds/scape/MusicManager.java | 560 ++++ NET/worlds/scape/MusicManagerDialog.java | 646 ++++ NET/worlds/scape/MusicRoom.java | 984 ++++++ NET/worlds/scape/MusicTrack.java | 954 ++++++ NET/worlds/scape/MutedDrone.java | 82 + NET/worlds/scape/MyButton.java | 50 + NET/worlds/scape/NamedPortal.java | 83 + NET/worlds/scape/NametagDrone.java | 101 + NET/worlds/scape/NoSuchPropertyException.java | 13 + NET/worlds/scape/NonPersister.java | 9 + NET/worlds/scape/NotifyScriptAction.java | 79 + NET/worlds/scape/NumberAttribute.java | 120 + NET/worlds/scape/ObjEditorDialog.java | 45 + NET/worlds/scape/ObjPropertyEditor.java | 98 + NET/worlds/scape/ObjectAdderDialog.java | 58 + NET/worlds/scape/ObjectPropertyAdder.java | 124 + NET/worlds/scape/ObjectSelectorDialog.java | 152 + NET/worlds/scape/OpenURLAction.java | 174 + NET/worlds/scape/ParallelAction.java | 226 ++ NET/worlds/scape/PassthroughBumpCalc.java | 67 + NET/worlds/scape/PasteWidget.java | 36 + NET/worlds/scape/PathMoveAction.java | 50 + NET/worlds/scape/PendingCacheDrone.java | 132 + NET/worlds/scape/PendingDrone.java | 562 ++++ NET/worlds/scape/PeriodicTimeSensor.java | 131 + NET/worlds/scape/Persister.java | 20 + NET/worlds/scape/PickEvent.java | 41 + NET/worlds/scape/PickHandler.java | 12 + NET/worlds/scape/PickUpAction.java | 72 + NET/worlds/scape/Pilot.java | 1497 +++++++++ NET/worlds/scape/PitchDriver.java | 293 ++ NET/worlds/scape/PitchWidget.java | 38 + NET/worlds/scape/PlaneBumpCalc.java | 146 + NET/worlds/scape/PlaybackRecordingAction.java | 80 + NET/worlds/scape/Point2.java | 195 ++ NET/worlds/scape/Point2EditorDialog.java | 85 + NET/worlds/scape/Point2PropertyEditor.java | 103 + NET/worlds/scape/Point3.java | 77 + NET/worlds/scape/Point3EditorDialog.java | 95 + NET/worlds/scape/Point3PropertyEditor.java | 113 + NET/worlds/scape/Point3Temp.java | 298 ++ NET/worlds/scape/Polygon.java | 143 + NET/worlds/scape/Portal.java | 1334 ++++++++ NET/worlds/scape/PosableAction.java | 102 + NET/worlds/scape/PosableDrone.java | 327 ++ NET/worlds/scape/PosableDroneLoader.java | 261 ++ NET/worlds/scape/PosableShape.java | 2679 +++++++++++++++ NET/worlds/scape/Postrenderable.java | 12 + NET/worlds/scape/PostspinBehavior.java | 141 + NET/worlds/scape/Prerenderable.java | 12 + NET/worlds/scape/PrintAction.java | 116 + NET/worlds/scape/ProgressiveAdder.java | 76 + NET/worlds/scape/PropAdder.java | 120 + NET/worlds/scape/PropEditor.java | 51 + NET/worlds/scape/PropList.java | 150 + NET/worlds/scape/PropPropEditor.java | 110 + NET/worlds/scape/PropPropEditorDialog.java | 79 + NET/worlds/scape/PropTreeNode.java | 175 + NET/worlds/scape/Properties.java | 22 + NET/worlds/scape/Property.java | 286 ++ NET/worlds/scape/ProximitySensor.java | 212 ++ NET/worlds/scape/RPAction.java | 39 + NET/worlds/scape/Rect.java | 703 ++++ NET/worlds/scape/RectPatch.java | 534 +++ NET/worlds/scape/Recycler.java | 154 + NET/worlds/scape/RelativeMoveAction.java | 301 ++ NET/worlds/scape/RemotePortal.java | 132 + NET/worlds/scape/RemoveObjectAction.java | 91 + NET/worlds/scape/RenderWare.java | 14 + NET/worlds/scape/Restorer.java | 678 ++++ NET/worlds/scape/RollBehavior.java | 123 + NET/worlds/scape/RollWidget.java | 41 + NET/worlds/scape/RollingAttribute.java | 301 ++ NET/worlds/scape/Room.java | 1542 +++++++++ NET/worlds/scape/RoomEnvironment.java | 202 ++ NET/worlds/scape/RoomSubscribeInfo.java | 32 + NET/worlds/scape/RunningActionCallback.java | 12 + NET/worlds/scape/RunningActionHandler.java | 238 ++ NET/worlds/scape/SameRoomSensor.java | 106 + NET/worlds/scape/SaveWidget.java | 52 + NET/worlds/scape/Saver.java | 376 +++ NET/worlds/scape/ScaleWidget.java | 45 + NET/worlds/scape/ScapePicMovie.java | 263 ++ NET/worlds/scape/ScapePicTexture.java | 163 + NET/worlds/scape/ScapePicTextureDecoder.java | 196 ++ NET/worlds/scape/ScrollingImagePanel.java | 457 +++ NET/worlds/scape/ScrollingListElement.java | 473 +++ NET/worlds/scape/SelectAvatarAction.java | 223 ++ NET/worlds/scape/SendURLAction.java | 637 ++++ NET/worlds/scape/Sensor.java | 208 ++ NET/worlds/scape/SensorFrameHandler.java | 228 ++ NET/worlds/scape/SeqFile.java | 44 + NET/worlds/scape/SequenceAction.java | 210 ++ NET/worlds/scape/SequenceActionState.java | 314 ++ NET/worlds/scape/SetBooleanAction.java | 75 + NET/worlds/scape/SetColorAction.java | 131 + NET/worlds/scape/SetFloatAction.java | 100 + NET/worlds/scape/SetIntegerAction.java | 100 + NET/worlds/scape/SetPoint2Action.java | 134 + NET/worlds/scape/SetPoint3Action.java | 143 + NET/worlds/scape/SetPropertyAction.java | 385 +++ NET/worlds/scape/SetStringAction.java | 74 + NET/worlds/scape/SetURLAction.java | 91 + NET/worlds/scape/SetVisibleBumpableAction.java | 109 + NET/worlds/scape/SetZoomMode.java | 94 + NET/worlds/scape/Shadow.java | 12 + NET/worlds/scape/ShallowEnumeration.java | 72 + NET/worlds/scape/Shape.java | 1508 +++++++++ NET/worlds/scape/ShapeLoader.java | 182 ++ NET/worlds/scape/ShapeLoaderListener.java | 12 + NET/worlds/scape/ShapeTextureLoader.java | 233 ++ NET/worlds/scape/Sharer.java | 1089 ++++++ NET/worlds/scape/SlidePropertyAction.java | 95 + NET/worlds/scape/SmoothDriver.java | 684 ++++ NET/worlds/scape/Sound.java | 940 ++++++ NET/worlds/scape/SoundCallback.java | 962 ++++++ NET/worlds/scape/SoundPlayer.java | 65 + NET/worlds/scape/SoundResource.java | 167 + NET/worlds/scape/SoundState.java | 411 +++ NET/worlds/scape/SpinBehavior.java | 152 + NET/worlds/scape/StandardTexture.java | 79 + NET/worlds/scape/StandardTextureDecoder.java | 175 + NET/worlds/scape/StartupSensor.java | 77 + NET/worlds/scape/State.java | 12 + NET/worlds/scape/StateContext.java | 12 + NET/worlds/scape/StdoutAction.java | 143 + NET/worlds/scape/StopRecordingAction.java | 52 + NET/worlds/scape/StringAttribute.java | 111 + NET/worlds/scape/StringFieldEditorDialog.java | 53 + NET/worlds/scape/StringPropertyEditor.java | 71 + NET/worlds/scape/StringTexture.java | 119 + NET/worlds/scape/SubclumpShape.java | 81 + NET/worlds/scape/SuperRoot.java | 742 +++++ NET/worlds/scape/Surface.java | 290 ++ NET/worlds/scape/SwitchableBehavior.java | 90 + NET/worlds/scape/TCompressor.java | 647 ++++ NET/worlds/scape/TabbedDisplayPanel.java | 429 +++ NET/worlds/scape/TabbedPanel.java | 329 ++ NET/worlds/scape/TalkAction.java | 109 + NET/worlds/scape/Teleport.java | 149 + NET/worlds/scape/TeleportAction.java | 761 +++++ NET/worlds/scape/TeleportDialog.java | 67 + NET/worlds/scape/TeleportStatus.java | 12 + NET/worlds/scape/Texture.java | 162 + NET/worlds/scape/TextureDecoder.java | 133 + NET/worlds/scape/TextureSurface.java | 104 + NET/worlds/scape/TextureSurfaceRenderer.java | 12 + NET/worlds/scape/Toggle.java | 209 ++ NET/worlds/scape/ToggleZoomMode.java | 48 + NET/worlds/scape/TooNewException.java | 37 + NET/worlds/scape/ToolBar.java | 265 ++ NET/worlds/scape/ToolTipManager.java | 143 + NET/worlds/scape/TradeAction.java | 172 + NET/worlds/scape/TrajectoryBehavior.java | 446 +++ NET/worlds/scape/TransAttribute.java | 305 ++ NET/worlds/scape/Transform.java | 602 ++++ NET/worlds/scape/TransformEditorDialog.java | 367 +++ NET/worlds/scape/TransformPropertyEditor.java | 382 +++ NET/worlds/scape/Trigger.java | 323 ++ NET/worlds/scape/TriggeredSwitchableBehavior.java | 25 + NET/worlds/scape/TwoWayPortal.java | 99 + NET/worlds/scape/URLEditorDialog.java | 89 + NET/worlds/scape/URLPropertyEditor.java | 177 + NET/worlds/scape/URLSelf.java | 21 + NET/worlds/scape/URLSelfLoader.java | 300 ++ NET/worlds/scape/UndoStack.java | 66 + NET/worlds/scape/UndoWidget.java | 35 + NET/worlds/scape/UndoabCopy.java | 31 + NET/worlds/scape/UndoablAdd.java | 40 + NET/worlds/scape/UndoablCut.java | 42 + NET/worlds/scape/UndoablDelete.java | 35 + NET/worlds/scape/UndoablPaste.java | 34 + NET/worlds/scape/UndoablSet.java | 33 + NET/worlds/scape/UndoablTransform.java | 30 + NET/worlds/scape/Undoable.java | 12 + NET/worlds/scape/UniqueHasher.java | 41 + NET/worlds/scape/UnitEnumeration.java | 47 + NET/worlds/scape/UniverseHandler.java | 76 + NET/worlds/scape/UserEvent.java | 48 + NET/worlds/scape/UserHandler.java | 12 + NET/worlds/scape/VTransWidget.java | 42 + NET/worlds/scape/ValueEvent.java | 46 + NET/worlds/scape/ValueHandler.java | 12 + NET/worlds/scape/VectorProperty.java | 96 + NET/worlds/scape/VehicleDriver.java | 1086 ++++++ NET/worlds/scape/VehicleShape.java | 660 ++++ NET/worlds/scape/VelocityBehavior.java | 399 +++ NET/worlds/scape/VideoControlAction.java | 158 + NET/worlds/scape/VideoManager.java | 52 + NET/worlds/scape/VideoSurface.java | 75 + NET/worlds/scape/VideoTexture.java | 294 ++ NET/worlds/scape/VideoWall.java | 263 ++ NET/worlds/scape/VisiAttribute.java | 91 + NET/worlds/scape/WMPSoundPlayer.java | 92 + NET/worlds/scape/WObject.java | 3633 +++++++++++++++++++++ NET/worlds/scape/WObjectHighlighter.java | 323 ++ NET/worlds/scape/WaitAction.java | 145 + NET/worlds/scape/WaitActionState.java | 198 ++ NET/worlds/scape/WavSoundPlayer.java | 402 +++ NET/worlds/scape/WavSoundTerminator.java | 410 +++ NET/worlds/scape/WearAction.java | 450 +++ NET/worlds/scape/WearWall.java | 358 ++ NET/worlds/scape/WebPageWall.java | 498 +++ NET/worlds/scape/WebWallControlAction.java | 180 + NET/worlds/scape/Whiteboard.java | 146 + NET/worlds/scape/WidgetButton.java | 163 + NET/worlds/scape/WobClassLoader.java | 144 + NET/worlds/scape/WobLoaded.java | 12 + NET/worlds/scape/WobLoader.java | 145 + NET/worlds/scape/World.java | 1650 ++++++++++ NET/worlds/scape/WorldRedirector.java | 120 + NET/worlds/scape/WorldScript.java | 97 + NET/worlds/scape/WorldScriptLoader.java | 276 ++ NET/worlds/scape/WorldScriptManager.java | 192 ++ NET/worlds/scape/WorldScriptToolkit.java | 204 ++ NET/worlds/scape/WorldScriptToolkitImp.java | 493 +++ NET/worlds/scape/WorldValidator.java | 119 + NET/worlds/scape/WrRamp.java | 246 ++ NET/worlds/scape/WrRectPatch.java | 40 + NET/worlds/scape/WrStaircase.java | 211 ++ NET/worlds/scape/WrVisiRectPatch.java | 68 + NET/worlds/scape/YawWidget.java | 41 + NET/worlds/scape/sendURL.java | 203 ++ 419 files changed, 92263 insertions(+) create mode 100644 NET/worlds/scape/ASFSoundPlayer.java create mode 100644 NET/worlds/scape/ASFThread.java create mode 100644 NET/worlds/scape/Action.java create mode 100644 NET/worlds/scape/Action_Animation.java create mode 100644 NET/worlds/scape/Action_Motion.java create mode 100644 NET/worlds/scape/Action_Toggle.java create mode 100644 NET/worlds/scape/AddObjectAction.java create mode 100644 NET/worlds/scape/AdvancingAction.java create mode 100644 NET/worlds/scape/Animatable.java create mode 100644 NET/worlds/scape/AnimateAction.java create mode 100644 NET/worlds/scape/AnimatedAction.java create mode 100644 NET/worlds/scape/AnimatedActionCallback.java create mode 100644 NET/worlds/scape/AnimatedActionHandler.java create mode 100644 NET/worlds/scape/AnimatedActionHandlerImp.java create mode 100644 NET/worlds/scape/AnimatedActionManager.java create mode 100644 NET/worlds/scape/AnimatingDoor.java create mode 100644 NET/worlds/scape/Animation.java create mode 100644 NET/worlds/scape/Attribute.java create mode 100644 NET/worlds/scape/AudibilityFilter.java create mode 100644 NET/worlds/scape/AudibleParams.java create mode 100644 NET/worlds/scape/BGLoaded.java create mode 100644 NET/worlds/scape/BackgroundLoader.java create mode 100644 NET/worlds/scape/BackgroundLoaderElement.java create mode 100644 NET/worlds/scape/BackgroundLoaderQueue.java create mode 100644 NET/worlds/scape/BackgroundLoaderVector.java create mode 100644 NET/worlds/scape/BadFormatException.java create mode 100644 NET/worlds/scape/Billboard.java create mode 100644 NET/worlds/scape/BizCard.java create mode 100644 NET/worlds/scape/BooleanFieldEditorDialog.java create mode 100644 NET/worlds/scape/BooleanPropertyEditor.java create mode 100644 NET/worlds/scape/BoundBoxTemp.java create mode 100644 NET/worlds/scape/BoxBumpCalc.java create mode 100644 NET/worlds/scape/BuildRamp.java create mode 100644 NET/worlds/scape/BuildStairs.java create mode 100644 NET/worlds/scape/BumpAttribute.java create mode 100644 NET/worlds/scape/BumpCalc.java create mode 100644 NET/worlds/scape/BumpEventTemp.java create mode 100644 NET/worlds/scape/BumpHandler.java create mode 100644 NET/worlds/scape/BumpSensor.java create mode 100644 NET/worlds/scape/CDAudio.java create mode 100644 NET/worlds/scape/CDControl.java create mode 100644 NET/worlds/scape/CDDBConnection.java create mode 100644 NET/worlds/scape/CDDBHash.java create mode 100644 NET/worlds/scape/CDDBHost.java create mode 100644 NET/worlds/scape/CDDBLookup.java create mode 100644 NET/worlds/scape/CDDBStatus.java create mode 100644 NET/worlds/scape/CDDiskInfo.java create mode 100644 NET/worlds/scape/CDPlayerAction.java create mode 100644 NET/worlds/scape/CDPositionEditorDialog.java create mode 100644 NET/worlds/scape/CDPositionPropertyEditor.java create mode 100644 NET/worlds/scape/CDTrackInfo.java create mode 100644 NET/worlds/scape/CallbackPropertyOperator.java create mode 100644 NET/worlds/scape/Camera.java create mode 100644 NET/worlds/scape/CameraHeightAction.java create mode 100644 NET/worlds/scape/ChangeAvatarDialog.java create mode 100644 NET/worlds/scape/ChangeAvatarImageButtons.java create mode 100644 NET/worlds/scape/CheckboxEditorDialog.java create mode 100644 NET/worlds/scape/ClassProperty.java create mode 100644 NET/worlds/scape/ClickEventHandler.java create mode 100644 NET/worlds/scape/ClickSensor.java create mode 100644 NET/worlds/scape/ClickWidget.java create mode 100644 NET/worlds/scape/ClipboardEntry.java create mode 100644 NET/worlds/scape/ColorAttribute.java create mode 100644 NET/worlds/scape/ColorEditorDialog.java create mode 100644 NET/worlds/scape/ColorPropertyEditor.java create mode 100644 NET/worlds/scape/CopyWidget.java create mode 100644 NET/worlds/scape/CrashAction.java create mode 100644 NET/worlds/scape/CutWidget.java create mode 100644 NET/worlds/scape/DPAction.java create mode 100644 NET/worlds/scape/DPLoadTracker.java create mode 100644 NET/worlds/scape/DPState.java create mode 100644 NET/worlds/scape/DeepEnumeration.java create mode 100644 NET/worlds/scape/DialogAction.java create mode 100644 NET/worlds/scape/DiffRoomSensor.java create mode 100644 NET/worlds/scape/DirectShow.java create mode 100644 NET/worlds/scape/DiskShadow.java create mode 100644 NET/worlds/scape/DispenserAction.java create mode 100644 NET/worlds/scape/DoorBasedFilter.java create mode 100644 NET/worlds/scape/DoorBasedParams.java create mode 100644 NET/worlds/scape/Drone.java create mode 100644 NET/worlds/scape/DroneAnimator.java create mode 100644 NET/worlds/scape/DroneLoader.java create mode 100644 NET/worlds/scape/DropInfo.java create mode 100644 NET/worlds/scape/DynamicForwardAttribute.java create mode 100644 NET/worlds/scape/EditMusicDialog.java create mode 100644 NET/worlds/scape/EditRoomDialog.java create mode 100644 NET/worlds/scape/EditTile.java create mode 100644 NET/worlds/scape/EnumFieldEditorDialog.java create mode 100644 NET/worlds/scape/EnumProperties.java create mode 100644 NET/worlds/scape/EnumPropertyEditor.java create mode 100644 NET/worlds/scape/EquipAction.java create mode 100644 NET/worlds/scape/EquippableItem.java create mode 100644 NET/worlds/scape/Event.java create mode 100644 NET/worlds/scape/EventQueue.java create mode 100644 NET/worlds/scape/ExtensionFilter.java create mode 100644 NET/worlds/scape/Facer.java create mode 100644 NET/worlds/scape/FieldEditorDialog.java create mode 100644 NET/worlds/scape/FieldWithListEditorDialog.java create mode 100644 NET/worlds/scape/FileList.java create mode 100644 NET/worlds/scape/FileTexture.java create mode 100644 NET/worlds/scape/FileTextureDecoder.java create mode 100644 NET/worlds/scape/FloatArrayEditorDialog.java create mode 100644 NET/worlds/scape/FloatArrayPropertyEditor.java create mode 100644 NET/worlds/scape/FloatFieldEditorDialog.java create mode 100644 NET/worlds/scape/FloatPropertyEditor.java create mode 100644 NET/worlds/scape/FloorPatch.java create mode 100644 NET/worlds/scape/ForwardAttribute.java create mode 100644 NET/worlds/scape/FrameEvent.java create mode 100644 NET/worlds/scape/FrameHandler.java create mode 100644 NET/worlds/scape/FrameSensor.java create mode 100644 NET/worlds/scape/GravityAction.java create mode 100644 NET/worlds/scape/HTransWidget.java create mode 100644 NET/worlds/scape/Handler.java create mode 100644 NET/worlds/scape/HandsOffDriver.java create mode 100644 NET/worlds/scape/HighJump.java create mode 100644 NET/worlds/scape/HoloCallback.java create mode 100644 NET/worlds/scape/HoloDrone.java create mode 100644 NET/worlds/scape/HoloPilot.java create mode 100644 NET/worlds/scape/Hologram.java create mode 100644 NET/worlds/scape/HorizontalRect.java create mode 100644 NET/worlds/scape/Iconic.java create mode 100644 NET/worlds/scape/ImageConverter.java create mode 100644 NET/worlds/scape/IncrementalRestorer.java create mode 100644 NET/worlds/scape/IndentStream.java create mode 100644 NET/worlds/scape/IntegerFieldEditorDialog.java create mode 100644 NET/worlds/scape/IntegerPropertyEditor.java create mode 100644 NET/worlds/scape/InterpolatedDrone.java create mode 100644 NET/worlds/scape/InventoryAction.java create mode 100644 NET/worlds/scape/InventoryAvatar.java create mode 100644 NET/worlds/scape/InventoryCallback.java create mode 100644 NET/worlds/scape/InventoryDialog.java create mode 100644 NET/worlds/scape/InventoryItem.java create mode 100644 NET/worlds/scape/InventoryList.java create mode 100644 NET/worlds/scape/InventoryManager.java create mode 100644 NET/worlds/scape/ItemNotAvailableDialog.java create mode 100644 NET/worlds/scape/Key.java create mode 100644 NET/worlds/scape/KeyCharEvent.java create mode 100644 NET/worlds/scape/KeyCharHandler.java create mode 100644 NET/worlds/scape/KeyDownEvent.java create mode 100644 NET/worlds/scape/KeyDownHandler.java create mode 100644 NET/worlds/scape/KeyEvent.java create mode 100644 NET/worlds/scape/KeyHandler.java create mode 100644 NET/worlds/scape/KeyUpEvent.java create mode 100644 NET/worlds/scape/KeyUpHandler.java create mode 100644 NET/worlds/scape/LibEntContentEditorDialog.java create mode 100644 NET/worlds/scape/LibEntContentPropertyEditor.java create mode 100644 NET/worlds/scape/LibEventHandler.java create mode 100644 NET/worlds/scape/LibrariesTile.java create mode 100644 NET/worlds/scape/Library.java create mode 100644 NET/worlds/scape/LibraryDrop.java create mode 100644 NET/worlds/scape/LibraryDropTarget.java create mode 100644 NET/worlds/scape/LibraryEntry.java create mode 100644 NET/worlds/scape/Light.java create mode 100644 NET/worlds/scape/ListAdderDialog.java create mode 100644 NET/worlds/scape/ListChooserDialog.java create mode 100644 NET/worlds/scape/ListEditorDialog.java create mode 100644 NET/worlds/scape/LoadedAttribute.java create mode 100644 NET/worlds/scape/LoadedURLSelf.java create mode 100644 NET/worlds/scape/MCISoundCommand.java create mode 100644 NET/worlds/scape/MCISoundPlayer.java create mode 100644 NET/worlds/scape/MCIThread.java create mode 100644 NET/worlds/scape/Manifest.java create mode 100644 NET/worlds/scape/Material.java create mode 100644 NET/worlds/scape/MaterialTexture.java create mode 100644 NET/worlds/scape/MaybeNullDialog.java create mode 100644 NET/worlds/scape/MaybeNullPropertyEditor.java create mode 100644 NET/worlds/scape/MetaEnumeration.java create mode 100644 NET/worlds/scape/Mirror.java create mode 100644 NET/worlds/scape/MomentumBehavior.java create mode 100644 NET/worlds/scape/MontyDoor.java create mode 100644 NET/worlds/scape/MoreInfoDialog.java create mode 100644 NET/worlds/scape/Motion.java create mode 100644 NET/worlds/scape/MouseButtonEvent.java create mode 100644 NET/worlds/scape/MouseButtonHandler.java create mode 100644 NET/worlds/scape/MouseDeltaEvent.java create mode 100644 NET/worlds/scape/MouseDeltaHandler.java create mode 100644 NET/worlds/scape/MouseDownEvent.java create mode 100644 NET/worlds/scape/MouseDownHandler.java create mode 100644 NET/worlds/scape/MouseDragEvent.java create mode 100644 NET/worlds/scape/MouseDragHandler.java create mode 100644 NET/worlds/scape/MouseEnterEvent.java create mode 100644 NET/worlds/scape/MouseEnterHandler.java create mode 100644 NET/worlds/scape/MouseEvent.java create mode 100644 NET/worlds/scape/MouseExitEvent.java create mode 100644 NET/worlds/scape/MouseExitHandler.java create mode 100644 NET/worlds/scape/MouseHandler.java create mode 100644 NET/worlds/scape/MouseMoveEvent.java create mode 100644 NET/worlds/scape/MouseMoveHandler.java create mode 100644 NET/worlds/scape/MousePositionEvent.java create mode 100644 NET/worlds/scape/MousePositionHandler.java create mode 100644 NET/worlds/scape/MouseUpEvent.java create mode 100644 NET/worlds/scape/MouseUpHandler.java create mode 100644 NET/worlds/scape/MoveAction.java create mode 100644 NET/worlds/scape/MoveCameraAction.java create mode 100644 NET/worlds/scape/MultiManifestAction.java create mode 100644 NET/worlds/scape/MultiMotion.java create mode 100644 NET/worlds/scape/MusicManager.java create mode 100644 NET/worlds/scape/MusicManagerDialog.java create mode 100644 NET/worlds/scape/MusicRoom.java create mode 100644 NET/worlds/scape/MusicTrack.java create mode 100644 NET/worlds/scape/MutedDrone.java create mode 100644 NET/worlds/scape/MyButton.java create mode 100644 NET/worlds/scape/NamedPortal.java create mode 100644 NET/worlds/scape/NametagDrone.java create mode 100644 NET/worlds/scape/NoSuchPropertyException.java create mode 100644 NET/worlds/scape/NonPersister.java create mode 100644 NET/worlds/scape/NotifyScriptAction.java create mode 100644 NET/worlds/scape/NumberAttribute.java create mode 100644 NET/worlds/scape/ObjEditorDialog.java create mode 100644 NET/worlds/scape/ObjPropertyEditor.java create mode 100644 NET/worlds/scape/ObjectAdderDialog.java create mode 100644 NET/worlds/scape/ObjectPropertyAdder.java create mode 100644 NET/worlds/scape/ObjectSelectorDialog.java create mode 100644 NET/worlds/scape/OpenURLAction.java create mode 100644 NET/worlds/scape/ParallelAction.java create mode 100644 NET/worlds/scape/PassthroughBumpCalc.java create mode 100644 NET/worlds/scape/PasteWidget.java create mode 100644 NET/worlds/scape/PathMoveAction.java create mode 100644 NET/worlds/scape/PendingCacheDrone.java create mode 100644 NET/worlds/scape/PendingDrone.java create mode 100644 NET/worlds/scape/PeriodicTimeSensor.java create mode 100644 NET/worlds/scape/Persister.java create mode 100644 NET/worlds/scape/PickEvent.java create mode 100644 NET/worlds/scape/PickHandler.java create mode 100644 NET/worlds/scape/PickUpAction.java create mode 100644 NET/worlds/scape/Pilot.java create mode 100644 NET/worlds/scape/PitchDriver.java create mode 100644 NET/worlds/scape/PitchWidget.java create mode 100644 NET/worlds/scape/PlaneBumpCalc.java create mode 100644 NET/worlds/scape/PlaybackRecordingAction.java create mode 100644 NET/worlds/scape/Point2.java create mode 100644 NET/worlds/scape/Point2EditorDialog.java create mode 100644 NET/worlds/scape/Point2PropertyEditor.java create mode 100644 NET/worlds/scape/Point3.java create mode 100644 NET/worlds/scape/Point3EditorDialog.java create mode 100644 NET/worlds/scape/Point3PropertyEditor.java create mode 100644 NET/worlds/scape/Point3Temp.java create mode 100644 NET/worlds/scape/Polygon.java create mode 100644 NET/worlds/scape/Portal.java create mode 100644 NET/worlds/scape/PosableAction.java create mode 100644 NET/worlds/scape/PosableDrone.java create mode 100644 NET/worlds/scape/PosableDroneLoader.java create mode 100644 NET/worlds/scape/PosableShape.java create mode 100644 NET/worlds/scape/Postrenderable.java create mode 100644 NET/worlds/scape/PostspinBehavior.java create mode 100644 NET/worlds/scape/Prerenderable.java create mode 100644 NET/worlds/scape/PrintAction.java create mode 100644 NET/worlds/scape/ProgressiveAdder.java create mode 100644 NET/worlds/scape/PropAdder.java create mode 100644 NET/worlds/scape/PropEditor.java create mode 100644 NET/worlds/scape/PropList.java create mode 100644 NET/worlds/scape/PropPropEditor.java create mode 100644 NET/worlds/scape/PropPropEditorDialog.java create mode 100644 NET/worlds/scape/PropTreeNode.java create mode 100644 NET/worlds/scape/Properties.java create mode 100644 NET/worlds/scape/Property.java create mode 100644 NET/worlds/scape/ProximitySensor.java create mode 100644 NET/worlds/scape/RPAction.java create mode 100644 NET/worlds/scape/Rect.java create mode 100644 NET/worlds/scape/RectPatch.java create mode 100644 NET/worlds/scape/Recycler.java create mode 100644 NET/worlds/scape/RelativeMoveAction.java create mode 100644 NET/worlds/scape/RemotePortal.java create mode 100644 NET/worlds/scape/RemoveObjectAction.java create mode 100644 NET/worlds/scape/RenderWare.java create mode 100644 NET/worlds/scape/Restorer.java create mode 100644 NET/worlds/scape/RollBehavior.java create mode 100644 NET/worlds/scape/RollWidget.java create mode 100644 NET/worlds/scape/RollingAttribute.java create mode 100644 NET/worlds/scape/Room.java create mode 100644 NET/worlds/scape/RoomEnvironment.java create mode 100644 NET/worlds/scape/RoomSubscribeInfo.java create mode 100644 NET/worlds/scape/RunningActionCallback.java create mode 100644 NET/worlds/scape/RunningActionHandler.java create mode 100644 NET/worlds/scape/SameRoomSensor.java create mode 100644 NET/worlds/scape/SaveWidget.java create mode 100644 NET/worlds/scape/Saver.java create mode 100644 NET/worlds/scape/ScaleWidget.java create mode 100644 NET/worlds/scape/ScapePicMovie.java create mode 100644 NET/worlds/scape/ScapePicTexture.java create mode 100644 NET/worlds/scape/ScapePicTextureDecoder.java create mode 100644 NET/worlds/scape/ScrollingImagePanel.java create mode 100644 NET/worlds/scape/ScrollingListElement.java create mode 100644 NET/worlds/scape/SelectAvatarAction.java create mode 100644 NET/worlds/scape/SendURLAction.java create mode 100644 NET/worlds/scape/Sensor.java create mode 100644 NET/worlds/scape/SensorFrameHandler.java create mode 100644 NET/worlds/scape/SeqFile.java create mode 100644 NET/worlds/scape/SequenceAction.java create mode 100644 NET/worlds/scape/SequenceActionState.java create mode 100644 NET/worlds/scape/SetBooleanAction.java create mode 100644 NET/worlds/scape/SetColorAction.java create mode 100644 NET/worlds/scape/SetFloatAction.java create mode 100644 NET/worlds/scape/SetIntegerAction.java create mode 100644 NET/worlds/scape/SetPoint2Action.java create mode 100644 NET/worlds/scape/SetPoint3Action.java create mode 100644 NET/worlds/scape/SetPropertyAction.java create mode 100644 NET/worlds/scape/SetStringAction.java create mode 100644 NET/worlds/scape/SetURLAction.java create mode 100644 NET/worlds/scape/SetVisibleBumpableAction.java create mode 100644 NET/worlds/scape/SetZoomMode.java create mode 100644 NET/worlds/scape/Shadow.java create mode 100644 NET/worlds/scape/ShallowEnumeration.java create mode 100644 NET/worlds/scape/Shape.java create mode 100644 NET/worlds/scape/ShapeLoader.java create mode 100644 NET/worlds/scape/ShapeLoaderListener.java create mode 100644 NET/worlds/scape/ShapeTextureLoader.java create mode 100644 NET/worlds/scape/Sharer.java create mode 100644 NET/worlds/scape/SlidePropertyAction.java create mode 100644 NET/worlds/scape/SmoothDriver.java create mode 100644 NET/worlds/scape/Sound.java create mode 100644 NET/worlds/scape/SoundCallback.java create mode 100644 NET/worlds/scape/SoundPlayer.java create mode 100644 NET/worlds/scape/SoundResource.java create mode 100644 NET/worlds/scape/SoundState.java create mode 100644 NET/worlds/scape/SpinBehavior.java create mode 100644 NET/worlds/scape/StandardTexture.java create mode 100644 NET/worlds/scape/StandardTextureDecoder.java create mode 100644 NET/worlds/scape/StartupSensor.java create mode 100644 NET/worlds/scape/State.java create mode 100644 NET/worlds/scape/StateContext.java create mode 100644 NET/worlds/scape/StdoutAction.java create mode 100644 NET/worlds/scape/StopRecordingAction.java create mode 100644 NET/worlds/scape/StringAttribute.java create mode 100644 NET/worlds/scape/StringFieldEditorDialog.java create mode 100644 NET/worlds/scape/StringPropertyEditor.java create mode 100644 NET/worlds/scape/StringTexture.java create mode 100644 NET/worlds/scape/SubclumpShape.java create mode 100644 NET/worlds/scape/SuperRoot.java create mode 100644 NET/worlds/scape/Surface.java create mode 100644 NET/worlds/scape/SwitchableBehavior.java create mode 100644 NET/worlds/scape/TCompressor.java create mode 100644 NET/worlds/scape/TabbedDisplayPanel.java create mode 100644 NET/worlds/scape/TabbedPanel.java create mode 100644 NET/worlds/scape/TalkAction.java create mode 100644 NET/worlds/scape/Teleport.java create mode 100644 NET/worlds/scape/TeleportAction.java create mode 100644 NET/worlds/scape/TeleportDialog.java create mode 100644 NET/worlds/scape/TeleportStatus.java create mode 100644 NET/worlds/scape/Texture.java create mode 100644 NET/worlds/scape/TextureDecoder.java create mode 100644 NET/worlds/scape/TextureSurface.java create mode 100644 NET/worlds/scape/TextureSurfaceRenderer.java create mode 100644 NET/worlds/scape/Toggle.java create mode 100644 NET/worlds/scape/ToggleZoomMode.java create mode 100644 NET/worlds/scape/TooNewException.java create mode 100644 NET/worlds/scape/ToolBar.java create mode 100644 NET/worlds/scape/ToolTipManager.java create mode 100644 NET/worlds/scape/TradeAction.java create mode 100644 NET/worlds/scape/TrajectoryBehavior.java create mode 100644 NET/worlds/scape/TransAttribute.java create mode 100644 NET/worlds/scape/Transform.java create mode 100644 NET/worlds/scape/TransformEditorDialog.java create mode 100644 NET/worlds/scape/TransformPropertyEditor.java create mode 100644 NET/worlds/scape/Trigger.java create mode 100644 NET/worlds/scape/TriggeredSwitchableBehavior.java create mode 100644 NET/worlds/scape/TwoWayPortal.java create mode 100644 NET/worlds/scape/URLEditorDialog.java create mode 100644 NET/worlds/scape/URLPropertyEditor.java create mode 100644 NET/worlds/scape/URLSelf.java create mode 100644 NET/worlds/scape/URLSelfLoader.java create mode 100644 NET/worlds/scape/UndoStack.java create mode 100644 NET/worlds/scape/UndoWidget.java create mode 100644 NET/worlds/scape/UndoabCopy.java create mode 100644 NET/worlds/scape/UndoablAdd.java create mode 100644 NET/worlds/scape/UndoablCut.java create mode 100644 NET/worlds/scape/UndoablDelete.java create mode 100644 NET/worlds/scape/UndoablPaste.java create mode 100644 NET/worlds/scape/UndoablSet.java create mode 100644 NET/worlds/scape/UndoablTransform.java create mode 100644 NET/worlds/scape/Undoable.java create mode 100644 NET/worlds/scape/UniqueHasher.java create mode 100644 NET/worlds/scape/UnitEnumeration.java create mode 100644 NET/worlds/scape/UniverseHandler.java create mode 100644 NET/worlds/scape/UserEvent.java create mode 100644 NET/worlds/scape/UserHandler.java create mode 100644 NET/worlds/scape/VTransWidget.java create mode 100644 NET/worlds/scape/ValueEvent.java create mode 100644 NET/worlds/scape/ValueHandler.java create mode 100644 NET/worlds/scape/VectorProperty.java create mode 100644 NET/worlds/scape/VehicleDriver.java create mode 100644 NET/worlds/scape/VehicleShape.java create mode 100644 NET/worlds/scape/VelocityBehavior.java create mode 100644 NET/worlds/scape/VideoControlAction.java create mode 100644 NET/worlds/scape/VideoManager.java create mode 100644 NET/worlds/scape/VideoSurface.java create mode 100644 NET/worlds/scape/VideoTexture.java create mode 100644 NET/worlds/scape/VideoWall.java create mode 100644 NET/worlds/scape/VisiAttribute.java create mode 100644 NET/worlds/scape/WMPSoundPlayer.java create mode 100644 NET/worlds/scape/WObject.java create mode 100644 NET/worlds/scape/WObjectHighlighter.java create mode 100644 NET/worlds/scape/WaitAction.java create mode 100644 NET/worlds/scape/WaitActionState.java create mode 100644 NET/worlds/scape/WavSoundPlayer.java create mode 100644 NET/worlds/scape/WavSoundTerminator.java create mode 100644 NET/worlds/scape/WearAction.java create mode 100644 NET/worlds/scape/WearWall.java create mode 100644 NET/worlds/scape/WebPageWall.java create mode 100644 NET/worlds/scape/WebWallControlAction.java create mode 100644 NET/worlds/scape/Whiteboard.java create mode 100644 NET/worlds/scape/WidgetButton.java create mode 100644 NET/worlds/scape/WobClassLoader.java create mode 100644 NET/worlds/scape/WobLoaded.java create mode 100644 NET/worlds/scape/WobLoader.java create mode 100644 NET/worlds/scape/World.java create mode 100644 NET/worlds/scape/WorldRedirector.java create mode 100644 NET/worlds/scape/WorldScript.java create mode 100644 NET/worlds/scape/WorldScriptLoader.java create mode 100644 NET/worlds/scape/WorldScriptManager.java create mode 100644 NET/worlds/scape/WorldScriptToolkit.java create mode 100644 NET/worlds/scape/WorldScriptToolkitImp.java create mode 100644 NET/worlds/scape/WorldValidator.java create mode 100644 NET/worlds/scape/WrRamp.java create mode 100644 NET/worlds/scape/WrRectPatch.java create mode 100644 NET/worlds/scape/WrStaircase.java create mode 100644 NET/worlds/scape/WrVisiRectPatch.java create mode 100644 NET/worlds/scape/YawWidget.java create mode 100644 NET/worlds/scape/sendURL.java (limited to 'NET/worlds/scape') diff --git a/NET/worlds/scape/ASFSoundPlayer.java b/NET/worlds/scape/ASFSoundPlayer.java new file mode 100644 index 0000000..c66f205 --- /dev/null +++ b/NET/worlds/scape/ASFSoundPlayer.java @@ -0,0 +1,137 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ASFSoundPlayer +/* */ extends MCISoundPlayer +/* */ { +/* */ float ang; +/* */ float dist; +/* */ float vol; +/* */ int leftToRepeat; +/* */ int running; +/* */ private URL url; +/* */ +/* */ public ASFSoundPlayer(Sound owner) +/* */ { +/* 21 */ super(owner); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean open(float volume, float stopDist, boolean atten, boolean pan) +/* */ { +/* 31 */ return true; +/* */ } +/* */ +/* */ public void close() { +/* 35 */ stop(); +/* */ } +/* */ +/* */ public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up) +/* */ { +/* 40 */ Point3Temp toObj = Point3Temp.make(obj).minus(cam); +/* 41 */ Point3Temp right = Point3Temp.make(out).cross(up); +/* 42 */ float y = toObj.dot(out); +/* 43 */ float x = toObj.dot(right); +/* 44 */ this.ang = ((float)(Math.atan2(y, x) / 3.141592653589793D)); +/* 45 */ this.dist = toObj.length(); +/* */ +/* */ +/* 48 */ return setVolume(this.vol); +/* */ } +/* */ +/* */ public boolean setVolume(float v) { +/* 52 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getState() +/* */ { +/* 68 */ gotFinished(!ASFThread.isActive()); +/* */ +/* 70 */ return this.running != 0 ? 0 : 1; +/* */ } +/* */ +/* */ public synchronized void start(int repeatCount) { +/* 74 */ if (repeatCount == 0) { +/* 75 */ this.running = 0; +/* 76 */ return; +/* */ } +/* */ +/* 79 */ this.leftToRepeat = repeatCount; +/* */ +/* 81 */ if (this.leftToRepeat > 0) { +/* 82 */ this.leftToRepeat -= 1; +/* */ } +/* 84 */ this.running = 1; +/* */ +/* */ +/* 87 */ URL myURL = this.owner == null ? this.url : this.owner.getURL(); +/* 88 */ this.running = 2; +/* 89 */ new ASFThread(myURL, this); +/* */ } +/* */ +/* */ +/* */ public synchronized void start(URL u) +/* */ { +/* 95 */ this.url = u; +/* 96 */ start(1); +/* */ } +/* */ +/* */ public static void pauseSystem() { +/* 100 */ ASFThread.pauseASF(); +/* 101 */ WavSoundPlayer.pauseSystemExceptASF(); +/* */ } +/* */ +/* */ public static void resumeSystem() { +/* 105 */ ASFThread.resumeASF(); +/* 106 */ WavSoundPlayer.resumeSystemExceptASF(); +/* */ } +/* */ +/* */ synchronized void gotFinished(boolean f) +/* */ { +/* 111 */ if ((f) && +/* 112 */ (this.running == 2)) { +/* 113 */ start(this.leftToRepeat); +/* */ } +/* */ } +/* */ +/* */ public synchronized void stop() { +/* 118 */ this.leftToRepeat = 0; +/* 119 */ ASFThread.stopASF(); +/* */ } +/* */ +/* */ public void volume(float left, float right) {} +/* */ +/* */ public static synchronized boolean isActive() { +/* 125 */ return ASFThread.isActive(); +/* */ } +/* */ +/* */ static synchronized void shutdown() {} +/* */ +/* */ static native boolean nativePlay(String paramString); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ASFSoundPlayer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ASFThread.java b/NET/worlds/scape/ASFThread.java new file mode 100644 index 0000000..5f7893c --- /dev/null +++ b/NET/worlds/scape/ASFThread.java @@ -0,0 +1,225 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ASFThread +/* */ extends Thread +/* */ { +/* */ private URL url; +/* */ private ASFSoundPlayer player; +/* */ private static ASFThread asfThread; +/* */ private static boolean paused; +/* */ +/* */ ASFThread(URL url, ASFSoundPlayer player) +/* */ { +/* 142 */ this.url = url; +/* 143 */ this.player = player; +/* 144 */ setASF(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void run() +/* */ { +/* 157 */ CacheFile cf = Cache.getFile(this.url); +/* 158 */ cf.waitUntilLoaded(); +/* 159 */ if (cf.error()) { +/* 160 */ this.player.running = 3; +/* */ +/* 162 */ releaseASF(this); +/* 163 */ } else if (!paused) +/* */ { +/* 165 */ String localName = cf.getLocalName().replace('/', '\\'); +/* 166 */ if (!ASFSoundPlayer.nativePlay(localName)) +/* 167 */ this.player.running = 3; +/* 168 */ releaseASF(this); +/* */ } +/* */ } +/* */ +/* */ static synchronized void pauseASF() { +/* 173 */ if ((!paused) && (asfThread != null)) { +/* 174 */ ASFThread t = asfThread; +/* 175 */ stopASF(); +/* */ +/* 177 */ paused = true; +/* 178 */ new ASFThread(t.url, t.player); +/* */ } +/* 180 */ paused = true; +/* */ } +/* */ +/* */ static synchronized void resumeASF() { +/* 184 */ if (paused) { +/* 185 */ ASFThread t = asfThread; +/* 186 */ paused = false; +/* */ +/* 188 */ if (t != null) +/* 189 */ new ASFThread(t.url, t.player); +/* */ } +/* */ } +/* */ +/* */ static synchronized void releaseASF(ASFThread t) { +/* 194 */ if (asfThread == t) +/* 195 */ asfThread = null; +/* */ } +/* */ +/* */ static synchronized void setASF(ASFThread t) { +/* 199 */ if ((asfThread == null) || (!asfThread.url.equals(t.url))) +/* */ { +/* */ +/* 202 */ asfThread = t; +/* 203 */ asfThread.setDaemon(true); +/* 204 */ asfThread.start(); +/* */ } +/* */ } +/* */ +/* */ static synchronized void stopASF() { +/* 209 */ if (asfThread != null) { +/* 210 */ asfThread = null; +/* 211 */ if (!paused) +/* 212 */ ASFSoundPlayer.nativePlay(""); +/* */ } +/* */ } +/* */ +/* */ static boolean isActive() { +/* 217 */ return asfThread != null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ASFThread.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Action.java b/NET/worlds/scape/Action.java new file mode 100644 index 0000000..cd75bac --- /dev/null +++ b/NET/worlds/scape/Action.java @@ -0,0 +1,163 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class Action +/* */ extends SuperRoot +/* */ { +/* */ public String rightMenuLabel; +/* 82 */ private static Object classCookie = new Object(); +/* */ +/* */ +/* */ public abstract Persister trigger(Event paramEvent, Persister paramPersister); +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 90 */ s.saveVersion(4, classCookie); +/* 91 */ s.saveString(this.rightMenuLabel); +/* 92 */ super.saveState(s); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 101 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 103 */ r.restoreInt(); +/* 104 */ setName(r.restoreString()); +/* */ case 0: +/* 106 */ r.setOldFlag(); +/* 107 */ break; +/* */ case 2: +/* 109 */ r.setOldFlag(); +/* 110 */ super.restoreState(r); +/* 111 */ r.restoreInt(); +/* 112 */ break; +/* */ +/* */ case 4: +/* 115 */ this.rightMenuLabel = r.restoreString(); +/* */ case 3: +/* 117 */ super.restoreState(r); +/* 118 */ break; +/* */ default: +/* 120 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 128 */ Object ret = null; +/* 129 */ switch (index - offset) { +/* */ case 0: +/* 131 */ if (mode == 0) { +/* 132 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 133 */ "Trigger Now"), "No", "Yes"); +/* 134 */ } else if (mode == 1) { +/* 135 */ ret = new Boolean(false); +/* 136 */ } else if ((mode == 2) && +/* 137 */ (((Boolean)value).booleanValue())) { +/* 138 */ RunningActionHandler.trigger(this, getWorld(), null); +/* */ } +/* 140 */ break; +/* */ +/* */ case 1: +/* 143 */ if (mode == 0) { +/* 144 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 145 */ "Right Menu Label").allowSetNull()); +/* 146 */ } else if (mode == 1) { +/* 147 */ ret = this.rightMenuLabel; +/* 148 */ } else if (mode == 2) +/* 149 */ this.rightMenuLabel = ((String)value); +/* 150 */ break; +/* */ +/* */ default: +/* 153 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 155 */ return ret; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Action.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Action_Animation.java b/NET/worlds/scape/Action_Animation.java new file mode 100644 index 0000000..969c9da --- /dev/null +++ b/NET/worlds/scape/Action_Animation.java @@ -0,0 +1,44 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Action_Animation +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 21 */ return null; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 26 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException +/* */ { +/* 31 */ AnimateAction a = new AnimateAction(); +/* 32 */ r.replace(this, a); +/* */ +/* 34 */ a.cycleTime = ((int)r.restoreFloat()); +/* 35 */ a.cycles = r.restoreInt(); +/* 36 */ a.frameList = r.restoreString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Action_Animation.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Action_Motion.java b/NET/worlds/scape/Action_Motion.java new file mode 100644 index 0000000..2e42359 --- /dev/null +++ b/NET/worlds/scape/Action_Motion.java @@ -0,0 +1,59 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Action_Motion +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 22 */ return null; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 27 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException +/* */ { +/* 32 */ MoveAction a = new MoveAction(); +/* 33 */ r.replace(this, a); +/* */ +/* 35 */ a.cycleTime = ((int)r.restoreFloat()); +/* 36 */ a.cycles = r.restoreInt(); +/* */ try +/* */ { +/* 39 */ a.extentPoint.restoreState(r); +/* 40 */ a.startPoint.restoreState(r); +/* 41 */ a.extentScale.restoreState(r); +/* 42 */ a.startScale.restoreState(r); +/* 43 */ a.extentSpin.restoreState(r); +/* 44 */ a.startSpin.restoreState(r); +/* */ } +/* */ catch (Exception localException) {} +/* 47 */ a.extentRotation = r.restoreFloat(); +/* 48 */ a.startRotation = r.restoreFloat(); +/* */ +/* 50 */ a.extentPoint.minus(a.startPoint); +/* 51 */ a.extentScale.dividedBy(a.startScale); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Action_Motion.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Action_Toggle.java b/NET/worlds/scape/Action_Toggle.java new file mode 100644 index 0000000..c14e73a --- /dev/null +++ b/NET/worlds/scape/Action_Toggle.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Action_Toggle +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 19 */ return null; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 24 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException +/* */ { +/* 29 */ SetVisibleBumpableAction a = new SetVisibleBumpableAction(); +/* 30 */ r.replace(this, a); +/* */ +/* 32 */ a.targetBumpable = r.restoreBoolean(); +/* 33 */ a.targetVisible = r.restoreBoolean(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Action_Toggle.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AddObjectAction.java b/NET/worlds/scape/AddObjectAction.java new file mode 100644 index 0000000..5f07983 --- /dev/null +++ b/NET/worlds/scape/AddObjectAction.java @@ -0,0 +1,99 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AddObjectAction +/* */ extends SetPropertyAction +/* */ { +/* */ private SuperRoot _value; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 27 */ assert (!useParam()); +/* 28 */ add(this._value); +/* 29 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 38 */ Object ret = null; +/* 39 */ switch (index - offset) { +/* */ case 0: +/* 41 */ if (mode == 0) { +/* 42 */ VectorProperty vp = new VectorProperty(this, index, +/* 43 */ "Object to Add"); +/* 44 */ if (this._value != null) +/* */ { +/* */ +/* */ +/* */ +/* 49 */ vp.allowSetNull(); +/* 50 */ ret = vp; +/* */ } +/* */ } +/* 53 */ else if (mode == 1) { +/* 54 */ ret = new Vector(1); +/* 55 */ if (this._value != null) { +/* 56 */ ((Vector)ret).addElement(this._value); +/* */ } +/* 58 */ } else if (mode == 4) { +/* 59 */ assert (value == this._value); +/* 60 */ this._value = null; +/* */ } +/* 62 */ else if (mode == 3) { +/* 63 */ assert (this._value == null); +/* 64 */ this._value = ((SuperRoot)value); +/* */ } +/* 66 */ break; +/* */ default: +/* 68 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 70 */ return ret; +/* */ } +/* */ +/* 73 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 77 */ s.saveVersion(1, classCookie); +/* 78 */ super.saveState(s); +/* 79 */ s.saveMaybeNull(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 83 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 85 */ super.restoreState(r); +/* 86 */ this._value = ((SuperRoot)r.restoreMaybeNull()); +/* 87 */ break; +/* */ +/* */ default: +/* 90 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AddObjectAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AdvancingAction.java b/NET/worlds/scape/AdvancingAction.java new file mode 100644 index 0000000..ff5b434 --- /dev/null +++ b/NET/worlds/scape/AdvancingAction.java @@ -0,0 +1,186 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AdvancingAction +/* */ extends Action +/* */ { +/* 29 */ private Vector actions = new Vector(); +/* */ +/* */ +/* 32 */ private int nextAction = 0; +/* */ +/* */ +/* 35 */ boolean singleTrigger = true; +/* 36 */ boolean inProgress = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event evt, Persister seqID) +/* */ { +/* 45 */ if ((this.singleTrigger) && (this.inProgress) && (seqID == null)) { +/* 46 */ return null; +/* */ } +/* */ +/* 49 */ if (this.nextAction >= this.actions.size()) +/* 50 */ this.nextAction = 0; +/* 51 */ Action act = (Action)this.actions.elementAt(this.nextAction); +/* */ +/* */ +/* 54 */ Persister id = null; +/* 55 */ if (act != null) { +/* 56 */ id = act.trigger(evt, seqID); +/* 57 */ this.inProgress = (id != null); +/* */ } +/* */ +/* */ +/* 61 */ if ((id == null) || (!this.singleTrigger)) { +/* 62 */ this.nextAction += 1; +/* */ } +/* 64 */ return id; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addComponent(Action act) +/* */ { +/* 74 */ this.actions.addElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertComponent(Action act, int index) +/* */ { +/* 84 */ this.actions.insertElementAt(act, index); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean removeComponent(Action act) +/* */ { +/* 94 */ return this.actions.removeElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getComponents() +/* */ { +/* 103 */ return this.actions.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 114 */ Object ret = null; +/* 115 */ switch (index - offset) { +/* */ case 0: +/* 117 */ if (mode == 0) { +/* 118 */ VectorProperty vp = +/* 119 */ new VectorProperty(this, index, "Components"); +/* 120 */ vp.allowSorting(false); +/* 121 */ ret = ObjectPropertyAdder.make(vp, getRoot(), +/* 122 */ "NET.worlds.scape.Action"); +/* 123 */ } else if (mode == 1) { +/* 124 */ ret = this.actions.clone(); +/* 125 */ } else if (mode == 4) { +/* 126 */ this.actions.removeElement(value); +/* 127 */ } else if (mode == 3) { +/* 128 */ this.actions.addElement((Action)value); } +/* 129 */ break; +/* */ case 1: +/* 131 */ if (mode == 0) { +/* 132 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 133 */ "Prevent overlapping actions"), +/* 134 */ "Overlapping", +/* 135 */ "One at a time"); +/* 136 */ } else if (mode == 1) { +/* 137 */ ret = new Boolean(this.singleTrigger); +/* 138 */ } else if (mode == 2) +/* 139 */ this.singleTrigger = ((Boolean)value).booleanValue(); +/* 140 */ break; +/* */ default: +/* 142 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 144 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 151 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 155 */ s.saveVersion(1, classCookie); +/* 156 */ super.saveState(s); +/* 157 */ s.saveVector(this.actions); +/* 158 */ s.saveInt(this.nextAction); +/* 159 */ s.saveBoolean(this.singleTrigger); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 164 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 166 */ super.restoreState(r); +/* 167 */ this.actions = r.restoreVectorActions(); +/* 168 */ this.nextAction = r.restoreInt(); +/* 169 */ break; +/* */ case 1: +/* 171 */ super.restoreState(r); +/* 172 */ this.actions = r.restoreVectorActions(); +/* 173 */ this.nextAction = r.restoreInt(); +/* 174 */ this.singleTrigger = r.restoreBoolean(); +/* 175 */ break; +/* */ default: +/* 177 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AdvancingAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Animatable.java b/NET/worlds/scape/Animatable.java new file mode 100644 index 0000000..f7af81a --- /dev/null +++ b/NET/worlds/scape/Animatable.java @@ -0,0 +1,14 @@ +package NET.worlds.scape; + +public abstract interface Animatable +{ + public abstract boolean hasClump(); + + public abstract void setMaterial(Material paramMaterial); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Animatable.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimateAction.java b/NET/worlds/scape/AnimateAction.java new file mode 100644 index 0000000..a7dc951 --- /dev/null +++ b/NET/worlds/scape/AnimateAction.java @@ -0,0 +1,262 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AnimateAction +/* */ extends Action +/* */ { +/* */ int startTime; +/* 33 */ public int cycleTime = 1000; +/* */ +/* */ +/* 36 */ public String frameList = ""; +/* */ +/* 38 */ protected int frameListCount = 0; +/* */ +/* */ +/* */ +/* 42 */ protected Material[] frameMaterialArray = null; +/* */ +/* 44 */ public int cycles = 0; +/* 45 */ public boolean infiniteLoop = false; +/* */ +/* */ protected int cycleNo; +/* */ protected int currentFrameNo; +/* 49 */ private boolean running = false; +/* */ +/* */ public AnimateAction() { +/* 52 */ startAnimation(); +/* */ } +/* */ +/* */ public void startAnimation() { +/* 56 */ this.cycleNo = 0; +/* 57 */ this.currentFrameNo = -1; +/* 58 */ this.startTime = Std.getRealTime(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void preprocessFrameList(String frameList) +/* */ { +/* 69 */ this.frameMaterialArray = AnimatingDoor.namesToMaterialArray(this, +/* 70 */ frameList); +/* 71 */ this.frameListCount = (this.frameMaterialArray == null ? 0 : +/* 72 */ this.frameMaterialArray.length); +/* */ } +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 79 */ if (this.frameMaterialArray != null) { +/* 80 */ int i = this.frameMaterialArray.length; +/* 81 */ do { this.frameMaterialArray[i].setKeepLoaded(false);i--; +/* 80 */ } while (i >= 0); +/* */ +/* 82 */ this.frameMaterialArray = null; +/* 83 */ this.frameListCount = 0; +/* */ } +/* 85 */ super.detach(); +/* */ } +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 91 */ Object owner = getOwner(); +/* 92 */ if (!(owner instanceof Animatable)) { +/* 93 */ this.frameMaterialArray = null; +/* 94 */ this.frameListCount = 0; +/* 95 */ return null; +/* */ } +/* */ +/* 98 */ Animatable o = (Animatable)owner; +/* */ +/* */ +/* */ +/* 102 */ if (!o.hasClump()) { +/* 103 */ this.frameMaterialArray = null; +/* 104 */ this.frameListCount = 0; +/* 105 */ return seqID; +/* */ } +/* */ +/* */ +/* 109 */ if (this.frameMaterialArray == null) { +/* 110 */ preprocessFrameList(this.frameList); +/* */ } +/* */ +/* 113 */ if (seqID == null) +/* */ { +/* 115 */ if ((this.running) && (!this.infiniteLoop)) { +/* 116 */ return null; +/* */ } +/* 118 */ startAnimation(); +/* */ } +/* */ +/* 121 */ int nextFrameNo = 0; +/* 122 */ if ((this.frameListCount == 0) || (this.cycleTime <= 0)) { +/* 123 */ this.cycleNo = 1000000000; +/* */ } else { +/* 125 */ int runTime = Std.getRealTime() - this.startTime; +/* 126 */ long frameNo = this.frameListCount * runTime / this.cycleTime; +/* 127 */ this.cycleNo = ((int)(frameNo / this.frameListCount)); +/* 128 */ nextFrameNo = (int)(frameNo - this.cycleNo * this.frameListCount); +/* */ } +/* */ +/* 131 */ if ((this.cycleNo >= this.cycles) && (!this.infiniteLoop)) { +/* 132 */ nextFrameNo = this.frameListCount - 1; +/* 133 */ this.running = false; +/* */ } else { +/* 135 */ this.running = true; +/* */ } +/* 137 */ if (nextFrameNo != this.currentFrameNo) { +/* 138 */ this.currentFrameNo = nextFrameNo; +/* 139 */ if ((o.hasClump()) && (this.currentFrameNo >= 0)) { +/* 140 */ o.setMaterial(this.frameMaterialArray[this.currentFrameNo]); +/* */ } +/* */ } +/* */ +/* 144 */ return this.running ? this : null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 154 */ Object ret = null; +/* 155 */ switch (index - offset) { +/* */ case 0: +/* 157 */ if (mode == 0) { +/* 158 */ ret = IntegerPropertyEditor.make( +/* 159 */ new Property(this, index, "Cycle Time")); +/* 160 */ } else if (mode == 1) { +/* 161 */ ret = new Integer(this.cycleTime); +/* 162 */ } else if (mode == 2) +/* 163 */ this.cycleTime = ((Integer)value).intValue(); +/* 164 */ break; +/* */ case 1: +/* 166 */ if (mode == 0) { +/* 167 */ ret = IntegerPropertyEditor.make( +/* 168 */ new Property(this, index, "Cycles")); +/* 169 */ } else if (mode == 1) { +/* 170 */ ret = new Integer(this.cycles); +/* 171 */ } else if (mode == 2) +/* 172 */ this.cycles = ((Integer)value).intValue(); +/* 173 */ break; +/* */ case 2: +/* 175 */ if (mode == 0) { +/* 176 */ ret = BooleanPropertyEditor.make( +/* 177 */ new Property(this, index, "Infinite Loop"), +/* 178 */ "False", "True"); +/* 179 */ } else if (mode == 1) { +/* 180 */ ret = new Boolean(this.infiniteLoop); +/* 181 */ } else if (mode == 2) { +/* 182 */ this.infiniteLoop = ((Boolean)value).booleanValue(); +/* */ } +/* 184 */ break; +/* */ case 3: +/* 186 */ if (mode == 0) { +/* 187 */ ret = StringPropertyEditor.make( +/* 188 */ new Property(this, index, "Frame List")); +/* 189 */ } else if (mode == 1) { +/* 190 */ ret = new String(this.frameList); +/* 191 */ } else if (mode == 2) { +/* 192 */ this.frameList = ((String)value).toString().trim().toLowerCase(); +/* 193 */ preprocessFrameList(this.frameList); +/* */ } +/* 195 */ break; +/* */ default: +/* 197 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* 199 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 203 */ String ret = super.toString() + +/* 204 */ "[cycleTime " + this.cycleTime + ", cycles " + this.cycles + ","; +/* 205 */ if (!this.infiniteLoop) +/* 206 */ ret = ret + " not "; +/* 207 */ ret = ret + "Infinite ]"; +/* */ +/* 209 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 215 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 218 */ s.saveVersion(3, classCookie); +/* 219 */ super.saveState(s); +/* 220 */ s.saveBoolean(this.infiniteLoop); +/* 221 */ s.saveInt(this.cycleTime); +/* 222 */ s.saveInt(this.cycles); +/* 223 */ s.saveString(this.frameList); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 227 */ switch (r.restoreVersion(classCookie)) { +/* */ case 3: +/* 229 */ super.restoreState(r); +/* 230 */ this.infiniteLoop = r.restoreBoolean(); +/* 231 */ this.cycleTime = r.restoreInt(); +/* 232 */ this.cycles = r.restoreInt(); +/* 233 */ this.frameList = r.restoreString(); +/* 234 */ break; +/* */ case 2: +/* 236 */ super.restoreState(r); +/* 237 */ this.cycleTime = r.restoreInt(); +/* 238 */ this.cycles = r.restoreInt(); +/* 239 */ this.infiniteLoop = (this.cycles == 0); +/* 240 */ this.frameList = r.restoreString(); +/* 241 */ break; +/* */ case 1: +/* 243 */ super.restoreState(r); +/* */ case 0: +/* 245 */ this.cycleTime = ((int)r.restoreFloat()); +/* 246 */ this.cycles = r.restoreInt(); +/* 247 */ this.infiniteLoop = (this.cycles == 0); +/* 248 */ this.frameList = r.restoreString(); +/* 249 */ break; +/* */ default: +/* 251 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimateAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatedAction.java b/NET/worlds/scape/AnimatedAction.java new file mode 100644 index 0000000..7d36e46 --- /dev/null +++ b/NET/worlds/scape/AnimatedAction.java @@ -0,0 +1,397 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.core.Timer; +/* */ import NET.worlds.core.TimerCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AnimatedAction +/* */ implements AnimatedActionCallback, TimerCallback +/* */ { +/* */ static final int noAction = 0; +/* */ static final int addToInventory = 1; +/* */ static final int removeObject = 2; +/* */ static final int animateObject = 3; +/* */ static final int moveObjectTo = 4; +/* */ static final int playSound = 5; +/* */ static final int obtainConsent = 0; +/* */ static final int zoomOut = 1; +/* */ static final int moveToObject = 2; +/* */ static final int preAnimateAction = 3; +/* */ static final int actOnObject1 = 4; +/* */ static final int simulAnimateAction = 5; +/* */ static final int postAnimateAction = 6; +/* */ static final int actOnObject2 = 7; +/* */ static final int zoomBack = 8; +/* 51 */ static String[] actions = { +/* 52 */ "noAction", +/* 53 */ "addToInventory", +/* 54 */ "removeObject", +/* 55 */ "animateObject", +/* 56 */ "moveObjectTo", +/* 57 */ "playSound" }; +/* */ String actionName; +/* */ Vector avatarNames; +/* */ Vector targetObjects; +/* */ +/* 62 */ AnimatedAction() { this.avatarNames = new Vector(); +/* 63 */ this.targetObjects = new Vector(); +/* */ } +/* */ +/* */ public static int getAction(String action) +/* */ { +/* 68 */ for (int i = 0; i < actions.length; i++) +/* */ { +/* 70 */ if (action.equals(actions[i])) { +/* 71 */ return i; +/* */ } +/* */ } +/* 74 */ return 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 99 */ Shape _targetShape = null; +/* */ +/* */ +/* */ boolean consentRequired; +/* */ +/* */ +/* */ Point2 targetRelPosition; +/* */ +/* */ +/* */ Point2 targetPosition; +/* */ +/* */ +/* */ double targetRelYaw; +/* */ +/* */ +/* */ float targetYaw; +/* */ +/* */ +/* */ int preAnimationAction; +/* */ +/* */ +/* */ String preAnimationParameter; +/* */ +/* */ +/* */ String actionName1; +/* */ +/* */ +/* */ int simultaneousAction; +/* */ +/* */ +/* */ String simultaneousParameter; +/* */ +/* */ +/* */ int postAnimationAction; +/* */ +/* */ +/* */ String postAnimationParameter; +/* */ +/* */ String actionName2; +/* */ +/* */ int _oldMode; +/* */ +/* */ int _oldSpeed; +/* */ +/* */ private int _state; +/* */ +/* */ private HoloPilot _pilot; +/* */ +/* */ private float _waitTime; +/* */ +/* */ +/* */ void setTargetShape(Shape s) +/* */ { +/* 152 */ this._targetShape = s; +/* */ +/* 154 */ Point3Temp objVec = Point3Temp.make(this.targetRelPosition.x, +/* 155 */ this.targetRelPosition.y, 0.0F); +/* */ +/* 157 */ this.targetYaw = this._targetShape.getObjectToWorldMatrix().getYaw(); +/* 158 */ Transform t = new Transform(); +/* 159 */ t.yaw(-this.targetYaw); +/* 160 */ objVec.vectorTimes(t); +/* 161 */ t.recycle(); +/* */ +/* 163 */ Point3Temp shapePos = this._targetShape.getWorldPosition(); +/* */ +/* 165 */ objVec.plus(shapePos); +/* */ +/* 167 */ this.targetPosition = new Point2(objVec.x, objVec.y); +/* */ } +/* */ +/* */ public void execute(HoloPilot pilot) +/* */ { +/* 172 */ if (this._targetShape == null) +/* */ { +/* 174 */ System.out.println("No target shape for action " + this.actionName); +/* 175 */ return; +/* */ } +/* */ +/* 178 */ this._targetShape.setBumpable(false); +/* */ +/* 180 */ this._pilot = pilot; +/* */ +/* */ +/* */ +/* */ +/* 185 */ this._state = 0; +/* 186 */ stateChanged(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void motionComplete(int completionCode) +/* */ { +/* 195 */ this._state += 1; +/* 196 */ stateChanged(); +/* */ } +/* */ +/* */ public void timerDone() +/* */ { +/* 201 */ motionComplete(0); +/* */ } +/* */ +/* */ private void stateChanged() +/* */ { +/* 206 */ switch (this._state) +/* */ { +/* */ +/* */ case 0: +/* 210 */ motionComplete(0); +/* 211 */ break; +/* */ +/* */ +/* */ +/* */ case 1: +/* 216 */ Console c = Console.getActive(); +/* 217 */ if ((c instanceof DefaultConsole)) +/* */ { +/* 219 */ Pilot p = Pilot.getActive(); +/* 220 */ this._oldMode = p.getOutsideCameraMode(); +/* 221 */ this._oldSpeed = p.getOutsideCameraSpeed(); +/* 222 */ p.setOutsideCameraMode(8, +/* 223 */ 1); +/* */ } +/* */ +/* 226 */ motionComplete(0); +/* 227 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ case 2: +/* 233 */ double newYaw = this.targetYaw + this.targetRelYaw; +/* 234 */ this._pilot.addCallback(this); +/* */ +/* */ +/* 237 */ this._pilot.walkTo(new Point2(this.targetPosition.x, +/* 238 */ this.targetPosition.y), (float)newYaw); +/* 239 */ break; +/* */ +/* */ +/* */ +/* */ case 3: +/* 244 */ this._pilot.removeSmoothDriver(); +/* 245 */ this._pilot.returnHandsOffDriver(); +/* 246 */ doAction(this.preAnimationAction, this.preAnimationParameter); +/* 247 */ motionComplete(0); +/* 248 */ break; +/* */ case 4: +/* */ case 7: +/* */ String actionName; +/* */ +/* */ String actionName; +/* */ +/* 255 */ if (this._state == 4) { +/* 256 */ actionName = this.actionName1; +/* */ } else { +/* 258 */ actionName = this.actionName2; +/* */ } +/* 260 */ this._waitTime = this._pilot.animate(actionName); +/* 261 */ motionComplete(0); +/* 262 */ break; +/* */ +/* */ +/* */ +/* */ case 5: +/* 267 */ doAction(this.simultaneousAction, this.simultaneousParameter + +/* 268 */ "|sender|" + this.actionName1); +/* */ +/* */ +/* */ +/* 272 */ Timer tm = new Timer(this._waitTime, this); +/* 273 */ tm.start(); +/* 274 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ case 6: +/* 280 */ doAction(this.postAnimationAction, this.postAnimationParameter); +/* 281 */ motionComplete(0); +/* 282 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ case 8: +/* 288 */ Console c = Console.getActive(); +/* 289 */ if ((c instanceof DefaultConsole)) +/* */ { +/* 291 */ Pilot p = Pilot.getActive(); +/* 292 */ p.setOutsideCameraMode(this._oldMode, this._oldSpeed); +/* */ } +/* 294 */ this._pilot.removeHandsOffDriver(); +/* 295 */ this._pilot.returnSmoothDriver(); +/* 296 */ AnimatedActionManager.get().actionCompleted(this); +/* 297 */ motionComplete(0); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void abort() +/* */ { +/* 307 */ this._state = 8; +/* 308 */ stateChanged(); +/* */ } +/* */ +/* */ private void doAction(int action, String parameter) +/* */ { +/* 313 */ switch (action) +/* */ { +/* */ case 0: +/* */ break; +/* */ +/* */ +/* */ +/* */ case 1: +/* */ break; +/* */ +/* */ +/* */ +/* */ case 2: +/* */ break; +/* */ +/* */ +/* */ +/* */ +/* */ case 5: +/* 332 */ Sound s = new Sound(URL.make(parameter)); +/* 333 */ this._pilot.add(s); +/* 334 */ s.trigger(null, null); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ case 3: +/* 343 */ Drone targetDrone = null; +/* */ +/* 345 */ if (this._targetShape != null) +/* */ { +/* 347 */ if ((this._targetShape instanceof PosableShape)) +/* */ { +/* 349 */ SuperRoot owner = this._targetShape.getOwner(); +/* 350 */ if ((owner instanceof Drone)) +/* */ { +/* 352 */ targetDrone = (Drone)owner; +/* */ } +/* */ } +/* */ } +/* */ +/* 357 */ if (targetDrone != null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 371 */ Pilot.sendText(targetDrone.getLongID(), +/* 372 */ "&|+action2>" + parameter); +/* */ } +/* */ +/* 375 */ if ((this._targetShape instanceof PosableShape)) +/* */ { +/* */ +/* 378 */ String actionName = null; +/* 379 */ int idx = parameter.indexOf("|sender|"); +/* 380 */ if (idx != -1) { +/* 381 */ actionName = parameter.substring(0, idx); +/* */ } else { +/* 383 */ actionName = parameter; +/* */ } +/* 385 */ ((PosableShape)this._targetShape).animate(actionName); +/* */ } +/* */ +/* 388 */ break; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatedAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatedActionCallback.java b/NET/worlds/scape/AnimatedActionCallback.java new file mode 100644 index 0000000..6886024 --- /dev/null +++ b/NET/worlds/scape/AnimatedActionCallback.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface AnimatedActionCallback +{ + public abstract void motionComplete(int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatedActionCallback.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatedActionHandler.java b/NET/worlds/scape/AnimatedActionHandler.java new file mode 100644 index 0000000..482ce19 --- /dev/null +++ b/NET/worlds/scape/AnimatedActionHandler.java @@ -0,0 +1,16 @@ +package NET.worlds.scape; + +public abstract interface AnimatedActionHandler +{ + public abstract void addCallback(AnimatedActionCallback paramAnimatedActionCallback); + + public abstract void removeCallback(AnimatedActionCallback paramAnimatedActionCallback); + + public abstract void notifyCallbacks(int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatedActionHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatedActionHandlerImp.java b/NET/worlds/scape/AnimatedActionHandlerImp.java new file mode 100644 index 0000000..d692ba6 --- /dev/null +++ b/NET/worlds/scape/AnimatedActionHandlerImp.java @@ -0,0 +1,49 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AnimatedActionHandlerImp +/* */ implements AnimatedActionHandler +/* */ { +/* */ Vector callbacks; +/* */ +/* */ AnimatedActionHandlerImp() +/* */ { +/* 17 */ this.callbacks = new Vector(); +/* */ } +/* */ +/* */ public void addCallback(AnimatedActionCallback c) +/* */ { +/* 22 */ assert (this.callbacks != null); +/* 23 */ this.callbacks.addElement(c); +/* */ } +/* */ +/* */ public void removeCallback(AnimatedActionCallback c) +/* */ { +/* 28 */ assert (this.callbacks != null); +/* 29 */ this.callbacks.removeElement(c); +/* */ } +/* */ +/* */ public void notifyCallbacks(int completionCode) +/* */ { +/* 34 */ assert (this.callbacks != null); +/* 35 */ Enumeration e = this.callbacks.elements(); +/* 36 */ while (e.hasMoreElements()) +/* */ { +/* 38 */ AnimatedActionCallback c = +/* 39 */ (AnimatedActionCallback)e.nextElement(); +/* 40 */ c.motionComplete(completionCode); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatedActionHandlerImp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatedActionManager.java b/NET/worlds/scape/AnimatedActionManager.java new file mode 100644 index 0000000..d3c8d2c --- /dev/null +++ b/NET/worlds/scape/AnimatedActionManager.java @@ -0,0 +1,401 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Menu; +/* */ import java.awt.MenuItem; +/* */ import java.awt.event.ActionEvent; +/* */ import java.awt.event.ActionListener; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.io.RandomAccessFile; +/* */ import java.util.Enumeration; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AnimatedActionManager +/* */ implements ActionListener, BGLoaded +/* */ { +/* */ public static AnimatedActionManager get() +/* */ { +/* 38 */ if (theAnimatedActionManager == null) { +/* 39 */ theAnimatedActionManager = new AnimatedActionManager(); +/* */ } +/* 41 */ return theAnimatedActionManager; +/* */ } +/* */ +/* */ private Vector getActionList(URL avatar, URL object) +/* */ { +/* 46 */ if ((this.actionList == null) || (avatar == null) || (object == null)) { return null; +/* */ } +/* 48 */ String av = PosableShape.getBodyType(avatar); +/* 49 */ if (av == null) { return null; +/* */ } +/* 51 */ String ob = object.toString(); +/* 52 */ int dot = ob.lastIndexOf("."); +/* 53 */ if (dot != -1) { +/* 54 */ ob = ob.substring(0, dot); +/* */ } +/* 56 */ Vector ret = new Vector(); +/* */ +/* */ +/* */ +/* 60 */ Enumeration e = this.actionList.elements(); +/* 61 */ while (e.hasMoreElements()) +/* */ { +/* 63 */ AnimatedAction a = (AnimatedAction)e.nextElement(); +/* 64 */ if (vectorCheck(av, a.avatarNames)) +/* */ { +/* 66 */ if (vectorCheck(ob, a.targetObjects)) +/* */ { +/* 68 */ ret.addElement(a); +/* */ } +/* */ } +/* */ } +/* */ +/* 73 */ return ret; +/* */ } +/* */ +/* */ +/* */ private boolean vectorCheck(String s, Vector v) +/* */ { +/* 79 */ Enumeration e = v.elements(); +/* 80 */ while (e.hasMoreElements()) +/* */ { +/* 82 */ String element = (String)e.nextElement(); +/* 83 */ if (s.toLowerCase().endsWith(element.toLowerCase())) +/* 84 */ return true; +/* 85 */ if (element.equals("any")) +/* 86 */ return true; +/* */ } +/* 88 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean buildActionMenu(Menu m, Shape target) +/* */ { +/* 97 */ assert (m != null); +/* */ +/* */ +/* 100 */ if (this._currentAction != null) { return false; +/* */ } +/* */ +/* */ +/* 104 */ SuperRoot ultimateOwner = target; +/* 105 */ while (ultimateOwner.getOwner() != null) +/* */ { +/* 107 */ ultimateOwner = ultimateOwner.getOwner(); +/* 108 */ if ((ultimateOwner instanceof PosableShape)) +/* */ { +/* 110 */ target = (Shape)ultimateOwner; +/* 111 */ break; +/* */ } +/* */ } +/* */ +/* */ +/* 116 */ Pilot p = Pilot.getActive(); +/* 117 */ if (p == null) return false; +/* 118 */ if (!(p instanceof HoloPilot)) return false; +/* 119 */ HoloPilot hp = (HoloPilot)p; +/* */ +/* */ +/* */ +/* 123 */ if (hp.getInternalDrone().getRoom() != target.getRoom()) +/* */ { +/* */ +/* 126 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* 131 */ Vector v = getActionList(hp.getInternalDrone() +/* 132 */ .getCurrentURL(), target.getURL()); +/* */ +/* 134 */ this.currentMenuActions = v; +/* */ +/* 136 */ if (v == null) return false; +/* 137 */ if (v.size() == 0) { return false; +/* */ } +/* 139 */ Enumeration e = v.elements(); +/* 140 */ while (e.hasMoreElements()) +/* */ { +/* 142 */ AnimatedAction a = (AnimatedAction)e.nextElement(); +/* 143 */ a.setTargetShape(target); +/* */ +/* 145 */ int idx = a.actionName.indexOf("\\"); +/* */ +/* 147 */ if (idx != -1) +/* */ { +/* 149 */ String action = a.actionName.substring(idx + 1); +/* */ +/* 151 */ String submenu = a.actionName.substring(0, idx); +/* 152 */ int items = m.getItemCount(); +/* 153 */ boolean inserted = false; +/* 154 */ for (int i = 0; i < items; i++) +/* */ { +/* 156 */ MenuItem item = m.getItem(i); +/* 157 */ if (item.getLabel().equals(submenu)) +/* */ { +/* 159 */ if ((item instanceof Menu)) +/* */ { +/* 161 */ ((Menu)item).add(action); +/* */ +/* 163 */ inserted = true; +/* 164 */ break; +/* */ } +/* */ } +/* */ } +/* 168 */ if (!inserted) +/* */ { +/* 170 */ Menu sm = new Menu(submenu); +/* 171 */ sm.addActionListener(this); +/* 172 */ sm.add(action); +/* 173 */ m.add(sm); +/* */ } +/* */ } +/* */ else +/* */ { +/* 178 */ m.add(a.actionName); +/* */ } +/* */ } +/* */ +/* 182 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean processMenuClick(String actionName) +/* */ { +/* 189 */ if (this.currentMenuActions == null) { return false; +/* */ } +/* 191 */ Enumeration e = this.currentMenuActions.elements(); +/* 192 */ while (e.hasMoreElements()) +/* */ { +/* 194 */ AnimatedAction a = (AnimatedAction)e.nextElement(); +/* 195 */ String thisAction = a.actionName; +/* 196 */ int idx = thisAction.indexOf('\\'); +/* 197 */ if (idx != -1) +/* */ { +/* 199 */ thisAction = thisAction.substring(idx + 1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 205 */ if (thisAction.equals(actionName)) +/* */ { +/* 207 */ Pilot p = Pilot.getActive(); +/* 208 */ if (p == null) return false; +/* 209 */ if (!(p instanceof HoloPilot)) return false; +/* 210 */ HoloPilot hp = (HoloPilot)p; +/* */ +/* 212 */ if (this._currentAction != null) +/* */ { +/* 214 */ this._currentAction.abort(); +/* */ } +/* 216 */ this._currentAction = a; +/* */ +/* 218 */ a.execute(hp); +/* 219 */ return true; +/* */ } +/* */ } +/* */ +/* 223 */ return false; +/* */ } +/* */ +/* */ +/* 227 */ private AnimatedAction _currentAction = null; +/* */ static final String actionFile = "actions/actions.dat"; +/* */ +/* */ public void actionCompleted(AnimatedAction a) { +/* 231 */ assert (a == this._currentAction); +/* 232 */ this._currentAction = null; +/* */ } +/* */ +/* */ static final String localActionFile = "actions.dat"; +/* */ static final String version = "VERSION"; +/* */ public void actionPerformed(ActionEvent e) { +/* 238 */ processMenuClick(e.getActionCommand()); +/* */ } +/* */ +/* */ static final String action = "ACTION"; +/* */ private Vector actionList; +/* */ private Vector currentMenuActions; +/* */ private AnimatedActionManager() +/* */ { +/* 246 */ System.out.println("Loading action manager"); +/* 247 */ this.actionList = new Vector(); +/* */ +/* 249 */ loadActionsFile(); +/* */ } +/* */ +/* */ +/* */ private void loadActionsFile() +/* */ { +/* 255 */ File f = new File("actions.dat"); +/* 256 */ if (f.exists()) { parseActionFile("actions.dat"); +/* */ } +/* */ +/* 259 */ String serv = NetUpdate.getUpgradeServerURL(); +/* 260 */ String s = IniFile.override().getIniString("actionFile", +/* 261 */ "actions/actions.dat"); +/* 262 */ BackgroundLoader.get(this, URL.make(serv + s)); +/* */ } +/* */ +/* */ +/* */ public synchronized Object asyncBackgroundLoad(String localName, URL remoteURL) +/* */ { +/* 268 */ return localName; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) { +/* 272 */ System.out.println("Got actions file "); +/* 273 */ String localName = (String)obj; +/* 274 */ if ((localName != null) && (new File(localName).exists())) +/* */ { +/* 276 */ parseActionFile(localName); +/* */ } +/* 278 */ return false; +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() { +/* 282 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private String getLine(RandomAccessFile fIn) +/* */ throws IOException +/* */ { +/* 290 */ while (fIn.getFilePointer() < fIn.length()) +/* */ { +/* 292 */ String line = fIn.readLine().trim(); +/* 293 */ if (line == null) return null; +/* 294 */ if ((!line.startsWith("//")) && +/* 295 */ (line.length() != 0)) +/* */ { +/* 297 */ return line; +/* */ } +/* */ } +/* 300 */ return null; +/* */ } +/* */ +/* */ +/* */ private void parseActionFile(String fileName) +/* */ { +/* 306 */ int verNum = 0; +/* */ +/* 308 */ assert (this.actionList != null); +/* 309 */ this.actionList.removeAllElements(); +/* */ +/* */ try +/* */ { +/* 313 */ RandomAccessFile fIn = new RandomAccessFile(fileName, +/* 314 */ "r"); +/* */ +/* */ String line; +/* 317 */ while ((line = getLine(fIn)) != null) { +/* */ String line; +/* 319 */ StringTokenizer tok = new StringTokenizer(line); +/* */ +/* 321 */ String firstWord = tok.nextToken(); +/* 322 */ if (firstWord.equals("VERSION")) +/* */ { +/* 324 */ String ver = tok.nextToken(); +/* 325 */ if (ver.equals("1")) { +/* 326 */ verNum = 1; +/* 327 */ } else if (ver.equals("2")) { +/* 328 */ verNum = 2; +/* */ } else { +/* 330 */ throw new Exception("Bad version."); +/* */ } +/* 332 */ } else if (firstWord.equals("ACTION")) +/* */ { +/* 334 */ if (verNum == 0) { +/* 335 */ throw new Exception("Actions file version not specified."); +/* */ } +/* 337 */ AnimatedAction a = new AnimatedAction(); +/* 338 */ a.actionName = line.substring("ACTION".length() + 1); +/* 339 */ readVector(fIn, a.avatarNames); +/* 340 */ readVector(fIn, a.targetObjects); +/* 341 */ if (verNum > 1) +/* */ { +/* 343 */ a.consentRequired = getLine(fIn) +/* 344 */ .toLowerCase().equals("consent"); +/* */ } +/* 346 */ StringTokenizer tok2 = new StringTokenizer( +/* 347 */ getLine(fIn)); +/* 348 */ Float x = new Float(tok2.nextToken()); +/* 349 */ Float y = new Float(tok2.nextToken()); +/* 350 */ a.targetRelPosition = new Point2( +/* 351 */ x.floatValue(), y.floatValue()); +/* 352 */ Float yaw = new Float(getLine(fIn)); +/* 353 */ a.targetRelYaw = yaw.floatValue(); +/* 354 */ a.preAnimationAction = +/* 355 */ AnimatedAction.getAction(getLine(fIn)); +/* 356 */ a.preAnimationParameter = getLine(fIn); +/* 357 */ a.actionName1 = getLine(fIn); +/* 358 */ if (verNum > 1) +/* */ { +/* 360 */ a.simultaneousAction = +/* 361 */ AnimatedAction.getAction(getLine(fIn)); +/* 362 */ a.simultaneousParameter = getLine(fIn); +/* */ } +/* 364 */ a.postAnimationAction = +/* 365 */ AnimatedAction.getAction(getLine(fIn)); +/* 366 */ a.postAnimationParameter = getLine(fIn); +/* 367 */ a.actionName2 = getLine(fIn); +/* 368 */ this.actionList.addElement(a); +/* */ } +/* */ } +/* */ +/* 372 */ fIn.close(); +/* */ } +/* */ catch (Exception e) +/* */ { +/* 376 */ System.out.println("Error reading actions.dat: " + +/* 377 */ e.toString()); +/* */ } +/* */ } +/* */ +/* */ private void readVector(RandomAccessFile fIn, Vector v) throws IOException +/* */ { +/* 383 */ String line = getLine(fIn); +/* 384 */ StringTokenizer tok = new StringTokenizer(line); +/* */ +/* 386 */ while (tok.hasMoreTokens()) +/* */ { +/* 388 */ v.addElement(tok.nextToken()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 394 */ private static AnimatedActionManager theAnimatedActionManager = null; +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatedActionManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AnimatingDoor.java b/NET/worlds/scape/AnimatingDoor.java new file mode 100644 index 0000000..9007d0b --- /dev/null +++ b/NET/worlds/scape/AnimatingDoor.java @@ -0,0 +1,414 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.net.MalformedURLException; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AnimatingDoor +/* */ extends Portal +/* */ implements FrameHandler +/* */ { +/* */ public AnimatingDoor() +/* */ { +/* 36 */ this.flags |= 0x40040; +/* */ } +/* */ +/* */ +/* 40 */ public String frameList = ""; +/* 41 */ protected transient Material[] frames = null; +/* 42 */ float perFrame = 100.0F; +/* */ +/* */ private URL openSound; +/* */ +/* */ private URL closeSound; +/* */ private transient float state; +/* */ private transient int lastUpdate; +/* */ private transient boolean wasSameRoom; +/* 50 */ private transient int lastFrame = -1; +/* */ +/* 52 */ private Point3 start = new Point3(-0.5F, -1.0F, 0.0F); +/* 53 */ private Point3 end = new Point3(1.5F, 0.0F, 1.0F); +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 59 */ if (this.frames != null) { +/* 60 */ int i = this.frames.length; +/* 61 */ do { this.frames[i].setKeepLoaded(false);i--; +/* 60 */ } while (i >= 0); +/* */ +/* 62 */ this.frames = null; +/* */ } +/* 64 */ super.detach(); +/* */ } +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 69 */ Pilot pilot = Pilot.getActive(); +/* 70 */ Room pilotRoom = pilot.getRoom(); +/* 71 */ boolean sameRoom = pilotRoom == getRoom(); +/* 72 */ boolean inRange = false; +/* 73 */ Point3Temp pos = pilot.getPosition(); +/* */ +/* 75 */ if (sameRoom) +/* */ { +/* 77 */ BoundBoxTemp bbt = BoundBoxTemp.make( +/* 78 */ Point3Temp.make(this.start).times(this), +/* 79 */ Point3Temp.make(this.end).times(this)); +/* */ +/* 81 */ inRange = bbt.contains(pos); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 92 */ Portal far = farSide(); +/* 93 */ if ((far != null) && ((far instanceof AnimatingDoor))) { +/* 94 */ AnimatingDoor afar = (AnimatingDoor)far; +/* */ +/* */ +/* 97 */ if (!inRange) { +/* 98 */ Room farRoom = afar.getRoom(); +/* 99 */ if (farRoom == null) { +/* 100 */ animate(sameRoom, inRange); +/* 101 */ return true; +/* */ } +/* */ +/* 104 */ if (afar.getRoom() == pilotRoom) { +/* 105 */ if (!sameRoom) +/* */ { +/* */ +/* 108 */ return true; +/* */ } +/* */ +/* */ +/* 112 */ BoundBoxTemp bbt = BoundBoxTemp.make( +/* 113 */ Point3Temp.make(afar.start).times(afar), +/* 114 */ Point3Temp.make(afar.end).times(afar)); +/* */ +/* 116 */ inRange = bbt.contains(pos); +/* */ } +/* */ } +/* */ +/* 120 */ afar.animate(sameRoom, inRange); +/* */ } +/* */ +/* 123 */ animate(sameRoom, inRange); +/* */ +/* 125 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void animate(boolean sameRoom, boolean inRange) +/* */ { +/* 133 */ int now = Std.getFastTime(); +/* 134 */ float oldState = this.state; +/* */ +/* */ +/* 137 */ if (this.frames == null) { +/* 138 */ this.frames = namesToMaterialArray(this, this.frameList); +/* 139 */ this.lastFrame = -1; +/* */ } +/* */ +/* 142 */ int numMovingFrames = this.frames.length - 2; +/* 143 */ boolean wasSameRoom = this.wasSameRoom; +/* 144 */ this.wasSameRoom = sameRoom; +/* */ +/* 146 */ if (!sameRoom) +/* */ { +/* 148 */ this.state = 0.0F; +/* 149 */ } else if (!wasSameRoom) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 156 */ this.state = (inRange ? 1.0F : 0.0F); +/* 157 */ } else if (this.state == 0.0F) { +/* 158 */ if (!inRange) { +/* 159 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 164 */ this.state = 1.0E-4F; +/* 165 */ } else if (this.state == 1.0F) { +/* 166 */ if (inRange) { +/* 167 */ return; +/* */ } +/* */ +/* 170 */ playSound(this.closeSound); +/* */ +/* 172 */ this.state = 0.999F; +/* */ } else { +/* 174 */ if ((this.state == 1.0E-4F) && (inRange)) { +/* 175 */ if (active()) +/* */ { +/* 177 */ playSound(this.openSound); +/* 178 */ this.state = 2.0E-4F; +/* */ } +/* */ else { +/* 181 */ this.lastUpdate = now; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 187 */ float totalTime = numMovingFrames * this.perFrame; +/* 188 */ if ((totalTime > 0.0F) && (now != this.lastUpdate)) { +/* 189 */ float distMoved = (now - this.lastUpdate) / totalTime; +/* 190 */ if (inRange) { +/* 191 */ if (this.state += distMoved >= 1.0F) { +/* 192 */ this.state = 1.0F; +/* */ } +/* 194 */ } else if (this.state -= distMoved <= 0.0F) { +/* 195 */ this.state = 0.0F; +/* */ } +/* */ } +/* */ } +/* */ +/* 200 */ if ((oldState != 0.0F) && (this.state == 0.0F)) +/* */ { +/* 202 */ this.flags |= 0x40000; +/* 203 */ reset(); +/* 204 */ } else if ((oldState == 0.0F) && (this.state != 0.0F)) +/* */ { +/* 206 */ this.flags &= 0xFFFBFFFF; +/* 207 */ reset(); +/* */ +/* */ +/* 210 */ triggerLoad(); +/* */ } +/* */ +/* 213 */ this.lastUpdate = now; +/* */ +/* */ +/* 216 */ int frame = 0; +/* */ +/* 218 */ if (numMovingFrames >= 0) { +/* 219 */ if (this.state <= 2.0E-4F) { +/* 220 */ frame = 0; +/* 221 */ } else if (this.state == 1.0F) { +/* 222 */ frame = numMovingFrames + 1; +/* */ } else +/* 224 */ frame = 1 + (int)(this.state * numMovingFrames); +/* 225 */ } else if (numMovingFrames == -2) { +/* 226 */ return; +/* */ } +/* 228 */ setFrame(frame); +/* */ } +/* */ +/* */ private void setFrame(int frame) { +/* 232 */ if ((frame != this.lastFrame) && (this.frames != null) && (this.frames.length > frame)) +/* */ { +/* 234 */ setMaterial(this.frames[frame]); +/* 235 */ this.lastFrame = frame; +/* */ } +/* */ } +/* */ +/* */ +/* */ private void playSound(URL url) +/* */ { +/* 242 */ if ((url == null) || (getRoom() != Pilot.getActive().getRoom())) { +/* 243 */ return; +/* */ } +/* 245 */ WavSoundPlayer wavPlayer = new WavSoundPlayer(null); +/* 246 */ wavPlayer.open(1.0F, 0.0F, false, false); +/* 247 */ wavPlayer.start(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Material[] namesToMaterialArray(SuperRoot base, String str) +/* */ { +/* 257 */ Vector v = new Vector(); +/* 258 */ StringTokenizer st = new StringTokenizer(str); +/* 259 */ while (st.hasMoreTokens()) { +/* 260 */ v.addElement(st.nextToken()); +/* */ } +/* */ +/* 263 */ int count = v.size(); +/* */ +/* 265 */ Material[] mats = new Material[count]; +/* 266 */ int i = count; +/* 267 */ do { String s = (String)v.elementAt(i); +/* */ URL url; +/* */ try { +/* 270 */ url = new URL(base, s); +/* */ } catch (MalformedURLException e) { URL url; +/* 272 */ url = URL.make("error:\"" + s + '"'); +/* */ } +/* 274 */ mats[i] = new Material(url); +/* */ +/* */ +/* */ +/* 278 */ mats[i].setKeepLoaded(true);i--; +/* 266 */ } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 281 */ return mats; +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 288 */ Object ret = null; +/* 289 */ switch (index - offset) { +/* */ case 0: +/* 291 */ if (mode == 0) { +/* 292 */ ret = StringPropertyEditor.make( +/* 293 */ new Property(this, index, "Frame List")); +/* 294 */ } else if (mode == 1) { +/* 295 */ ret = this.frameList; +/* 296 */ } else if (mode == 2) { +/* 297 */ this.frameList = ((String)value).toString().trim(); +/* 298 */ this.frames = null; +/* */ } +/* 300 */ break; +/* */ case 1: +/* 302 */ if (mode == 0) { +/* 303 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 304 */ "Start")); +/* 305 */ } else if (mode == 1) { +/* 306 */ ret = new Point3(this.start); +/* 307 */ } else if (mode == 2) +/* 308 */ this.start = ((Point3)value); +/* 309 */ break; +/* */ case 2: +/* 311 */ if (mode == 0) { +/* 312 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 313 */ "End")); +/* 314 */ } else if (mode == 1) { +/* 315 */ ret = new Point3(this.end); +/* 316 */ } else if (mode == 2) +/* 317 */ this.end = ((Point3)value); +/* 318 */ break; +/* */ case 3: +/* 320 */ if (mode == 0) { +/* 321 */ ret = FloatPropertyEditor.make( +/* 322 */ new Property(this, index, "Time Per Frame")); +/* 323 */ } else if (mode == 1) { +/* 324 */ ret = new Float(this.perFrame); +/* 325 */ } else if (mode == 2) +/* 326 */ this.perFrame = ((Float)value).floatValue(); +/* 327 */ break; +/* */ case 4: +/* 329 */ if (mode == 0) { +/* 330 */ ret = URLPropertyEditor.make( +/* 331 */ new Property(this, index, "Open Sound URL") +/* 332 */ .allowSetNull(), +/* 333 */ "wav;mid;ram;ra;rm"); +/* 334 */ } else if (mode == 1) { +/* 335 */ ret = this.openSound; +/* 336 */ } else if (mode == 2) +/* 337 */ this.openSound = ((URL)value); +/* 338 */ break; +/* */ case 5: +/* 340 */ if (mode == 0) { +/* 341 */ ret = URLPropertyEditor.make( +/* 342 */ new Property(this, index, "Close Sound URL") +/* 343 */ .allowSetNull(), +/* 344 */ "wav;mid;ram;ra;rm"); +/* 345 */ } else if (mode == 1) { +/* 346 */ ret = this.closeSound; +/* 347 */ } else if (mode == 2) +/* 348 */ this.closeSound = ((URL)value); +/* 349 */ break; +/* */ default: +/* 351 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 353 */ return ret; +/* */ } +/* */ +/* */ +/* 357 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 361 */ setFrame(0); +/* */ +/* 363 */ s.saveVersion(0, classCookie); +/* 364 */ int f = this.flags; +/* 365 */ this.flags |= 0x40000; +/* 366 */ super.saveState(s); +/* 367 */ this.flags = f; +/* */ +/* 369 */ s.saveString(this.frameList); +/* 370 */ s.saveFloat(this.perFrame); +/* 371 */ s.save(this.start); +/* 372 */ s.save(this.end); +/* 373 */ URL.save(s, this.openSound); +/* 374 */ URL.save(s, this.closeSound); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 378 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 380 */ super.restoreState(r); +/* 381 */ this.frameList = r.restoreString(); +/* 382 */ this.perFrame = r.restoreFloat(); +/* 383 */ this.start = ((Point3)r.restore()); +/* 384 */ this.end = ((Point3)r.restore()); +/* 385 */ this.openSound = URL.restore(r); +/* 386 */ this.closeSound = URL.restore(r); +/* 387 */ break; +/* */ +/* */ default: +/* 390 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AnimatingDoor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Animation.java b/NET/worlds/scape/Animation.java new file mode 100644 index 0000000..bd6c86f --- /dev/null +++ b/NET/worlds/scape/Animation.java @@ -0,0 +1,357 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.net.MalformedURLException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Date; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Animation +/* */ extends TriggeredSwitchableBehavior +/* */ implements FrameHandler, Persister, MouseDownHandler, BumpHandler +/* */ { +/* */ long startFrameTime; +/* */ protected float cycleTime; +/* */ protected String frameList; +/* */ protected int cycles; +/* 33 */ protected int cycleNo = 0; +/* */ +/* */ protected String[] frameListArray; +/* */ +/* */ protected Material[] frameMaterialArray; +/* */ +/* */ protected int frameListCount; +/* */ +/* */ protected int currentFrameNo; +/* */ +/* 43 */ protected boolean animationEnd = true; +/* */ +/* */ +/* */ public Animation() +/* */ { +/* 48 */ this.cycleTime = 1000.0F; +/* 49 */ this.frameList = new String(""); +/* 50 */ this.trigger = new String("none"); +/* 51 */ this.externalTriggerTag = new String(""); +/* 52 */ this.cycles = 0; +/* 53 */ this.frameListArray = new String['È']; +/* 54 */ this.frameMaterialArray = new Material['È']; +/* 55 */ this.frameListCount = 0; +/* */ +/* 57 */ startAnimation(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void ExternalTrigger(Trigger trigger_source, int sequence_no, int event_no) +/* */ { +/* 65 */ this.trigger_source = trigger_source; +/* 66 */ this.sequence_no = sequence_no; +/* 67 */ this.event_no = event_no; +/* 68 */ startAnimation(); +/* */ } +/* */ +/* */ +/* */ public void startAnimation() +/* */ { +/* 74 */ Date timer = new Date(); +/* 75 */ this.startFrameTime = timer.getTime(); +/* 76 */ this.cycleNo = 0; +/* 77 */ this.currentFrameNo = 0; +/* 78 */ this.animationEnd = false; +/* */ } +/* */ +/* 81 */ public float getCycleTime() { return this.cycleTime; } +/* 82 */ public void setCycleTime(float t) { this.cycleTime = t; } +/* */ +/* */ public int getNextFrameNo() +/* */ { +/* 86 */ Date timer = new Date(); +/* 87 */ int nextFrameNo = 0; +/* */ +/* 89 */ if (this.frameListCount > 0) { +/* 90 */ nextFrameNo = (int)(this.frameListCount * ( +/* 91 */ (float)(timer.getTime() - this.startFrameTime) % this.cycleTime) / (this.cycleTime + 1.0F) + 1.0F); +/* 92 */ if (this.currentFrameNo > nextFrameNo) { +/* 93 */ this.cycleNo += 1; +/* */ } +/* */ } +/* */ +/* */ +/* 98 */ return nextFrameNo; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void preprocessFrameList(String frameList) +/* */ { +/* 114 */ int currentIndex = 1; +/* 115 */ int currentSeparator = 0;int nextSeparator = 0; +/* 116 */ int lastSeparator = frameList.lastIndexOf(" "); +/* */ +/* 118 */ if ((lastSeparator != -1) || (frameList.length() != 0)) +/* */ { +/* */ +/* */ +/* 122 */ if (lastSeparator == -1) +/* */ { +/* 124 */ this.frameListArray[currentIndex] = frameList; +/* */ } +/* */ else { +/* 127 */ nextSeparator = frameList.indexOf(" "); +/* */ +/* 129 */ this.frameListArray[currentIndex] = frameList.substring(0, +/* 130 */ nextSeparator); +/* 131 */ currentIndex++; +/* */ +/* 133 */ while (nextSeparator != lastSeparator) { +/* 134 */ currentSeparator = nextSeparator; +/* 135 */ nextSeparator = frameList.indexOf(" ", currentSeparator + 1); +/* 136 */ this.frameListArray[currentIndex] = frameList.substring( +/* 137 */ currentSeparator + 1, nextSeparator); +/* 138 */ currentIndex++; +/* */ } +/* */ +/* 141 */ this.frameListArray[currentIndex] = frameList.substring( +/* 142 */ nextSeparator + 1); +/* 143 */ this.frameListCount = currentIndex; +/* */ } +/* */ } +/* */ +/* */ +/* 148 */ for (currentIndex = 1; currentIndex <= this.frameListCount; currentIndex++) { +/* 149 */ String s = this.frameListArray[currentIndex]; +/* */ URL url; +/* */ try { +/* 152 */ url = new URL(this, s); +/* */ } catch (MalformedURLException e) { URL url; +/* 154 */ url = URL.make("error:\"" + s + '"'); +/* */ } +/* 156 */ this.frameMaterialArray[currentIndex] = new Material(url); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 168 */ if (this.enabled) +/* */ { +/* 170 */ if ((e.receiver instanceof Rect)) { +/* 171 */ int nextFrameNo = getNextFrameNo(); +/* 172 */ if ((this.cycleNo < this.cycles) || (this.cycles == 0)) { +/* 173 */ if ((nextFrameNo > 0) && (nextFrameNo != this.currentFrameNo)) { +/* 174 */ this.currentFrameNo = nextFrameNo; +/* 175 */ Rect Wall = (Rect)e.receiver; +/* 176 */ Wall.setMaterial(this.frameMaterialArray[this.currentFrameNo]); +/* */ } +/* */ +/* */ } +/* 180 */ else if (this.currentFrameNo != this.frameListCount) { +/* 181 */ Rect Wall = (Rect)e.receiver; +/* 182 */ Wall.setMaterial(this.frameMaterialArray[this.frameListCount]); +/* 183 */ this.currentFrameNo = this.frameListCount; +/* */ } +/* */ +/* 186 */ if ((this.cycleNo >= this.cycles) && (this.cycles != 0) && (!this.animationEnd)) { +/* 187 */ this.animationEnd = true; +/* 188 */ if (this.trigger_source != null) { +/* 189 */ this.trigger_source.registerFinishedTriggerTag(this.sequence_no, +/* 190 */ this.event_no); +/* */ } +/* */ } +/* */ } +/* */ } +/* 195 */ return true; +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 200 */ if ((this.enabled) && +/* 201 */ (this.trigger.equals("click"))) { +/* 202 */ startAnimation(); +/* */ } +/* */ +/* 205 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 210 */ if ((this.enabled) && +/* 211 */ (this.trigger.equals("bump"))) { +/* 212 */ startAnimation(); +/* */ } +/* */ +/* 215 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 224 */ Object ret = null; +/* 225 */ switch (index - offset) { +/* */ case 0: +/* 227 */ if (mode == 0) +/* 228 */ ret = new ClassProperty(this, index, "Animation"); +/* 229 */ break; +/* */ case 1: +/* 231 */ if (mode == 0) { +/* 232 */ ret = FloatPropertyEditor.make( +/* 233 */ new Property(this, index, "Cycle Time")); +/* 234 */ } else if (mode == 1) { +/* 235 */ ret = new Float(this.cycleTime); +/* 236 */ } else if (mode == 2) +/* 237 */ this.cycleTime = ((Float)value).floatValue(); +/* 238 */ break; +/* */ case 2: +/* 240 */ if (mode == 0) { +/* 241 */ ret = IntegerPropertyEditor.make( +/* 242 */ new Property(this, index, "Cycles")); +/* 243 */ } else if (mode == 1) { +/* 244 */ ret = new Integer(this.cycles); +/* 245 */ } else if (mode == 2) +/* 246 */ this.cycles = ((Integer)value).intValue(); +/* 247 */ break; +/* */ case 3: +/* 249 */ if (mode == 0) { +/* 250 */ ret = StringPropertyEditor.make( +/* 251 */ new Property(this, index, "Trigger")); +/* 252 */ } else if (mode == 1) { +/* 253 */ ret = new String(this.trigger); +/* 254 */ } else if (mode == 2) { +/* 255 */ this.trigger = ((String)value).toString().trim(); +/* 256 */ if (this.trigger.equals("external")) { +/* 257 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 258 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 259 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ } +/* */ +/* 263 */ break; +/* */ case 4: +/* 265 */ if (mode == 0) { +/* 266 */ ret = StringPropertyEditor.make( +/* 267 */ new Property(this, index, "External Trigger Tag")); +/* 268 */ } else if (mode == 1) { +/* 269 */ ret = new String(this.externalTriggerTag); +/* 270 */ } else if (mode == 2) { +/* 271 */ this.externalTriggerTag = ((String)value).toString().trim(); +/* */ } +/* 273 */ break; +/* */ case 5: +/* 275 */ if (mode == 0) { +/* 276 */ ret = StringPropertyEditor.make( +/* 277 */ new Property(this, index, "Frame List")); +/* 278 */ } else if (mode == 1) { +/* 279 */ ret = new String(this.frameList); +/* 280 */ } else if (mode == 2) { +/* 281 */ this.frameList = ((String)value).toString().trim().toLowerCase(); +/* 282 */ preprocessFrameList(this.frameList); +/* */ } +/* 284 */ break; +/* */ default: +/* 286 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 288 */ if (mode == 2) +/* */ { +/* 290 */ if (this.trigger.equals("none")) { +/* 291 */ startAnimation(); +/* */ } +/* */ } +/* 294 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 299 */ return +/* */ +/* */ +/* 302 */ "Animation: cycleTime " + this.cycleTime + ", cycles " + this.cycles + ", enabled " + this.enabled + ", trigger " + this.trigger + ", externalTriggerTag " + this.externalTriggerTag + ", frameList " + this.frameList; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 308 */ s.saveFloat(this.cycleTime); +/* 309 */ s.saveInt(this.cycles); +/* 310 */ s.saveString(this.trigger); +/* 311 */ s.saveString(this.externalTriggerTag); +/* 312 */ s.saveString(this.frameList); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 318 */ this.cycleTime = r.restoreFloat(); +/* 319 */ this.cycles = r.restoreInt(); +/* 320 */ this.trigger = r.restoreString(); +/* 321 */ if (this.trigger.equals("external")) { +/* 322 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 323 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 324 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* 326 */ this.externalTriggerTag = r.restoreString(); +/* 327 */ if (!this.trigger.equals("none")) { +/* 328 */ this.cycleNo = this.cycles; +/* */ } else { +/* 330 */ startAnimation(); +/* */ } +/* 332 */ this.frameList = r.restoreString(); +/* 333 */ preprocessFrameList(this.frameList); +/* */ } +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 339 */ String name = getName(); +/* 340 */ String arg1 = name == null ? "" : name; +/* 341 */ SuperRoot owner = getOwner(); +/* 342 */ String oname = ""; +/* 343 */ if (owner != null) { +/* 344 */ oname = owner.getName(); +/* */ } +/* 346 */ String arg2 = oname == null ? "" : oname; +/* 347 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 348 */ Console.println(MessageFormat.format( +/* 349 */ Console.message("Animation-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Animation.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Attribute.java b/NET/worlds/scape/Attribute.java new file mode 100644 index 0000000..ca1c4b6 --- /dev/null +++ b/NET/worlds/scape/Attribute.java @@ -0,0 +1,740 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.InfiniteWaitException; +/* */ import NET.worlds.network.NetworkObject; +/* */ import NET.worlds.network.NetworkRoom; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.PacketTooLargeException; +/* */ import NET.worlds.network.WorldServer; +/* */ import NET.worlds.network.propReqCmd; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class Attribute +/* */ extends Sensor +/* */ { +/* 116 */ public int _shorthandVersion = getMaxShorthandVersion(); +/* */ int _attrID; +/* */ byte[] _serverData; +/* */ boolean _waitingForFeedback; +/* */ +/* */ public int getMaxShorthandVersion() +/* */ { +/* 123 */ return 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void load(LoadedAttribute callback) +/* */ { +/* 138 */ if (this.loaded) { +/* 139 */ if (callback != null) +/* 140 */ callback.loadedAttribute(this, null); +/* 141 */ return; +/* */ } +/* */ +/* */ +/* 145 */ Sharer s = (Sharer)getOwner(); +/* 146 */ if ((s == null) || (!s.isShared())) { +/* 147 */ if (callback != null) +/* 148 */ callback.loadedAttribute(this, "unshared"); +/* 149 */ return; +/* */ } +/* */ +/* 152 */ if (callback != null) { +/* 153 */ if (this.callbacks == null) +/* 154 */ this.callbacks = new Vector(); +/* 155 */ this.callbacks.addElement(callback); +/* */ } +/* */ +/* */ +/* 159 */ Attribute f = getForwardAttribute(); +/* 160 */ if (f != null) +/* */ { +/* */ +/* 163 */ f.load(null); +/* 164 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 170 */ assert ((s.getMode() & 0x1) == 0); +/* */ +/* 172 */ Object served = s.getOwner(); +/* */ try { String id; +/* */ WorldServer servr; +/* */ String id; +/* 176 */ if ((served instanceof Room)) { +/* 177 */ WorldServer servr = ((Room)served).getServer(); +/* 178 */ id = ((Room)served).getNetworkRoom().getLongID(); +/* */ } else { +/* 180 */ servr = ((NetworkObject)served).getServer(); +/* 181 */ id = ((NetworkObject)served).getLongID(); +/* */ } +/* 183 */ servr.sendNetworkMsg(new propReqCmd(new ObjID(id), this._attrID)); +/* */ } +/* */ catch (InfiniteWaitException localInfiniteWaitException) {}catch (PacketTooLargeException e) { +/* 186 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getAttrID() +/* */ { +/* 213 */ return this._attrID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Attribute(int attrID) +/* */ { +/* 222 */ this._attrID = attrID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Attribute() {} +/* */ +/* */ +/* */ +/* */ public void setAttrID(int newID) +/* */ { +/* 234 */ flushBuffers(); +/* */ +/* 236 */ Sharer sharer = (Sharer)getOwner(); +/* 237 */ if (sharer == null) { +/* 238 */ this._attrID = newID; +/* */ } else { +/* 240 */ sharer.resetAttributeID(this, newID); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void flushBuffers() +/* */ { +/* 266 */ this._serverData = null; +/* 267 */ this._waitingForFeedback = false; +/* 268 */ this._outgoing = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ byte[] _outgoing; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean loaded; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Vector callbacks; +/* */ +/* */ +/* */ +/* */ +/* */ private Attribute _to; +/* */ +/* */ +/* */ +/* */ +/* 298 */ private int _storedForwardAttrID = -1; +/* */ +/* */ +/* */ +/* */ +/* */ public int getForwardAttrID() +/* */ { +/* 305 */ if (this._to != null) { +/* 306 */ return this._to._attrID; +/* */ } +/* 308 */ return this._storedForwardAttrID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void unforward() +/* */ { +/* 316 */ if (this._to != null) { +/* 317 */ this._storedForwardAttrID = this._to.getAttrID(); +/* */ +/* 319 */ Sharer s = (Sharer)this._to.getOwner(); +/* 320 */ if (s != null) +/* 321 */ s.removeAttribute(this._to); +/* */ } +/* 323 */ flushBuffers(); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean isForwarded() +/* */ { +/* 330 */ return this._to != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Attribute getForwardAttribute() +/* */ { +/* 338 */ return this._to; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setForwardAttrID(int newID) +/* */ { +/* 351 */ if (this._to != null) { +/* 352 */ this._to.setAttrID(newID); +/* */ } else { +/* 354 */ this._storedForwardAttrID = newID; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void noteChange() +/* */ { +/* 372 */ Sharer sharer = (Sharer)getOwner(); +/* 373 */ if (sharer == null) { +/* 374 */ return; +/* */ } +/* */ +/* 377 */ sharer.noteChange(this, this.actions.size() > 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addForwarding() +/* */ { +/* 392 */ if (isForwarded()) { +/* 393 */ return; +/* */ } +/* 395 */ Sharer s = (Sharer)getOwner(); +/* 396 */ assert (((WObject)s.getOwner()).getSharerMode() == 3); +/* */ +/* */ +/* 399 */ WObject terminal = ((WObject)s.getOwner()).getServed(); +/* 400 */ if (terminal == null) { +/* 401 */ return; +/* */ } +/* */ +/* 404 */ if (getOwner().getOwner() == terminal) { +/* 405 */ return; +/* */ } +/* 407 */ ForwardAttribute fwd = new ForwardAttribute(this, this._storedForwardAttrID); +/* 408 */ terminal.addShareableAttribute(fwd); +/* 409 */ this._to = fwd; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract void generateNetData(DataOutputStream paramDataOutputStream) +/* */ throws IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract void setFromNetData(DataInputStream paramDataInputStream, int paramInt) +/* */ throws IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 446 */ super.detach(); +/* */ +/* 448 */ unforward(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 456 */ protected int _propertyFlags = 208; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getFlags() +/* */ { +/* 464 */ return this._propertyFlags; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setFlag(int flag, boolean onoff) +/* */ { +/* 471 */ if (onoff) { +/* 472 */ this._propertyFlags |= flag; +/* */ } else { +/* 474 */ this._propertyFlags &= (flag ^ 0xFFFFFFFF); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void setFinger(boolean onoff) +/* */ { +/* 482 */ setFlag(32, onoff); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getFinger() +/* */ { +/* 489 */ return (getFlags() & 0x20) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setAutoUpdate(boolean onoff) +/* */ { +/* 497 */ setFlag(64, onoff); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getAutoUpdate() +/* */ { +/* 504 */ return (getFlags() & 0x40) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setDatabase(boolean onoff) +/* */ { +/* 512 */ setFlag(128, onoff); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getDatabase() +/* */ { +/* 519 */ return (getFlags() & 0x80) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setBinary(boolean onoff) +/* */ { +/* 527 */ setFlag(16, onoff); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getBinary() +/* */ { +/* 534 */ return (getFlags() & 0x10) != 0; +/* */ } +/* */ +/* */ +/* 538 */ protected int _accessFlags = 0; +/* */ +/* */ +/* */ +/* */ +/* */ public int getAccessFlags() +/* */ { +/* 545 */ return this._accessFlags; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setAccessFlags(int flags) +/* */ { +/* 553 */ this._accessFlags = flags; +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 560 */ Object ret = null; +/* */ +/* 562 */ switch (index - offset) { +/* */ case 0: +/* 564 */ if (mode == 0) { +/* 565 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 566 */ "Attribute ID")); +/* 567 */ } else if (mode == 1) { +/* 568 */ ret = new Integer(this._attrID); +/* 569 */ } else if (mode == 2) { +/* 570 */ int id = ((Integer)value).intValue(); +/* 571 */ if ((id < 0) || (id > 255)) { +/* 572 */ Console.println(Console.message("Attribute-id")); +/* */ } else +/* 574 */ setAttrID(id); +/* */ } +/* 576 */ break; +/* */ case 1: +/* 578 */ if (mode == 0) { +/* 579 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 580 */ "Fingerable"), "No", "Yes"); +/* 581 */ } else if (mode == 1) { +/* 582 */ ret = new Boolean(getFinger()); +/* 583 */ } else if (mode == 2) +/* 584 */ setFinger(((Boolean)value).booleanValue()); +/* 585 */ break; +/* */ +/* */ case 2: +/* 588 */ if (mode == 0) { +/* 589 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 590 */ "Auto Update"), "No", "Yes"); +/* 591 */ } else if (mode == 1) { +/* 592 */ ret = new Boolean(getAutoUpdate()); +/* 593 */ } else if (mode == 2) +/* 594 */ setAutoUpdate(((Boolean)value).booleanValue()); +/* 595 */ break; +/* */ +/* */ case 3: +/* 598 */ if (mode == 0) { +/* 599 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 600 */ "Store in Database"), "No", "Yes"); +/* 601 */ } else if (mode == 1) { +/* 602 */ ret = new Boolean(getDatabase()); +/* 603 */ } else if (mode == 2) +/* 604 */ setDatabase(((Boolean)value).booleanValue()); +/* 605 */ break; +/* */ +/* */ case 4: +/* 608 */ if (mode == 0) { +/* 609 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 610 */ "Shorthand version")); +/* 611 */ } else if (mode == 1) { +/* 612 */ ret = new Integer(this._shorthandVersion); +/* 613 */ } else if (mode == 2) { +/* 614 */ int id = ((Integer)value).intValue(); +/* 615 */ if ((id < 0) || (id > getMaxShorthandVersion())) { +/* 616 */ Console.println( +/* 617 */ Console.message("Shorthand-version") + " " + getMaxShorthandVersion()); +/* */ } else +/* 619 */ this._shorthandVersion = id; +/* */ } +/* 621 */ break; +/* */ +/* */ case 5: +/* 624 */ if (mode == 0) { +/* 625 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 626 */ "Forwarder attrID")); +/* 627 */ } else if (mode == 1) { +/* 628 */ ret = new Integer(getForwardAttrID()); +/* 629 */ } else if (mode == 2) { +/* 630 */ int id = ((Integer)value).intValue(); +/* 631 */ if ((id < 0) || (id > 255)) { +/* 632 */ Console.println(Console.message("Attribute-id")); +/* */ } else +/* 634 */ setForwardAttrID(id); +/* */ } +/* 636 */ break; +/* */ +/* */ case 6: +/* 639 */ if (mode == 0) { +/* 640 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 641 */ "Load Now"), "No", "Yes"); +/* 642 */ } else if (mode == 1) { +/* 643 */ ret = new Boolean(false); +/* 644 */ } else if ((mode == 2) && +/* 645 */ (((Boolean)value).booleanValue())) { +/* 646 */ load(null); +/* */ } +/* 648 */ break; +/* */ +/* */ default: +/* 651 */ ret = super.properties(index, offset + 7, mode, value); +/* */ } +/* 653 */ return ret; +/* */ } +/* */ +/* */ public Object propertyParent() +/* */ { +/* 658 */ return getOwner().getOwner(); +/* */ } +/* */ +/* */ +/* */ +/* 663 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 667 */ s.saveVersion(5, classCookie); +/* 668 */ super.saveState(s); +/* 669 */ s.saveInt(this._attrID); +/* 670 */ s.saveInt(getForwardAttrID()); +/* 671 */ s.saveInt(this._propertyFlags); +/* 672 */ s.saveInt(this._shorthandVersion); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 677 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 679 */ this._attrID = r.restoreInt(); +/* 680 */ if (r.restoreBoolean()) { +/* 681 */ this._storedForwardAttrID = r.restoreInt(); +/* */ } else +/* 683 */ r.restoreInt(); +/* 684 */ break; +/* */ +/* */ case 1: +/* 687 */ this._attrID = r.restoreInt(); +/* 688 */ this._storedForwardAttrID = r.restoreInt(); +/* 689 */ break; +/* */ +/* */ case 2: +/* 692 */ this._attrID = r.restoreInt(); +/* 693 */ this._storedForwardAttrID = r.restoreInt(); +/* 694 */ this._propertyFlags = r.restoreInt(); +/* 695 */ break; +/* */ +/* */ case 3: +/* 698 */ restoreStateSuperRoot(r); +/* 699 */ this._attrID = r.restoreInt(); +/* 700 */ this._storedForwardAttrID = r.restoreInt(); +/* 701 */ this._propertyFlags = r.restoreInt(); +/* 702 */ break; +/* */ +/* */ case 4: +/* 705 */ restoreStateSuperRoot(r); +/* 706 */ this._attrID = r.restoreInt(); +/* 707 */ this._storedForwardAttrID = r.restoreInt(); +/* 708 */ this._propertyFlags = r.restoreInt(); +/* 709 */ this._shorthandVersion = r.restoreInt(); +/* 710 */ break; +/* */ +/* */ case 5: +/* 713 */ super.restoreState(r); +/* 714 */ this._attrID = r.restoreInt(); +/* 715 */ this._storedForwardAttrID = r.restoreInt(); +/* 716 */ this._propertyFlags = r.restoreInt(); +/* 717 */ this._shorthandVersion = r.restoreInt(); +/* 718 */ break; +/* */ +/* */ default: +/* 721 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 727 */ if (isForwarded()) { +/* 728 */ return super.toString() + "[forwarded to " + this._to.getName() + "]"; +/* */ } +/* 730 */ return super.toString(); +/* */ } +/* */ +/* */ public void releaseAuxilaryData() {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Attribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AudibilityFilter.java b/NET/worlds/scape/AudibilityFilter.java new file mode 100644 index 0000000..4260e9b --- /dev/null +++ b/NET/worlds/scape/AudibilityFilter.java @@ -0,0 +1,496 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class AudibilityFilter +/* */ { +/* */ WObject owner; +/* */ Room listenerRoom; +/* */ AudibleParams ownerPos; +/* */ AudibleParams localPos; +/* */ +/* */ public AudibilityFilter(Sound s, WObject o, int maxHops) +/* */ { +/* 51 */ debugOut(9, "AudibilityFilter::AudibilityFilter in"); +/* 52 */ this.sound = s; +/* 53 */ this.owner = o; +/* 54 */ this.maxHopcount = maxHops; +/* */ +/* 56 */ if (this.owner.getRoom() == null) +/* 57 */ return; +/* 58 */ floodFillRooms(); +/* 59 */ updateListenerState(); +/* */ } +/* */ +/* */ void fillOwnerEntry() { +/* 63 */ debugOut(9, "aud fillOwnerEntry called " + this.sound.getURL()); +/* 64 */ this.ownerPos = new AudibleParams(); +/* 65 */ this.ownerPos.room = this.owner.getRoom(); +/* 66 */ this.ownerPos.position = new Point3(this.owner.getPosition()); +/* 67 */ this.ownerPos.transform = Transform.make(); +/* 68 */ this.ownerPos.hopcount = 0; +/* 69 */ this.roomList.addElement(this.ownerPos); +/* */ } +/* */ +/* */ private void debugOut(int level, String str) +/* */ { +/* 74 */ if (Sound.debugLevel > level) { +/* 75 */ System.out.println(str); +/* */ } +/* */ } +/* */ +/* */ +/* */ public AudibilityFilter(Sound s, WObject o, int maxHops, float stopDistance) +/* */ { +/* 82 */ this(s, o, maxHops); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 116 */ Vector roomList = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 127 */ int maxHopcount = 1; +/* */ +/* */ public AudibilityFilter() {} +/* */ +/* */ public void setHopcount(int i) +/* */ { +/* 133 */ debugOut(9, "AudibilityFilter::setHopcount"); +/* 134 */ this.maxHopcount = i; +/* 135 */ moveEmitter(); +/* */ } +/* */ +/* */ public int getHopcount() { +/* 139 */ debugOut(9, "AudibilityFilter::getHopcount"); +/* 140 */ return this.maxHopcount; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 148 */ private boolean listenerOn = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 154 */ private boolean emitterOn = false; +/* */ +/* */ Sound sound; +/* */ +/* */ void setEmitterOn(boolean flag) +/* */ { +/* 160 */ debugOut(9, "setting emitterOn to " + flag); +/* 161 */ this.emitterOn = flag; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void updateListenerState() +/* */ { +/* 174 */ assert (this.sound != null); +/* 175 */ debugOut(6, "updateListenerState " + this.sound.getURL()); +/* 176 */ Room newRoom = Pilot.getActiveRoom(); +/* 177 */ if (this.listenerRoom == newRoom) { +/* 178 */ return; +/* */ } +/* 180 */ this.listenerRoom = newRoom; +/* */ +/* */ +/* 183 */ AudibleParams roomElement = getRoomElement(newRoom); +/* 184 */ if (roomElement == null) { +/* 185 */ this.listenerOn = false; +/* */ } +/* */ else +/* */ { +/* 189 */ this.localPos = roomElement; +/* 190 */ adjustEmitterLocation(); +/* */ +/* */ +/* 193 */ if (!this.listenerOn) { +/* 194 */ this.listenerOn = true; +/* */ +/* 196 */ if (this.emitterOn) { +/* 197 */ RunningActionHandler.trigger(this.sound, this.owner.getWorld(), null); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private void updateEmitterState() +/* */ { +/* 207 */ if (isEmitterMoved()) { +/* 208 */ adjustEmitterLocation(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isAudible() +/* */ { +/* 217 */ updateListenerState(); +/* 218 */ updateEmitterState(); +/* 219 */ debugOut(6, "emitterOn " + this.emitterOn + " listenerOn " + this.listenerOn); +/* 220 */ return (this.emitterOn) && (this.listenerOn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void moveEmitter() +/* */ { +/* 229 */ debugOut(9, "moveEmitter"); +/* 230 */ removeRooms(); +/* 231 */ floodFillRooms(); +/* 232 */ updateListenerState(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void removeRooms() +/* */ { +/* 240 */ debugOut(9, "removeRooms for sound " + this.sound.getURL()); +/* 241 */ for (int roomIndex = this.roomList.size() - 1; roomIndex >= 0; roomIndex--) { +/* 242 */ AudibleParams ap = (AudibleParams)this.roomList.elementAt(roomIndex); +/* 243 */ Room room = ap.room; +/* 244 */ room.removeAFilter(this); +/* 245 */ debugOut(9, "removing room " + room.getName() + " from roomList"); +/* 246 */ this.roomList.removeElementAt(roomIndex); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void floodFillRooms() +/* */ { +/* 259 */ debugOut(9, "floodFillRooms " + this.sound.getURL() + " count:" + this.maxHopcount); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 268 */ assert (this.roomList != null); +/* 269 */ assert (this.roomList.size() == 0); +/* */ +/* 271 */ assert (this.owner != null); +/* */ +/* 273 */ if ((this.owner == null) || (this.owner.getRoom() == null)) +/* 274 */ return; +/* 275 */ breadthSearchStart(); +/* 276 */ fillOwnerEntry(); +/* 277 */ this.owner.getRoom().addAFilter(this); +/* 278 */ breadthAddChildren(this.owner.getRoom()); +/* */ +/* */ +/* 281 */ for (Portal portal = breadthNextElement(); +/* 282 */ (portal != null) && (breadthCurrentLevel() < this.maxHopcount); +/* 283 */ portal = breadthNextElement()) { +/* 284 */ debugOut(6, " trying to add " + portal.farSideRoom().getName()); +/* 285 */ if (getRoomElement(portal.farSideRoom()) == null) { +/* 286 */ addRoomListEntry(portal, breadthCurrentLevel() + 1); +/* 287 */ breadthAddChildren(portal.farSideRoom()); +/* */ } +/* */ } +/* 290 */ breadthSearchEnd(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 297 */ Vector breadthQueue = null; +/* */ +/* */ int breadthLevel; +/* */ +/* */ int breadthNextLevelIndex; +/* */ int breadthIndex; +/* */ +/* */ private void breadthSearchStart() +/* */ { +/* 306 */ this.breadthQueue = new Vector(); +/* 307 */ this.breadthLevel = 0; +/* 308 */ this.breadthNextLevelIndex = 0; +/* 309 */ this.breadthIndex = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ private Portal breadthNextElement() +/* */ { +/* 316 */ if ((this.breadthQueue != null) && (this.breadthIndex < this.breadthQueue.size())) { +/* 317 */ if (this.breadthIndex == this.breadthNextLevelIndex) { +/* 318 */ this.breadthLevel += 1; +/* 319 */ this.breadthNextLevelIndex = this.breadthQueue.size(); +/* */ } +/* */ +/* 322 */ return (Portal)this.breadthQueue.elementAt(this.breadthIndex++); +/* */ } +/* */ +/* 325 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void breadthAddChildren(Room room) +/* */ { +/* 333 */ assert (this.breadthQueue != null); +/* 334 */ Vector next = room.getOutgoingPortals(); +/* 335 */ for (int j = 0; j < next.size(); j++) { +/* 336 */ Portal portal = (Portal)next.elementAt(j); +/* 337 */ Room r = portal.farSideRoom(); +/* 338 */ if ((r != null) && (r.isActive())) +/* 339 */ this.breadthQueue.addElement(portal); +/* */ } +/* */ } +/* */ +/* 343 */ private int breadthCurrentLevel() { return this.breadthLevel; } +/* */ +/* 345 */ private void breadthSearchEnd() { this.breadthQueue = null; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void addRoomListEntry(Portal portal, int hopCount) +/* */ { +/* 353 */ debugOut(9, "addRoomListEntry " + portal.farSideRoom().getName()); +/* 354 */ AudibleParams ap = getRoomElement(portal.getRoom()); +/* 355 */ assert (ap != null); +/* 356 */ fillNewAP(ap, portal, hopCount); +/* 357 */ portal.farSideRoom().addAFilter(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ AudibleParams getRoomElement(Room room) +/* */ { +/* 365 */ if (room == null) +/* 366 */ return null; +/* 367 */ debugOut(6, "getRoomElement size " + this.roomList.size() + +/* 368 */ " room " + room.getName()); +/* 369 */ for (int index = 0; index < this.roomList.size(); index++) { +/* 370 */ Room newRoom = ((AudibleParams)this.roomList.elementAt(index)).room; +/* 371 */ debugOut(9, " comparing to " + newRoom.getName()); +/* 372 */ if (((AudibleParams)this.roomList.elementAt(index)).room == room) +/* 373 */ return (AudibleParams)this.roomList.elementAt(index); +/* */ } +/* 375 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void fillNewAP(AudibleParams connectingRoom, Portal bestPortal, int bestCount) +/* */ { +/* 392 */ debugOut(4, "AudibilityFilter::fillNewAP for room " + +/* 393 */ bestPortal.farSideRoom().getName()); +/* 394 */ AudibleParams newAP = new AudibleParams(); +/* 395 */ newAP.room = bestPortal.farSideRoom(); +/* 396 */ newAP.hopcount = bestCount; +/* */ +/* */ Transform xform; +/* */ Transform xform; +/* 400 */ if (bestPortal.p2pXform() != null) { +/* 401 */ xform = bestPortal.p2pXform().getTransform(); +/* */ } else { +/* 403 */ xform = Transform.make(); +/* 404 */ debugOut(4, " xform incomplete"); +/* */ } +/* */ +/* */ +/* 408 */ newAP.transform = connectingRoom.transform.getTransform(); +/* 409 */ newAP.transform.post(xform); +/* 410 */ xform.recycle(); +/* */ +/* */ +/* 413 */ newAP.position = new Point3(connectingRoom.position); +/* 414 */ newAP.position.times(newAP.transform); +/* */ +/* 416 */ this.roomList.addElement(newAP); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isEmitterMoved() +/* */ { +/* 426 */ assert (this.ownerPos != null); +/* 427 */ if (!this.ownerPos.position.sameValue(this.owner.getPosition())) { +/* 428 */ this.ownerPos.position = new Point3(this.owner.getPosition()); +/* 429 */ return true; +/* */ } +/* 431 */ if (this.ownerPos.room != this.owner.getRoom()) { +/* 432 */ return true; +/* */ } +/* 434 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void adjustEmitterLocation() +/* */ { +/* 442 */ debugOut(4, "AudibilityFilter::adjustEmitterLocation"); +/* 443 */ if (this.ownerPos.room != this.owner.getRoom()) { +/* 444 */ debugOut(9, " moveEmitter because emitter changed rooms"); +/* 445 */ moveEmitter(); +/* */ } +/* */ else { +/* 448 */ this.localPos.position = new Point3(this.ownerPos.position); +/* 449 */ this.localPos.position.times(this.localPos.transform); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void getListenerPosition(Point3Temp pos, Point3Temp up, Point3Temp forward) +/* */ { +/* 458 */ debugOut(9, "getListenerPosition"); +/* 459 */ Pilot pilot = Pilot.getActive(); +/* 460 */ Transform t = pilot.getObjectToWorldMatrix(); +/* */ +/* 462 */ up.copy(Point3Temp.make(0.0F, 0.0F, 1.0F).vectorTimes(t).normalize()); +/* 463 */ forward.copy(Point3Temp.make(0.0F, 1.0F, 0.0F).vectorTimes(t).normalize()); +/* 464 */ pos.copy(pilot.getPosition()); +/* */ +/* 466 */ t.recycle(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void getEmitterPosition(Point3Temp pos) +/* */ { +/* 473 */ debugOut(9, "getEmitterPosition"); +/* 474 */ assert (this.localPos != null); +/* */ +/* 476 */ pos.x = this.localPos.position.x; +/* 477 */ pos.y = this.localPos.position.y; +/* 478 */ pos.z = this.localPos.position.z; +/* */ } +/* */ +/* */ +/* */ +/* */ public float getEmitterVolume() +/* */ { +/* 485 */ debugOut(9, "getEmitterVolume"); +/* 486 */ assert (this.localPos != null); +/* */ +/* 488 */ return 1.0F; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AudibilityFilter.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/AudibleParams.java b/NET/worlds/scape/AudibleParams.java new file mode 100644 index 0000000..99f42dc --- /dev/null +++ b/NET/worlds/scape/AudibleParams.java @@ -0,0 +1,15 @@ +package NET.worlds.scape; + +class AudibleParams +{ + public Room room; + public Point3 position; + public Transform transform; + public int hopcount; +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\AudibleParams.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BGLoaded.java b/NET/worlds/scape/BGLoaded.java new file mode 100644 index 0000000..1a2780e --- /dev/null +++ b/NET/worlds/scape/BGLoaded.java @@ -0,0 +1,18 @@ +package NET.worlds.scape; + +import NET.worlds.network.URL; + +public abstract interface BGLoaded +{ + public abstract Object asyncBackgroundLoad(String paramString, URL paramURL); + + public abstract boolean syncBackgroundLoad(Object paramObject, URL paramURL); + + public abstract Room getBackgroundLoadRoom(); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BGLoaded.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BackgroundLoader.java b/NET/worlds/scape/BackgroundLoader.java new file mode 100644 index 0000000..0f79ce1 --- /dev/null +++ b/NET/worlds/scape/BackgroundLoader.java @@ -0,0 +1,239 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BackgroundLoader +/* */ implements MainCallback, Runnable +/* */ { +/* 90 */ private static BackgroundLoader bg = new BackgroundLoader(); +/* */ +/* */ +/* */ +/* 94 */ private BackgroundLoaderQueue asyncLoadQueue = new BackgroundLoaderQueue(); +/* */ +/* */ +/* 97 */ private Vector syncLoadQueue = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ private Thread asyncLoaderThread; +/* */ +/* */ +/* */ +/* */ +/* */ public static void get(BGLoaded loader, String remoteName) +/* */ { +/* 109 */ get(loader, URL.make(remoteName), false); +/* */ } +/* */ +/* 112 */ public static void get(BGLoaded loader, URL remoteName) { get(loader, remoteName, false); } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void get(BGLoaded loader, URL remoteName, boolean highPri) +/* */ { +/* 122 */ new BackgroundLoaderElement(loader, remoteName, highPri); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static void activeRoomChanged(Room room) +/* */ { +/* 133 */ bg.asyncLoadQueue.activeRoomChanged(room); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static void asyncLoad(BackgroundLoaderElement ele) +/* */ { +/* 142 */ bg.asyncLoadQueue.add(ele); +/* */ } +/* */ +/* */ static void syncLoad(BackgroundLoaderElement ele) { +/* 146 */ bg.syncLoadQueue.addElement(ele); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private BackgroundLoader() +/* */ { +/* 154 */ this.asyncLoaderThread = new Thread(this); +/* 155 */ this.asyncLoaderThread.setDaemon(true); +/* 156 */ this.asyncLoaderThread.start(); +/* */ +/* 158 */ Main.register(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void run() +/* */ { +/* 168 */ assert (Thread.currentThread() == this.asyncLoaderThread); +/* */ +/* */ +/* */ +/* */ +/* */ for (;;) +/* */ { +/* 175 */ BackgroundLoaderElement ele = this.asyncLoadQueue.getItem(); +/* */ +/* */ +/* 178 */ ele.asyncLoad(); +/* */ +/* 180 */ synchronized (this) +/* */ { +/* */ +/* */ +/* */ +/* 185 */ this.syncLoadQueue.addElement(ele); +/* 186 */ while (this.syncLoadQueue.size() > 0) +/* */ { +/* */ try { +/* 189 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* 192 */ if (this.asyncLoadQueue.hasHighPriorityItems()) +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 199 */ int nextSync = 0; +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void mainCallback() +/* */ { +/* 206 */ if (this.syncLoadQueue.size() == 0) { +/* 207 */ return; +/* */ } +/* 209 */ if (this.nextSync >= this.syncLoadQueue.size()) { +/* 210 */ this.nextSync = 0; +/* */ } +/* 212 */ BackgroundLoaderElement ele = +/* 213 */ (BackgroundLoaderElement)this.syncLoadQueue.elementAt(this.nextSync); +/* */ +/* */ +/* 216 */ if (!ele.syncLoad()) +/* */ { +/* */ +/* 219 */ this.syncLoadQueue.removeElementAt(this.nextSync); +/* */ +/* 221 */ if (this.syncLoadQueue.size() == 0) { +/* 222 */ notify(); +/* */ } +/* */ } +/* */ else +/* */ { +/* 227 */ if (this.asyncLoadQueue.hasHighPriorityItems()) { +/* 228 */ notify(); +/* */ } +/* 230 */ this.nextSync += 1; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BackgroundLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BackgroundLoaderElement.java b/NET/worlds/scape/BackgroundLoaderElement.java new file mode 100644 index 0000000..5edeeca --- /dev/null +++ b/NET/worlds/scape/BackgroundLoaderElement.java @@ -0,0 +1,653 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.URL; +/* */ import java.util.Observable; +/* */ import java.util.Observer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class BackgroundLoaderElement +/* */ implements Observer +/* */ { +/* */ private BGLoaded object; +/* */ private Object arg; +/* */ private URL url; +/* */ private Room room; +/* */ private boolean inAllRooms; +/* */ private CacheFile rfile; +/* */ +/* */ BackgroundLoaderElement(BGLoaded object, URL url, boolean inAllRooms) +/* */ { +/* 542 */ boolean isMain = Main.isMainThread(); +/* */ +/* 544 */ this.object = object; +/* 545 */ this.url = url; +/* 546 */ if (inAllRooms) { +/* 547 */ this.inAllRooms = true; +/* */ } else { +/* 549 */ getRoom(isMain); +/* */ } +/* 551 */ read(isMain); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void update(Observable o, Object url) +/* */ { +/* 560 */ BackgroundLoader.asyncLoad(this); +/* */ } +/* */ +/* */ +/* 564 */ private static boolean immedLoadLocals = IniFile.gamma().getIniInt("BackgroundLoadLocalFiles", 0) == 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void read(boolean isMain) +/* */ { +/* 573 */ this.rfile = ((this.url == null) || (!this.url.isRemote()) ? null : Cache.getFile(this.url)); +/* */ +/* */ +/* 576 */ if (((this.rfile == null) || (this.rfile.done())) && (immedLoadLocals)) { +/* 577 */ asyncLoad(); +/* */ +/* */ +/* */ +/* 581 */ if ((!isMain) || (syncLoad())) { +/* 582 */ BackgroundLoader.syncLoad(this); +/* */ } +/* 584 */ } else if (this.rfile == null) { +/* 585 */ BackgroundLoader.asyncLoad(this); +/* */ } else { +/* 587 */ this.rfile.callWhenLoaded(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ void asyncLoad() +/* */ { +/* */ String name; +/* */ +/* */ +/* */ String name; +/* */ +/* */ +/* 601 */ if (this.rfile == null) { +/* 602 */ name = this.url.unalias(); +/* */ } else { +/* 604 */ name = this.rfile.getLocalName(); +/* */ } +/* 606 */ this.arg = this.object.asyncBackgroundLoad(name, this.url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean syncLoad() +/* */ { +/* 619 */ if (this.object.syncBackgroundLoad(this.arg, this.url)) { +/* 620 */ return true; +/* */ } +/* 622 */ if (this.rfile != null) { +/* 623 */ this.rfile.finalize(); +/* 624 */ this.rfile = null; +/* */ } +/* */ +/* 627 */ return false; +/* */ } +/* */ +/* */ boolean inAllRooms() +/* */ { +/* 632 */ return this.inAllRooms; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Room getRoom(boolean isMainThread) +/* */ { +/* 643 */ if ((this.room == null) && (!this.inAllRooms) && (isMainThread)) +/* 644 */ this.room = this.object.getBackgroundLoadRoom(); +/* 645 */ return this.room; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BackgroundLoaderElement.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BackgroundLoaderQueue.java b/NET/worlds/scape/BackgroundLoaderQueue.java new file mode 100644 index 0000000..d691573 --- /dev/null +++ b/NET/worlds/scape/BackgroundLoaderQueue.java @@ -0,0 +1,501 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class BackgroundLoaderQueue +/* */ implements MainCallback +/* */ { +/* */ private Room activeRoom; +/* */ private int itemsInQueue; +/* 284 */ private BackgroundLoaderVector inAllRooms = new BackgroundLoaderVector(); +/* */ +/* */ +/* 287 */ private BackgroundLoaderVector inUnknownRoom = new BackgroundLoaderVector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 294 */ private Hashtable rooms = new Hashtable(); +/* */ private boolean mainRan; +/* */ +/* */ synchronized void activeRoomChanged(Room room) +/* */ { +/* 299 */ this.activeRoom = room; +/* */ } +/* */ +/* */ public boolean hasHighPriorityItems() +/* */ { +/* 304 */ return this.inAllRooms.size() > 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ synchronized void add(BackgroundLoaderElement e) +/* */ { +/* 313 */ if (!addHelper(e, false)) { +/* 314 */ if (e.inAllRooms()) { +/* 315 */ this.inAllRooms.insertElementAt(e, 0); +/* */ } else { +/* 317 */ this.inUnknownRoom.addElement(e); +/* */ } +/* */ } +/* */ +/* 321 */ this.itemsInQueue += 1; +/* 322 */ notify(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean addHelper(BackgroundLoaderElement e, boolean isMainThread) +/* */ { +/* 335 */ Room r = e.getRoom(isMainThread); +/* 336 */ if ((r != null) && (r.isActive())) { +/* 337 */ BackgroundLoaderVector v = (BackgroundLoaderVector)this.rooms.get(r); +/* 338 */ if (v == null) +/* 339 */ this.rooms.put(r, v = new BackgroundLoaderVector()); +/* 340 */ v.addElement(e); +/* 341 */ return true; +/* */ } +/* 343 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private BackgroundLoaderElement getHelper(Room r) +/* */ { +/* 355 */ BackgroundLoaderElement e = null; +/* 356 */ BackgroundLoaderVector v = (BackgroundLoaderVector)this.rooms.get(r); +/* 357 */ if (v != null) { +/* 358 */ e = v.removeFirst(); +/* 359 */ if (v.isEmpty()) +/* 360 */ this.rooms.remove(r); +/* */ } +/* 362 */ return e; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ synchronized BackgroundLoaderElement getItem() +/* */ { +/* 374 */ BackgroundLoaderElement e = null; +/* */ +/* */ for (;;) +/* */ { +/* 378 */ if (this.itemsInQueue != 0) +/* */ { +/* */ +/* 381 */ if (this.inAllRooms.size() != 0) { +/* 382 */ e = this.inAllRooms.removeFirst(); +/* 383 */ break; +/* */ } +/* */ +/* */ +/* */ +/* 388 */ if ((this.activeRoom != null) && +/* 389 */ ((e = getHelper(this.activeRoom)) != null)) { +/* */ break; +/* */ } +/* */ +/* 393 */ this.mainRan = false; +/* 394 */ Main.register(this); +/* 395 */ while (!this.mainRan) { +/* */ try { +/* 397 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ +/* 402 */ if ((this.inAllRooms.size() == 0) && ((this.activeRoom == null) || +/* 403 */ (this.rooms.get(this.activeRoom) == null))) +/* */ { +/* */ +/* */ +/* 407 */ if ((e = getClosestObject()) != null) { +/* */ break; +/* */ } +/* */ +/* 411 */ if (this.inUnknownRoom.size() != 0) { +/* 412 */ e = this.inUnknownRoom.removeFirst(); +/* 413 */ break; +/* */ } +/* */ +/* */ +/* 417 */ Enumeration k = this.rooms.keys(); +/* 418 */ assert (k.hasMoreElements()); +/* 419 */ e = getHelper((Room)k.nextElement()); +/* 420 */ if (($assertionsDisabled) || (e != null)) break; throw new AssertionError(); +/* */ } +/* */ } +/* */ else +/* */ { +/* */ try { +/* 426 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException1) {} +/* */ } +/* */ } +/* */ +/* 432 */ assert (e != null); +/* 433 */ this.itemsInQueue -= 1; +/* 434 */ assert (this.itemsInQueue >= 0); +/* */ +/* 436 */ return e; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private BackgroundLoaderElement getClosestObject() +/* */ { +/* 449 */ synchronized (Pilot.visibleRooms) { +/* 450 */ float minDist = Float.MAX_VALUE; +/* 451 */ int minEle = -1; +/* 452 */ int count = Pilot.visibleRoomInfo.size(); +/* 453 */ for (int i = 0; i < count; i++) { +/* 454 */ RoomSubscribeInfo s = +/* 455 */ (RoomSubscribeInfo)Pilot.visibleRoomInfo.elementAt(i); +/* 456 */ if ((s.d < minDist) && +/* 457 */ (this.rooms.get(Pilot.visibleRooms.elementAt(i)) != null)) +/* */ { +/* 459 */ minDist = s.d; +/* 460 */ minEle = i; +/* */ } +/* */ } +/* */ +/* 464 */ if (minEle == -1) { +/* 465 */ return null; +/* */ } +/* 467 */ return getHelper((Room)Pilot.visibleRooms.elementAt(minEle)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void mainCallback() +/* */ { +/* 480 */ int count = this.inUnknownRoom.size(); +/* 481 */ int i = 0; +/* 482 */ while (count-- != 0) { +/* 483 */ BackgroundLoaderElement e = +/* 484 */ (BackgroundLoaderElement)this.inUnknownRoom.get(i); +/* 485 */ if (addHelper(e, true)) { +/* 486 */ this.inUnknownRoom.removeElementAt(i); +/* */ } else { +/* 488 */ i++; +/* */ } +/* */ } +/* 491 */ this.mainRan = true; +/* 492 */ Main.unregister(this); +/* 493 */ notify(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BackgroundLoaderQueue.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BackgroundLoaderVector.java b/NET/worlds/scape/BackgroundLoaderVector.java new file mode 100644 index 0000000..0589e5b --- /dev/null +++ b/NET/worlds/scape/BackgroundLoaderVector.java @@ -0,0 +1,269 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class BackgroundLoaderVector +/* */ extends Vector +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ BackgroundLoaderElement removeFirst() +/* */ { +/* 251 */ BackgroundLoaderElement ret = (BackgroundLoaderElement)elementAt(0); +/* 252 */ removeElementAt(0); +/* 253 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized Object get(int i) +/* */ { +/* 261 */ return elementAt(i); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BackgroundLoaderVector.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BadFormatException.java b/NET/worlds/scape/BadFormatException.java new file mode 100644 index 0000000..3d9ddba --- /dev/null +++ b/NET/worlds/scape/BadFormatException.java @@ -0,0 +1,35 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BadFormatException +/* */ extends Exception +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BadFormatException() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BadFormatException(String s) +/* */ { +/* 27 */ super(s); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BadFormatException.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Billboard.java b/NET/worlds/scape/Billboard.java new file mode 100644 index 0000000..8af9495 --- /dev/null +++ b/NET/worlds/scape/Billboard.java @@ -0,0 +1,504 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.NoWebControlException; +/* */ import NET.worlds.console.WebControl; +/* */ import NET.worlds.console.WebControlFactory; +/* */ import NET.worlds.console.WebControlImp; +/* */ import NET.worlds.console.WebControlListener; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Billboard +/* */ extends Attribute +/* */ implements WebControlListener +/* */ { +/* */ public Billboard(int attrID) +/* */ { +/* 37 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Billboard() {} +/* */ +/* */ +/* */ +/* */ +/* */ public final void noteChange() {} +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 56 */ Rect s = (Rect)((Sharer)owner).getOwner(); +/* 57 */ s._billboardAttribute = this; +/* */ +/* 59 */ assignMaterial(s); +/* */ } +/* */ +/* */ private void assignMaterial(Rect s) { +/* 63 */ int xTex = this._xSurface / 128; +/* 64 */ if (xTex < 1) +/* 65 */ xTex = 1; +/* 66 */ int yTex = this._ySurface / 128; +/* 67 */ if (yTex < 1) { +/* 68 */ yTex = 1; +/* */ } +/* 70 */ this._surface = null; +/* */ +/* 72 */ if (this._wci != null) +/* 73 */ this._wci.detach(); +/* 74 */ this._wci = null; +/* */ +/* 76 */ this._rows = yTex; +/* */ +/* 78 */ this._material = new Material(URL.make(this._defTextureURL), xTex, yTex); +/* 79 */ s.setMaterial(this._material); +/* */ +/* 81 */ this._textures = this._material.getTextures(); +/* 82 */ this._surface = new TextureSurface(this._textures, yTex, this._xSurface, this._ySurface); +/* */ try +/* */ { +/* 85 */ this._wci = WebControlFactory.createWebControlImp(this._surface.getHwnd(), +/* 86 */ false, this._isAdBanner); +/* */ } catch (NoWebControlException e) { +/* 88 */ System.out.println("Could not create MSIE control for billboard."); +/* */ +/* 90 */ this._wci = null; +/* 91 */ return; +/* */ } +/* 93 */ if (!this._wci.setURL(this._textureURL)) { +/* 94 */ this._retryURL = true; +/* */ } +/* 96 */ this._wci.addListener(this); +/* */ } +/* */ +/* */ private void setTexture() { +/* 100 */ Sharer sh = (Sharer)getOwner(); +/* 101 */ if (sh == null) { +/* 102 */ return; +/* */ } +/* 104 */ Rect s = (Rect)sh.getOwner(); +/* 105 */ assignMaterial(s); +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 110 */ Rect s = (Rect)((Sharer)getOwner()).getOwner(); +/* 111 */ s._billboardAttribute = null; +/* 112 */ if (this._wci != null) +/* 113 */ this._wci.detach(); +/* 114 */ super.detach(); +/* */ } +/* */ +/* */ public void finalize() +/* */ { +/* 119 */ releaseAuxilaryData(); +/* 120 */ super.finalize(); +/* */ } +/* */ +/* 123 */ WebControlImp _wci = null; +/* */ TextureSurface _surface; +/* */ Texture[] _textures; +/* 126 */ Material _material = null; +/* */ +/* */ +/* 129 */ String _textureURL = "$SCRIPTSERVERgetad.pl?u=$USERNAME"; +/* */ +/* */ +/* 132 */ String _adURL = "http://www.worlds.com/"; +/* */ +/* */ +/* 135 */ String _defTextureURL = IniFile.override().getIniString("defaultAd", +/* 136 */ "adworlds.cmp"); +/* */ +/* */ +/* 139 */ int _xPercent = 100; int _yPercent = 100; +/* */ +/* */ +/* 142 */ int _xSurface = 468; int _ySurface = 60; +/* */ +/* */ +/* 145 */ boolean _hasToolbar = true; +/* */ +/* */ +/* 148 */ boolean _isFixed = false; +/* */ +/* */ +/* 151 */ int _rows = 1; +/* */ +/* */ +/* */ +/* */ +/* 156 */ int _refresh = 5; +/* */ +/* */ +/* 159 */ boolean _passClicks = true; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 165 */ boolean _isAdBanner = true; +/* */ +/* */ public boolean getIsAdBanner() { +/* 168 */ return this._isAdBanner; +/* */ } +/* */ +/* */ +/* */ +/* 173 */ boolean _retryURL = false; +/* */ +/* */ public void billboardClicked(Point2 pt) { +/* 176 */ if (this._passClicks) { +/* 177 */ double realX = pt.x * this._surface.getWidth(); +/* 178 */ double realY = pt.y * this._surface.getHeight(); +/* 179 */ realY = this._surface.getHeight() - realY; +/* */ +/* 181 */ this._surface.sendLeftClick((int)realX, (int)realY); +/* 182 */ return; +/* */ } +/* */ +/* 185 */ Console c = Console.getActive(); +/* 186 */ if ((c != null) && ((c instanceof DefaultConsole))) { +/* 187 */ DefaultConsole dc = (DefaultConsole)c; +/* */ try { +/* 189 */ WebControl wc = new WebControl(dc.getRender(), this._xPercent, +/* 190 */ this._yPercent, this._hasToolbar, this._isFixed, false); +/* 191 */ wc.activate(); +/* 192 */ wc.setURL(this._adURL); +/* */ } +/* */ catch (NoWebControlException e) { +/* 195 */ new SendURLAction(this._adURL).doIt(); +/* */ } +/* */ } +/* */ } +/* */ +/* 200 */ int frameCnt = -1; +/* */ +/* */ public void billboardFrame(FrameEvent f) { +/* 203 */ if ((this._retryURL) && (this._wci != null)) { +/* 204 */ if (this._wci.setURL(this._textureURL)) { +/* 205 */ this._retryURL = false; +/* */ } else { +/* 207 */ return; +/* */ } +/* */ } +/* 210 */ if (this._surface != null) { +/* 211 */ if ((this.frameCnt > this._refresh) || (this.frameCnt == -1)) { +/* 212 */ if ((this.frameCnt != -1) && (this._refresh == -1)) { +/* 213 */ return; +/* */ } +/* 215 */ this.frameCnt = 0; +/* 216 */ draw(); +/* */ } else { +/* 218 */ this.frameCnt += 1; +/* */ } +/* */ } +/* */ } +/* */ +/* */ public synchronized void draw() { +/* 224 */ if ((this._surface != null) && (this._wci != null)) { +/* 225 */ this._surface.setTextures(this._material.getTextures(), this._rows); +/* 226 */ this._surface.draw(this._wci); +/* */ } +/* */ } +/* */ +/* */ public void webControlEvent(int eventID) +/* */ { +/* 232 */ if ((eventID == 1) && (this._refresh == -1)) { +/* 233 */ draw(); +/* */ } +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException { +/* 238 */ s.writeUTF(this._adURL); +/* 239 */ s.writeUTF(this._textureURL); +/* 240 */ s.writeInt(this._xPercent); +/* 241 */ s.writeInt(this._yPercent); +/* 242 */ s.writeInt(this._xSurface); +/* 243 */ s.writeInt(this._ySurface); +/* 244 */ s.writeInt(this._refresh); +/* 245 */ s.writeInt(this._hasToolbar ? 1 : 0); +/* 246 */ s.writeInt(this._isFixed ? 1 : 0); +/* 247 */ s.writeInt(this._passClicks ? 1 : 0); +/* 248 */ s.writeInt(this._isAdBanner ? 1 : 0); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 253 */ this._adURL = ds.readUTF(); +/* 254 */ this._textureURL = ds.readUTF(); +/* 255 */ this._xPercent = ds.readInt(); +/* 256 */ this._yPercent = ds.readInt(); +/* 257 */ this._xSurface = ds.readInt(); +/* 258 */ this._ySurface = ds.readInt(); +/* 259 */ this._refresh = ds.readInt(); +/* 260 */ this._hasToolbar = (ds.readInt() == 1); +/* 261 */ this._isFixed = (ds.readInt() == 1); +/* 262 */ this._passClicks = (ds.readInt() == 1); +/* 263 */ this._isAdBanner = (ds.readInt() == 1); +/* */ +/* 265 */ noteChange(); +/* 266 */ setTexture(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 275 */ Object ret = null; +/* 276 */ switch (index - offset) { +/* */ case 0: +/* 278 */ if (mode == 0) { +/* 279 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 280 */ "Target URL")); +/* 281 */ } else if (mode == 1) { +/* 282 */ ret = this._adURL; +/* 283 */ } else if (mode == 2) +/* 284 */ this._adURL = ((String)value); +/* 285 */ break; +/* */ case 1: +/* 287 */ if (mode == 0) { +/* 288 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 289 */ "Texture URL")); +/* 290 */ } else if (mode == 1) { +/* 291 */ ret = this._textureURL; +/* 292 */ } else if (mode == 2) { +/* 293 */ this._textureURL = ((String)value); +/* 294 */ setTexture(); +/* */ } +/* 296 */ break; +/* */ case 2: +/* 298 */ if (mode == 0) { +/* 299 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 300 */ "X Overlay % or Width"), 0, 1024); +/* 301 */ } else if (mode == 1) { +/* 302 */ ret = new Integer(this._xPercent); +/* 303 */ } else if (mode == 2) +/* 304 */ this._xPercent = ((Integer)value).intValue(); +/* 305 */ break; +/* */ case 3: +/* 307 */ if (mode == 0) { +/* 308 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 309 */ "Y Overlay % or Height"), 0, 1024); +/* 310 */ } else if (mode == 1) { +/* 311 */ ret = new Integer(this._yPercent); +/* 312 */ } else if (mode == 2) +/* 313 */ this._yPercent = ((Integer)value).intValue(); +/* 314 */ break; +/* */ case 4: +/* 316 */ if (mode == 0) { +/* 317 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 318 */ "Has Toolbar"), "No", "Yes"); +/* 319 */ } else if (mode == 1) { +/* 320 */ ret = new Boolean(this._hasToolbar); +/* 321 */ } else if (mode == 2) +/* 322 */ this._hasToolbar = ((Boolean)value).booleanValue(); +/* 323 */ break; +/* */ case 5: +/* 325 */ if (mode == 0) { +/* 326 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 327 */ "Fixed size"), "No - Percentage specified", +/* 328 */ "Yes - Pixels specified"); +/* 329 */ } else if (mode == 1) { +/* 330 */ ret = new Boolean(this._isFixed); +/* 331 */ } else if (mode == 2) +/* 332 */ this._isFixed = ((Boolean)value).booleanValue(); +/* 333 */ break; +/* */ case 6: +/* 335 */ if (mode == 0) { +/* 336 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 337 */ "Texture Width"), 0, 1024); +/* 338 */ } else if (mode == 1) { +/* 339 */ ret = new Integer(this._xSurface); +/* 340 */ } else if (mode == 2) { +/* 341 */ this._xSurface = ((Integer)value).intValue(); +/* 342 */ setTexture(); +/* */ } +/* 344 */ break; +/* */ case 7: +/* 346 */ if (mode == 0) { +/* 347 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 348 */ "Texture Height"), 0, 1024); +/* 349 */ } else if (mode == 1) { +/* 350 */ ret = new Integer(this._ySurface); +/* 351 */ } else if (mode == 2) { +/* 352 */ this._ySurface = ((Integer)value).intValue(); +/* 353 */ setTexture(); +/* */ } +/* 355 */ break; +/* */ case 8: +/* 357 */ if (mode == 0) { +/* 358 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 359 */ "Texture Refresh Rate"), -1, 1024); +/* 360 */ } else if (mode == 1) { +/* 361 */ ret = new Integer(this._refresh); +/* 362 */ } else if (mode == 2) +/* 363 */ this._refresh = ((Integer)value).intValue(); +/* 364 */ break; +/* */ case 9: +/* 366 */ if (mode == 0) { +/* 367 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 368 */ "Pass clicks"), "No - Click launches specified page", +/* 369 */ "Yes - Mouse events passed through to texture page"); +/* 370 */ } else if (mode == 1) { +/* 371 */ ret = new Boolean(this._passClicks); +/* 372 */ } else if (mode == 2) +/* 373 */ this._passClicks = ((Boolean)value).booleanValue(); +/* 374 */ break; +/* */ case 10: +/* 376 */ if (mode == 0) { +/* 377 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 378 */ "Is Ad Banner"), "No", "Yes"); +/* 379 */ } else if (mode == 1) { +/* 380 */ ret = new Boolean(this._isAdBanner); +/* 381 */ } else if (mode == 2) +/* 382 */ this._isAdBanner = ((Boolean)value).booleanValue(); +/* 383 */ break; +/* */ +/* */ default: +/* 386 */ ret = super.properties(index, offset + 11, mode, value); +/* */ } +/* */ +/* 389 */ if (mode == 2) { +/* 390 */ noteChange(); +/* */ } +/* 392 */ return ret; +/* */ } +/* */ +/* */ +/* 396 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 400 */ s.saveVersion(3, classCookie); +/* 401 */ super.saveState(s); +/* */ +/* 403 */ s.saveString(this._adURL); +/* 404 */ s.saveString(this._textureURL); +/* 405 */ s.saveInt(this._xPercent); +/* 406 */ s.saveInt(this._yPercent); +/* 407 */ s.saveBoolean(this._hasToolbar); +/* 408 */ s.saveBoolean(this._isFixed); +/* 409 */ s.saveInt(this._xSurface); +/* 410 */ s.saveInt(this._ySurface); +/* 411 */ s.saveInt(this._refresh); +/* 412 */ s.saveBoolean(this._passClicks); +/* 413 */ s.saveBoolean(this._isAdBanner); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 418 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 420 */ super.restoreState(r); +/* 421 */ this._adURL = r.restoreString(); +/* 422 */ this._textureURL = r.restoreString(); +/* 423 */ this._xPercent = r.restoreInt(); +/* 424 */ this._yPercent = r.restoreInt(); +/* 425 */ this._hasToolbar = r.restoreBoolean(); +/* 426 */ noteChange(); +/* 427 */ break; +/* */ case 1: +/* 429 */ super.restoreState(r); +/* 430 */ this._adURL = r.restoreString(); +/* 431 */ this._textureURL = r.restoreString(); +/* 432 */ this._xPercent = r.restoreInt(); +/* 433 */ this._yPercent = r.restoreInt(); +/* 434 */ this._hasToolbar = r.restoreBoolean(); +/* 435 */ this._isFixed = r.restoreBoolean(); +/* 436 */ noteChange(); +/* 437 */ break; +/* */ case 2: +/* 439 */ super.restoreState(r); +/* 440 */ this._adURL = r.restoreString(); +/* 441 */ this._textureURL = r.restoreString(); +/* 442 */ this._xPercent = r.restoreInt(); +/* 443 */ this._yPercent = r.restoreInt(); +/* 444 */ this._hasToolbar = r.restoreBoolean(); +/* 445 */ this._isFixed = r.restoreBoolean(); +/* 446 */ this._xSurface = r.restoreInt(); +/* 447 */ this._ySurface = r.restoreInt(); +/* 448 */ this._refresh = r.restoreInt(); +/* 449 */ this._passClicks = r.restoreBoolean(); +/* 450 */ noteChange(); +/* 451 */ break; +/* */ case 3: +/* 453 */ super.restoreState(r); +/* 454 */ this._adURL = r.restoreString(); +/* 455 */ this._textureURL = r.restoreString(); +/* 456 */ this._xPercent = r.restoreInt(); +/* 457 */ this._yPercent = r.restoreInt(); +/* 458 */ this._hasToolbar = r.restoreBoolean(); +/* 459 */ this._isFixed = r.restoreBoolean(); +/* 460 */ this._xSurface = r.restoreInt(); +/* 461 */ this._ySurface = r.restoreInt(); +/* 462 */ this._refresh = r.restoreInt(); +/* 463 */ this._passClicks = r.restoreBoolean(); +/* 464 */ this._isAdBanner = r.restoreBoolean(); +/* 465 */ noteChange(); +/* 466 */ break; +/* */ +/* */ default: +/* 469 */ throw new TooNewException(); +/* */ } +/* */ +/* 472 */ setTexture(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void releaseAuxilaryData() +/* */ { +/* 479 */ if (this._wci != null) { +/* 480 */ this._wci.detach(); +/* 481 */ this._wci = null; +/* */ } +/* */ +/* 484 */ if (this._surface != null) { +/* 485 */ this._surface.finalize(); +/* 486 */ this._surface = null; +/* */ } +/* */ +/* 489 */ if (this._material != null) { +/* 490 */ this._material.detach(); +/* 491 */ this._material.finalize(); +/* 492 */ this._material = null; +/* */ } +/* */ +/* */ +/* 496 */ this._textures = null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Billboard.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BizCard.java b/NET/worlds/scape/BizCard.java new file mode 100644 index 0000000..ce8edb5 --- /dev/null +++ b/NET/worlds/scape/BizCard.java @@ -0,0 +1,161 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BizCard +/* */ extends Attribute +/* */ { +/* 25 */ String[] _line = { "", "", "", "", "" }; +/* */ +/* */ public BizCard(int attrID) +/* */ { +/* 29 */ super(attrID); +/* 30 */ loadIni(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public BizCard() {} +/* */ +/* */ +/* */ +/* */ +/* */ private void loadIni() +/* */ { +/* 43 */ for (int i = 0; i < 5; i++) +/* 44 */ this._line[i] = IniFile.gamma().getIniString("BizCard" + i, this._line[i]); +/* */ } +/* */ +/* */ public String[] get() { +/* 48 */ return this._line; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void set(String[] lines) +/* */ { +/* 59 */ int total = 0; +/* */ +/* 61 */ for (int i = 0; i < this._line.length; i++) +/* */ { +/* 63 */ int l = lines[i].length(); +/* 64 */ total += l; +/* 65 */ if ((total >= 200) || (lines[i] == null)) { +/* 66 */ this._line[i] = ""; +/* */ } else { +/* 68 */ this._line[i] = lines[i]; +/* */ } +/* */ } +/* 71 */ noteChange(); +/* */ } +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 76 */ set(this._line); +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 81 */ s.writeInt(this._line.length); +/* 82 */ for (int i = 0; i < this._line.length; i++) { +/* 83 */ s.writeUTF(this._line[i]); +/* */ } +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException { +/* 88 */ int nLines = ds.readInt(); +/* 89 */ String[] serverLines = new String[nLines]; +/* 90 */ for (int i = 0; i < nLines; i++) { +/* 91 */ serverLines[i] = ds.readUTF(); +/* */ } +/* 93 */ set(serverLines); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 102 */ Object ret = null; +/* 103 */ switch (index - offset) { +/* */ case 0: +/* */ case 1: +/* */ case 2: +/* */ case 3: +/* */ case 4: +/* 109 */ if (mode == 0) { +/* 110 */ ret = StringPropertyEditor.make( +/* 111 */ new Property(this, index, "Line " + (index - offset))); +/* 112 */ } else if (mode == 1) { +/* 113 */ ret = this._line[(index - offset)]; +/* 114 */ } else if (mode == 2) +/* */ { +/* 116 */ this._line[(index - offset)] = ((String)value); +/* 117 */ set(this._line); +/* */ } +/* 119 */ break; +/* */ default: +/* 121 */ ret = super.properties(index, offset + 5, mode, value); +/* */ } +/* */ +/* 124 */ return ret; +/* */ } +/* */ +/* */ +/* 128 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 132 */ s.saveVersion(0, classCookie); +/* 133 */ super.saveState(s); +/* */ +/* 135 */ s.saveInt(this._line.length); +/* 136 */ for (int i = 0; i < this._line.length; i++) { +/* 137 */ s.saveString(this._line[i]); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 142 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 144 */ super.restoreState(r); +/* 145 */ int nLines = r.restoreInt(); +/* 146 */ this._line = new String[nLines]; +/* 147 */ for (int i = 0; i < nLines; i++) +/* 148 */ this._line[i] = r.restoreString(); +/* 149 */ break; +/* */ default: +/* 151 */ throw new TooNewException(); +/* */ } +/* 153 */ set(this._line); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BizCard.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BooleanFieldEditorDialog.java b/NET/worlds/scape/BooleanFieldEditorDialog.java new file mode 100644 index 0000000..877d4e9 --- /dev/null +++ b/NET/worlds/scape/BooleanFieldEditorDialog.java @@ -0,0 +1,46 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class BooleanFieldEditorDialog +/* */ extends CheckboxEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Property property; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ BooleanFieldEditorDialog(EditTile parent, String title, Property property, String[] choices) +/* */ { +/* 26 */ super(parent, title, choices); +/* 27 */ this.property = property; +/* 28 */ ready(); +/* */ } +/* */ +/* */ protected int getValue() +/* */ { +/* 33 */ return ((Boolean)this.property.get()).booleanValue() ? 1 : 0; +/* */ } +/* */ +/* */ protected void setValue(int choice) +/* */ { +/* 38 */ this.parent.addUndoableSet(this.property, new Boolean(choice == 1)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BooleanFieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BooleanPropertyEditor.java b/NET/worlds/scape/BooleanPropertyEditor.java new file mode 100644 index 0000000..2797c5d --- /dev/null +++ b/NET/worlds/scape/BooleanPropertyEditor.java @@ -0,0 +1,76 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BooleanPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private String falseName; +/* */ private String trueName; +/* */ +/* */ private BooleanPropertyEditor(Property property, String falseName, String trueName) +/* */ { +/* 50 */ super(property); +/* 51 */ this.falseName = falseName; +/* 52 */ this.trueName = trueName; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 57 */ String[] choices = { this.falseName, this.trueName }; +/* 58 */ return new BooleanFieldEditorDialog(parent, title, this.property, +/* 59 */ choices); +/* */ } +/* */ +/* */ +/* */ public static Property make(Property property, String falseName, String trueName) +/* */ { +/* 65 */ property.setPropertyType(0); +/* 66 */ return property.setEditor(new BooleanPropertyEditor(property, +/* 67 */ falseName, +/* 68 */ trueName)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BooleanPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BoundBoxTemp.java b/NET/worlds/scape/BoundBoxTemp.java new file mode 100644 index 0000000..0b69c9b --- /dev/null +++ b/NET/worlds/scape/BoundBoxTemp.java @@ -0,0 +1,130 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BoundBoxTemp +/* */ { +/* 25 */ private static Recycler recycler = new Recycler(); +/* */ +/* */ public Point3Temp lo; +/* */ +/* */ public Point3Temp hi; +/* */ +/* */ public static BoundBoxTemp make(Point3Temp a, Point3Temp b) +/* */ { +/* 33 */ BoundBoxTemp t = (BoundBoxTemp)recycler.alloc(); +/* */ +/* 35 */ if (t == null) +/* */ { +/* 37 */ recycler.recycle(new BoundBoxTemp()); +/* 38 */ t = (BoundBoxTemp)recycler.alloc(); +/* */ } +/* */ +/* 41 */ t.lo = Point3Temp.make(a); +/* 42 */ t.hi = Point3Temp.make(b); +/* */ +/* 44 */ if (a.x > b.x) +/* */ { +/* 46 */ t.lo.x = b.x; +/* 47 */ t.hi.x = a.x; +/* */ } +/* */ +/* 50 */ if (a.y > b.y) +/* */ { +/* 52 */ t.lo.y = b.y; +/* 53 */ t.hi.y = a.y; +/* */ } +/* */ +/* 56 */ if (a.z > b.z) +/* */ { +/* 58 */ t.lo.z = b.z; +/* 59 */ t.hi.z = a.z; +/* */ } +/* 61 */ return t; +/* */ } +/* */ +/* */ public static BoundBoxTemp make(BoundBoxTemp b) +/* */ { +/* 66 */ return make(b.lo, b.hi); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean contains(Point3Temp p) +/* */ { +/* 78 */ return (p.x >= this.lo.x) && (p.x <= this.hi.x) && +/* 79 */ (p.y >= this.lo.y) && (p.y <= this.hi.y) && +/* 80 */ (p.z >= this.lo.z) && (p.z <= this.hi.z); +/* */ } +/* */ +/* */ public boolean isEmpty() +/* */ { +/* 85 */ return (this.lo.x == this.hi.x) && (this.lo.y == this.hi.y) && (this.lo.z == this.hi.z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean overlaps(BoundBoxTemp r) +/* */ { +/* 93 */ return (this.hi.x >= r.lo.x) && (r.hi.x >= this.lo.x) && +/* 94 */ (this.hi.y >= r.lo.y) && (r.hi.y >= this.lo.y) && +/* 95 */ (this.hi.z >= r.lo.z) && (r.hi.z >= this.lo.z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void encompass(Point3Temp p) +/* */ { +/* 103 */ if (p.x < this.lo.x) +/* 104 */ this.lo.x = p.x; +/* 105 */ if (p.y < this.lo.y) +/* 106 */ this.lo.y = p.y; +/* 107 */ if (p.z < this.lo.z) +/* 108 */ this.lo.z = p.z; +/* 109 */ if (p.x > this.hi.x) +/* 110 */ this.hi.x = p.x; +/* 111 */ if (p.y > this.hi.y) +/* 112 */ this.hi.y = p.y; +/* 113 */ if (p.z > this.hi.z) { +/* 114 */ this.hi.z = p.z; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 122 */ return "BoundBoxTemp[lo=" + this.lo + ", hi=" + this.hi + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BoundBoxTemp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BoxBumpCalc.java b/NET/worlds/scape/BoxBumpCalc.java new file mode 100644 index 0000000..eb71b6b --- /dev/null +++ b/NET/worlds/scape/BoxBumpCalc.java @@ -0,0 +1,128 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BoxBumpCalc +/* */ extends BumpCalc +/* */ { +/* */ public void detectBump(BumpEventTemp b, WObject owner) +/* */ { +/* 53 */ BoundBoxTemp box = owner.getBoundBox(); +/* 54 */ BoundBoxTemp sourceBox = ((WObject)b.source).getBoundBox(); +/* */ +/* 56 */ box.lo.minus(sourceBox.hi.minus(b.sourceAt)); +/* 57 */ box.hi.minus(sourceBox.lo.minus(b.sourceAt)); +/* */ +/* 59 */ Point3Temp pos = Point3Temp.make(); +/* 60 */ pos.x = box.lo.x; +/* 61 */ pos.y = box.lo.y; +/* 62 */ float xExtent = box.hi.x - box.lo.x; +/* 63 */ float yExtent = box.hi.y - box.lo.y; +/* */ +/* 65 */ Point3Temp d = Point3Temp.make(xExtent, 0.0F, 0.0F); +/* 66 */ Point3Temp extent = Point3Temp.make(0.0F, yExtent / 2.0F, 0.0F); +/* */ +/* */ +/* */ +/* */ +/* 71 */ if (b.hitTriRegion(owner, pos, d, extent)) { +/* 72 */ return; +/* */ } +/* 74 */ pos.x = box.hi.x; +/* 75 */ pos.y = box.hi.y; +/* 76 */ d.x = (-d.x); +/* 77 */ extent.y = (-extent.y); +/* */ +/* 79 */ if (b.hitTriRegion(owner, pos, d, extent)) { +/* 80 */ return; +/* */ } +/* 82 */ pos.y = box.lo.y; +/* 83 */ d.y = yExtent; +/* 84 */ d.x = 0.0F; +/* 85 */ extent.x = (-xExtent / 2.0F); +/* 86 */ extent.y = 0.0F; +/* */ +/* 88 */ if (b.hitTriRegion(owner, pos, d, extent)) { +/* 89 */ return; +/* */ } +/* 91 */ pos.x = box.lo.x; +/* 92 */ pos.y = box.hi.y; +/* 93 */ d.y = (-d.y); +/* 94 */ extent.x = (-extent.x); +/* */ +/* 96 */ if (b.hitTriRegion(owner, pos, d, extent)) {} +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 104 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 108 */ s.saveVersion(0, classCookie); +/* 109 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 114 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 116 */ super.restoreState(r); +/* 117 */ break; +/* */ default: +/* 119 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BoxBumpCalc.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BuildRamp.java b/NET/worlds/scape/BuildRamp.java new file mode 100644 index 0000000..756fb3a --- /dev/null +++ b/NET/worlds/scape/BuildRamp.java @@ -0,0 +1,365 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BuildRamp +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, Persister +/* */ { +/* 31 */ protected boolean doBuild = false; +/* 32 */ protected boolean built = false; +/* 33 */ protected WrRamp ramp = null; +/* */ +/* */ +/* 36 */ protected String stairName = "ramp"; +/* 37 */ protected float length = 1000.0F; +/* 38 */ protected float width = 300.0F; +/* 39 */ protected float pWidth = 250.0F; +/* 40 */ protected float pHeight = 240.0F; +/* 41 */ protected float dz = 300.0F; +/* 42 */ protected float lintelZ = 50.0F; +/* 43 */ protected float floorTileX = 300.0F; +/* 44 */ protected float floorTileY = 200.0F; +/* 45 */ protected float ceilTileX = 300.0F; +/* 46 */ protected float ceilTileY = 200.0F; +/* 47 */ protected float leftTileX = 100.0F; +/* 48 */ protected float leftTileY = 100.0F; +/* 49 */ protected float rightTileX = 100.0F; +/* 50 */ protected float rightTileY = 100.0F; +/* */ +/* */ +/* 53 */ protected Material floor = new Material(Color.green); +/* 54 */ protected Material left = new Material(Color.cyan); +/* 55 */ protected Material right = new Material(Color.red); +/* 56 */ protected Material doorpost = new Material(Color.yellow); +/* 57 */ protected Material lintel = new Material(Color.magenta); +/* 58 */ protected Material ceiling = new Material(Color.blue); +/* */ +/* 60 */ protected String worldURL = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void build(Portal end1) +/* */ { +/* 74 */ Room room = end1.getRoom(); +/* 75 */ World world = room.getWorld(); +/* */ +/* */ +/* 78 */ this.ramp = new WrRamp(world, this.stairName, +/* 79 */ this.length, this.width, this.pWidth, this.pHeight, +/* 80 */ this.dz, this.lintelZ, +/* 81 */ this.floorTileX, this.floorTileY, this.ceilTileX, this.ceilTileY, +/* 82 */ this.leftTileX, this.leftTileY, this.rightTileX, this.rightTileY, +/* 83 */ this.floor, this.left, this.right, this.doorpost, this.lintel, this.ceiling); +/* */ +/* */ +/* 86 */ end1.biconnect(this.ramp.portal1); +/* */ +/* */ +/* 89 */ this.built = true; +/* */ +/* 91 */ end1.removeHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void unbuild(Portal end1) +/* */ { +/* 103 */ this.built = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 113 */ if ((!this.built) && (this.doBuild) && ((e.target instanceof Portal))) { +/* 114 */ build((Portal)e.target); +/* 115 */ } else if ((this.built) && (!this.doBuild) && ((e.target instanceof Portal))) +/* 116 */ unbuild((Portal)e.target); +/* 117 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 127 */ Object ret = null; +/* 128 */ switch (index - offset) { +/* */ case 0: +/* 130 */ if (mode == 0) +/* 131 */ ret = new ClassProperty(this, index, "BuildRamp"); +/* 132 */ break; +/* */ case 1: +/* 134 */ if (mode == 0) { +/* 135 */ ret = BooleanPropertyEditor.make( +/* 136 */ new Property(this, index, "Build now?"), +/* 137 */ "Later", "Now"); +/* 138 */ } else if (mode == 1) { +/* 139 */ ret = new Boolean(this.doBuild); +/* 140 */ } else if (mode == 2) +/* 141 */ this.doBuild = ((Boolean)value).booleanValue(); +/* 142 */ break; +/* */ case 2: +/* 144 */ if (mode == 0) { +/* 145 */ ret = StringPropertyEditor.make( +/* 146 */ new Property(this, index, "Staircase Name")); +/* 147 */ } else if (mode == 1) { +/* 148 */ ret = this.stairName; +/* 149 */ } else if (mode == 2) +/* 150 */ this.stairName = ((String)value); +/* 151 */ break; +/* */ case 3: +/* 153 */ if (mode == 0) { +/* 154 */ ret = FloatPropertyEditor.make( +/* 155 */ new Property(this, index, "Portal-to-portal Distance")); +/* 156 */ } else if (mode == 1) { +/* 157 */ ret = new Float(this.length); +/* 158 */ } else if (mode == 2) +/* 159 */ this.length = ((Float)value).floatValue(); +/* 160 */ break; +/* */ case 4: +/* 162 */ if (mode == 0) { +/* 163 */ ret = FloatPropertyEditor.make( +/* 164 */ new Property(this, index, "Stairwell Width")); +/* 165 */ } else if (mode == 1) { +/* 166 */ ret = new Float(this.width); +/* 167 */ } else if (mode == 2) +/* 168 */ this.width = ((Float)value).floatValue(); +/* 169 */ break; +/* */ case 5: +/* 171 */ if (mode == 0) { +/* 172 */ ret = FloatPropertyEditor.make( +/* 173 */ new Property(this, index, "Portal Width")); +/* 174 */ } else if (mode == 1) { +/* 175 */ ret = new Float(this.pWidth); +/* 176 */ } else if (mode == 2) +/* 177 */ this.pWidth = ((Float)value).floatValue(); +/* 178 */ break; +/* */ case 6: +/* 180 */ if (mode == 0) { +/* 181 */ ret = FloatPropertyEditor.make( +/* 182 */ new Property(this, index, "Portal Height")); +/* 183 */ } else if (mode == 1) { +/* 184 */ ret = new Float(this.pHeight); +/* 185 */ } else if (mode == 2) +/* 186 */ this.pHeight = ((Float)value).floatValue(); +/* 187 */ break; +/* */ case 7: +/* 189 */ if (mode == 0) { +/* 190 */ ret = FloatPropertyEditor.make( +/* 191 */ new Property(this, index, "Total Rise")); +/* 192 */ } else if (mode == 1) { +/* 193 */ ret = new Float(this.dz); +/* 194 */ } else if (mode == 2) +/* 195 */ this.dz = ((Float)value).floatValue(); +/* 196 */ break; +/* */ case 8: +/* 198 */ if (mode == 0) { +/* 199 */ ret = FloatPropertyEditor.make( +/* 200 */ new Property(this, index, "Lintel Height")); +/* 201 */ } else if (mode == 1) { +/* 202 */ ret = new Float(this.lintelZ); +/* 203 */ } else if (mode == 2) +/* 204 */ this.lintelZ = ((Float)value).floatValue(); +/* 205 */ break; +/* */ case 9: +/* 207 */ if (mode == 0) { +/* 208 */ ret = Point2PropertyEditor.make( +/* 209 */ new Property(this, index, "Floor Tile Size")); +/* 210 */ } else if (mode == 1) { +/* 211 */ Point2 coords = new Point2(); +/* 212 */ coords.x = this.floorTileX; +/* 213 */ coords.y = this.floorTileY; +/* 214 */ ret = coords; +/* 215 */ } else if (mode == 2) { +/* 216 */ this.floorTileX = ((Point2)value).x; +/* 217 */ this.floorTileY = ((Point2)value).y; +/* */ } +/* 219 */ break; +/* */ case 10: +/* 221 */ if (mode == 0) { +/* 222 */ ret = Point2PropertyEditor.make( +/* 223 */ new Property(this, index, "Ceiling Tile Size")); +/* 224 */ } else if (mode == 1) { +/* 225 */ Point2 coords = new Point2(); +/* 226 */ coords.x = this.ceilTileX; +/* 227 */ coords.y = this.ceilTileY; +/* 228 */ ret = coords; +/* 229 */ } else if (mode == 2) { +/* 230 */ this.ceilTileX = ((Point2)value).x; +/* 231 */ this.ceilTileY = ((Point2)value).y; +/* */ } +/* 233 */ break; +/* */ case 11: +/* 235 */ if (mode == 0) { +/* 236 */ ret = Point2PropertyEditor.make( +/* 237 */ new Property(this, index, "Left Wall Tile Size")); +/* 238 */ } else if (mode == 1) { +/* 239 */ Point2 coords = new Point2(); +/* 240 */ coords.x = this.leftTileX; +/* 241 */ coords.y = this.leftTileY; +/* 242 */ ret = coords; +/* 243 */ } else if (mode == 2) { +/* 244 */ this.leftTileX = ((Point2)value).x; +/* 245 */ this.leftTileY = ((Point2)value).y; +/* */ } +/* 247 */ break; +/* */ case 12: +/* 249 */ if (mode == 0) { +/* 250 */ ret = Point2PropertyEditor.make( +/* 251 */ new Property(this, index, "Right Wall Tile Size")); +/* 252 */ } else if (mode == 1) { +/* 253 */ Point2 coords = new Point2(); +/* 254 */ coords.x = this.rightTileX; +/* 255 */ coords.y = this.rightTileY; +/* 256 */ ret = coords; +/* 257 */ } else if (mode == 2) { +/* 258 */ this.rightTileX = ((Point2)value).x; +/* 259 */ this.rightTileY = ((Point2)value).y; +/* */ } +/* 261 */ break; +/* */ case 13: +/* 263 */ if (mode == 0) { +/* 264 */ ret = new Property(this, index, "Floor Material"); +/* 265 */ } else if (mode == 1) +/* 266 */ ret = this.floor; +/* 267 */ break; +/* */ case 14: +/* 269 */ if (mode == 0) { +/* 270 */ ret = new Property(this, index, "Left Wall Material"); +/* 271 */ } else if (mode == 1) +/* 272 */ ret = this.left; +/* 273 */ break; +/* */ case 15: +/* 275 */ if (mode == 0) { +/* 276 */ ret = new Property(this, index, "Right Wall Material"); +/* 277 */ } else if (mode == 1) +/* 278 */ ret = this.right; +/* 279 */ break; +/* */ case 16: +/* 281 */ if (mode == 0) { +/* 282 */ ret = new Property(this, index, "Doorpost Material"); +/* 283 */ } else if (mode == 1) +/* 284 */ ret = this.doorpost; +/* 285 */ break; +/* */ case 17: +/* 287 */ if (mode == 0) { +/* 288 */ ret = new Property(this, index, "Lintel Material"); +/* 289 */ } else if (mode == 1) +/* 290 */ ret = this.lintel; +/* 291 */ break; +/* */ case 18: +/* 293 */ if (mode == 0) { +/* 294 */ ret = new Property(this, index, "Ceiling Material"); +/* 295 */ } else if (mode == 1) +/* 296 */ ret = this.ceiling; +/* 297 */ break; +/* */ default: +/* 299 */ ret = super.properties(index, offset + 19, mode, value); +/* */ } +/* */ +/* 302 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 309 */ return "Ramp: built=" + this.built; +/* */ } +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 317 */ s.saveBoolean(this.built); +/* 318 */ s.saveString(this.stairName); +/* 319 */ s.saveFloat(this.length); +/* 320 */ s.saveFloat(this.width); +/* 321 */ s.saveFloat(this.pWidth); +/* 322 */ s.saveFloat(this.pHeight); +/* 323 */ s.saveFloat(this.dz); +/* 324 */ s.saveFloat(this.lintelZ); +/* 325 */ s.saveFloat(this.floorTileX); +/* 326 */ s.saveFloat(this.floorTileY); +/* 327 */ s.saveFloat(this.ceilTileX); +/* 328 */ s.saveFloat(this.ceilTileY); +/* 329 */ s.saveFloat(this.leftTileX); +/* 330 */ s.saveFloat(this.leftTileY); +/* 331 */ s.saveFloat(this.rightTileX); +/* 332 */ s.saveFloat(this.rightTileY); +/* */ } +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 340 */ this.built = r.restoreBoolean(); +/* 341 */ this.stairName = r.restoreString(); +/* 342 */ this.length = r.restoreFloat(); +/* 343 */ this.width = r.restoreFloat(); +/* 344 */ this.pWidth = r.restoreFloat(); +/* 345 */ this.pHeight = r.restoreFloat(); +/* 346 */ this.dz = r.restoreFloat(); +/* 347 */ this.lintelZ = r.restoreFloat(); +/* 348 */ this.floorTileX = r.restoreFloat(); +/* 349 */ this.floorTileY = r.restoreFloat(); +/* 350 */ this.ceilTileX = r.restoreFloat(); +/* 351 */ this.ceilTileY = r.restoreFloat(); +/* 352 */ this.leftTileX = r.restoreFloat(); +/* 353 */ this.leftTileY = r.restoreFloat(); +/* 354 */ this.rightTileX = r.restoreFloat(); +/* 355 */ this.rightTileY = r.restoreFloat(); +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BuildRamp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BuildStairs.java b/NET/worlds/scape/BuildStairs.java new file mode 100644 index 0000000..eb46734 --- /dev/null +++ b/NET/worlds/scape/BuildStairs.java @@ -0,0 +1,302 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BuildStairs +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, Persister +/* */ { +/* 31 */ protected boolean doBuild = false; +/* 32 */ protected boolean built = false; +/* 33 */ protected WrStaircase stairs = null; +/* */ +/* */ +/* 36 */ protected String stairName = "staircase"; +/* 37 */ protected float length = 1000.0F; +/* 38 */ protected float width = 300.0F; +/* 39 */ protected float pWidth = 250.0F; +/* 40 */ protected float pHeight = 240.0F; +/* 41 */ protected float dz = 300.0F; +/* 42 */ protected float lintelZ = 50.0F; +/* 43 */ protected int numsteps = 10; +/* */ +/* */ +/* 46 */ protected Material riser = new Material(Color.gray); +/* 47 */ protected Material tread = new Material(Color.green); +/* 48 */ protected Material left = new Material(Color.cyan); +/* 49 */ protected Material right = new Material(Color.red); +/* 50 */ protected Material doorpost = new Material(Color.yellow); +/* 51 */ protected Material lintel = new Material(Color.magenta); +/* 52 */ protected Material ceiling = new Material(Color.blue); +/* */ +/* 54 */ protected String worldURL = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void build(Portal end1) +/* */ { +/* 68 */ Room room = end1.getRoom(); +/* 69 */ World world = room.getWorld(); +/* */ +/* */ +/* 72 */ this.stairs = new WrStaircase(world, this.stairName, +/* 73 */ this.length, this.width, this.pWidth, this.pHeight, +/* 74 */ this.dz, this.lintelZ, this.numsteps, +/* 75 */ this.riser, this.tread, this.left, this.right, this.doorpost, this.lintel, this.ceiling); +/* */ +/* */ +/* 78 */ end1.biconnect(this.stairs.portal1); +/* */ +/* */ +/* 81 */ this.built = true; +/* */ +/* 83 */ end1.removeHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void unbuild(Portal end1) +/* */ { +/* 95 */ this.built = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 105 */ if ((!this.built) && (this.doBuild) && ((e.target instanceof Portal))) { +/* 106 */ build((Portal)e.target); +/* 107 */ } else if ((this.built) && (!this.doBuild) && ((e.target instanceof Portal))) +/* 108 */ unbuild((Portal)e.target); +/* 109 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 119 */ Object ret = null; +/* 120 */ switch (index - offset) { +/* */ case 0: +/* 122 */ if (mode == 0) +/* 123 */ ret = new ClassProperty(this, index, "BuildStairs"); +/* 124 */ break; +/* */ case 1: +/* 126 */ if (mode == 0) { +/* 127 */ ret = BooleanPropertyEditor.make( +/* 128 */ new Property(this, index, "Build now?"), +/* 129 */ "Later", "Now"); +/* 130 */ } else if (mode == 1) { +/* 131 */ ret = new Boolean(this.doBuild); +/* 132 */ } else if (mode == 2) +/* 133 */ this.doBuild = ((Boolean)value).booleanValue(); +/* 134 */ break; +/* */ case 2: +/* 136 */ if (mode == 0) { +/* 137 */ ret = StringPropertyEditor.make( +/* 138 */ new Property(this, index, "Staircase Name")); +/* 139 */ } else if (mode == 1) { +/* 140 */ ret = this.stairName; +/* 141 */ } else if (mode == 2) +/* 142 */ this.stairName = ((String)value); +/* 143 */ break; +/* */ case 3: +/* 145 */ if (mode == 0) { +/* 146 */ ret = IntegerPropertyEditor.make( +/* 147 */ new Property(this, index, "Number of Steps")); +/* 148 */ } else if (mode == 1) { +/* 149 */ ret = new Integer(this.numsteps); +/* 150 */ } else if (mode == 2) +/* 151 */ this.numsteps = ((Integer)value).intValue(); +/* 152 */ break; +/* */ case 4: +/* 154 */ if (mode == 0) { +/* 155 */ ret = FloatPropertyEditor.make( +/* 156 */ new Property(this, index, "Portal-to-portal Distance")); +/* 157 */ } else if (mode == 1) { +/* 158 */ ret = new Float(this.length); +/* 159 */ } else if (mode == 2) +/* 160 */ this.length = ((Float)value).floatValue(); +/* 161 */ break; +/* */ case 5: +/* 163 */ if (mode == 0) { +/* 164 */ ret = FloatPropertyEditor.make( +/* 165 */ new Property(this, index, "Stairwell Width")); +/* 166 */ } else if (mode == 1) { +/* 167 */ ret = new Float(this.width); +/* 168 */ } else if (mode == 2) +/* 169 */ this.width = ((Float)value).floatValue(); +/* 170 */ break; +/* */ case 6: +/* 172 */ if (mode == 0) { +/* 173 */ ret = FloatPropertyEditor.make( +/* 174 */ new Property(this, index, "Portal Width")); +/* 175 */ } else if (mode == 1) { +/* 176 */ ret = new Float(this.pWidth); +/* 177 */ } else if (mode == 2) +/* 178 */ this.pWidth = ((Float)value).floatValue(); +/* 179 */ break; +/* */ case 7: +/* 181 */ if (mode == 0) { +/* 182 */ ret = FloatPropertyEditor.make( +/* 183 */ new Property(this, index, "Portal Height")); +/* 184 */ } else if (mode == 1) { +/* 185 */ ret = new Float(this.pHeight); +/* 186 */ } else if (mode == 2) +/* 187 */ this.pHeight = ((Float)value).floatValue(); +/* 188 */ break; +/* */ case 8: +/* 190 */ if (mode == 0) { +/* 191 */ ret = FloatPropertyEditor.make( +/* 192 */ new Property(this, index, "Total Rise")); +/* 193 */ } else if (mode == 1) { +/* 194 */ ret = new Float(this.dz); +/* 195 */ } else if (mode == 2) +/* 196 */ this.dz = ((Float)value).floatValue(); +/* 197 */ break; +/* */ case 9: +/* 199 */ if (mode == 0) { +/* 200 */ ret = FloatPropertyEditor.make( +/* 201 */ new Property(this, index, "Lintel Height")); +/* 202 */ } else if (mode == 1) { +/* 203 */ ret = new Float(this.lintelZ); +/* 204 */ } else if (mode == 2) +/* 205 */ this.lintelZ = ((Float)value).floatValue(); +/* 206 */ break; +/* */ case 10: +/* 208 */ if (mode == 0) { +/* 209 */ ret = new Property(this, index, "Riser Material"); +/* 210 */ } else if (mode == 1) +/* 211 */ ret = this.riser; +/* 212 */ break; +/* */ case 11: +/* 214 */ if (mode == 0) { +/* 215 */ ret = new Property(this, index, "Tread Material"); +/* 216 */ } else if (mode == 1) +/* 217 */ ret = this.tread; +/* 218 */ break; +/* */ case 12: +/* 220 */ if (mode == 0) { +/* 221 */ ret = new Property(this, index, "Left Wall Material"); +/* 222 */ } else if (mode == 1) +/* 223 */ ret = this.left; +/* 224 */ break; +/* */ case 13: +/* 226 */ if (mode == 0) { +/* 227 */ ret = new Property(this, index, "Right Wall Material"); +/* 228 */ } else if (mode == 1) +/* 229 */ ret = this.right; +/* 230 */ break; +/* */ case 14: +/* 232 */ if (mode == 0) { +/* 233 */ ret = new Property(this, index, "Doorpost Material"); +/* 234 */ } else if (mode == 1) +/* 235 */ ret = this.doorpost; +/* 236 */ break; +/* */ case 15: +/* 238 */ if (mode == 0) { +/* 239 */ ret = new Property(this, index, "Lintel Material"); +/* 240 */ } else if (mode == 1) +/* 241 */ ret = this.lintel; +/* 242 */ break; +/* */ case 16: +/* 244 */ if (mode == 0) { +/* 245 */ ret = new Property(this, index, "Ceiling Material"); +/* 246 */ } else if (mode == 1) +/* 247 */ ret = this.ceiling; +/* 248 */ break; +/* */ default: +/* 250 */ ret = super.properties(index, offset + 17, mode, value); +/* */ } +/* */ +/* 253 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 260 */ return "Stairs: built=" + this.built; +/* */ } +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 268 */ s.saveBoolean(this.built); +/* 269 */ s.saveString(this.stairName); +/* 270 */ s.saveFloat(this.length); +/* 271 */ s.saveFloat(this.width); +/* 272 */ s.saveFloat(this.pWidth); +/* 273 */ s.saveFloat(this.pHeight); +/* 274 */ s.saveFloat(this.dz); +/* 275 */ s.saveFloat(this.lintelZ); +/* 276 */ s.saveInt(this.numsteps); +/* */ } +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 284 */ this.built = r.restoreBoolean(); +/* 285 */ this.stairName = r.restoreString(); +/* 286 */ this.length = r.restoreFloat(); +/* 287 */ this.width = r.restoreFloat(); +/* 288 */ this.pWidth = r.restoreFloat(); +/* 289 */ this.pHeight = r.restoreFloat(); +/* 290 */ this.dz = r.restoreFloat(); +/* 291 */ this.lintelZ = r.restoreFloat(); +/* 292 */ this.numsteps = r.restoreInt(); +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BuildStairs.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BumpAttribute.java b/NET/worlds/scape/BumpAttribute.java new file mode 100644 index 0000000..53cd71c --- /dev/null +++ b/NET/worlds/scape/BumpAttribute.java @@ -0,0 +1,89 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BumpAttribute +/* */ extends Attribute +/* */ { +/* */ public BumpAttribute(int attrID) +/* */ { +/* 32 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ public BumpAttribute() {} +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 41 */ WObject w = (WObject)((Sharer)owner).getOwner(); +/* */ +/* 43 */ w._bumpableAttribute = this; +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 48 */ WObject w = (WObject)((Sharer)getOwner()).getOwner(); +/* 49 */ w._bumpableAttribute = null; +/* 50 */ super.detach(); +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 55 */ s.writeBoolean(((WObject)getOwner().getOwner()).getBumpable()); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 60 */ ((WObject)getOwner().getOwner()).setBumpable(ds.readBoolean()); +/* */ } +/* */ +/* */ +/* */ +/* 65 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 69 */ s.saveVersion(0, classCookie); +/* 70 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 75 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 77 */ super.restoreState(r); +/* 78 */ break; +/* */ default: +/* 80 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BumpAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BumpCalc.java b/NET/worlds/scape/BumpCalc.java new file mode 100644 index 0000000..7499c53 --- /dev/null +++ b/NET/worlds/scape/BumpCalc.java @@ -0,0 +1,39 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class BumpCalc +/* */ extends SuperRoot +/* */ { +/* */ public abstract void detectBump(BumpEventTemp paramBumpEventTemp, WObject paramWObject); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 31 */ return getName(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BumpCalc.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BumpEventTemp.java b/NET/worlds/scape/BumpEventTemp.java new file mode 100644 index 0000000..a7b7153 --- /dev/null +++ b/NET/worlds/scape/BumpEventTemp.java @@ -0,0 +1,396 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BumpEventTemp +/* */ extends Event +/* */ { +/* 42 */ private static Recycler recycler = new Recycler(); +/* */ public Point3Temp fullPath; +/* */ public Point3Temp path; +/* */ public BoundBoxTemp bound; +/* */ public float fraction; +/* */ public Room postBumpRoom; +/* */ +/* */ public static BumpEventTemp make(int time, WObject mover, Point3Temp motion) +/* */ { +/* 51 */ BumpEventTemp t = (BumpEventTemp)recycler.alloc(); +/* */ +/* 53 */ if (t == null) { +/* 54 */ recycler.recycle(new BumpEventTemp(0, null)); +/* 55 */ t = (BumpEventTemp)recycler.alloc(); +/* */ } +/* */ +/* */ +/* 59 */ assert (t.source == null); +/* */ +/* 61 */ t.time = time; +/* 62 */ t.source = mover; +/* */ +/* */ +/* */ +/* */ +/* 67 */ t.fullPath = Point3Temp.make(motion); +/* 68 */ t.path = t.fullPath; +/* 69 */ t.sourceAt = ((WObject)t.source).getWorldPosition(); +/* 70 */ t.sourceBoxMinus = ((WObject)t.source).getBoundBox(); +/* 71 */ t.sourceBoxMinus.lo.minus(t.sourceAt); +/* 72 */ t.sourceBoxMinus.hi.minus(t.sourceAt); +/* */ +/* 74 */ t.setPathFraction(1.0F); +/* */ +/* */ +/* 77 */ Room r = mover.getRoom(); +/* 78 */ if (r.getBumpable()) { +/* 79 */ r.detectBump(t); +/* */ } +/* 81 */ return t; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recycle() +/* */ { +/* 91 */ this.time = 0; +/* 92 */ this.source = null; +/* 93 */ this.target = null; +/* 94 */ this.receiver = null; +/* */ +/* 96 */ this.postBumpRoom = null; +/* 97 */ this.postBumpPath = null; +/* 98 */ this.postBumpPosition = null; +/* */ } +/* */ +/* */ private BumpEventTemp(int time, Object source) { +/* 102 */ super(time, source, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform postBumpPosition; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp postBumpPath; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp sourceAt; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp sourceBoxMinus; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp bumpNormal; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setPathFraction(float fraction) +/* */ { +/* 164 */ this.fraction = fraction; +/* 165 */ this.path = Point3Temp.make(this.path).times(fraction); +/* */ +/* 167 */ this.bound = BoundBoxTemp.make(this.sourceAt, Point3Temp.make(this.sourceAt) +/* 168 */ .plus(this.path)); +/* 169 */ this.bound.lo.plus(this.sourceBoxMinus.lo); +/* 170 */ this.bound.hi.plus(this.sourceBoxMinus.hi); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float isCollision(Point3Temp left, Point3Temp d, Point3Temp start, Point3Temp motion) +/* */ { +/* 198 */ double D = motion.x * -d.y + motion.y * d.x; +/* */ +/* */ +/* 201 */ if (D > 0.0D) { +/* 202 */ Point3Temp C = Point3Temp.make(start).minus(left); +/* */ +/* 204 */ double betaNum = C.x * d.y - C.y * d.x; +/* */ +/* 206 */ double alphaNum = C.x * motion.y - motion.x * C.y; +/* */ +/* 208 */ if ((alphaNum >= 0.0D) && (alphaNum <= D) && (betaNum >= 0.0D) && +/* 209 */ (betaNum <= D)) { +/* 210 */ return (float)(betaNum / D); +/* */ } +/* */ +/* 213 */ return -2.0F; +/* */ } +/* */ +/* 216 */ return -1.0F; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float hitPlane(WObject o, Point3Temp left, Point3Temp d) +/* */ { +/* 227 */ float dist = isCollision(left, d, this.sourceAt, this.path); +/* 228 */ if (dist >= 0.0F) { +/* 229 */ this.target = o; +/* */ +/* 231 */ setPathFraction(dist); +/* 232 */ this.bumpNormal = Point3Temp.make(d.y, -d.x, 0.0F).normalize(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 250 */ this.path.plus(Point3Temp.make(this.path).normalize().times(0.2F)); +/* */ } +/* */ +/* 253 */ return dist; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hitRegion(WObject o, Point3Temp left, Point3Temp d, Point3Temp extent) +/* */ { +/* 275 */ float dist = hitPlane(o, left, d); +/* 276 */ if (dist >= 0.0F) { +/* 277 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 284 */ if (dist == -1.0F) { +/* 285 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 293 */ Point3Temp right = Point3Temp.make(left).plus(d); +/* 294 */ Point3Temp minusD = Point3Temp.make().minus(d); +/* 295 */ Point3Temp minusExtent = Point3Temp.make().minus(extent); +/* 296 */ if ((dist = isCollision(right, minusD, this.sourceAt, minusExtent)) > 0.0F) { +/* 297 */ this.target = o; +/* */ +/* 299 */ setPathFraction(0.0F); +/* 300 */ this.bumpNormal = minusExtent; +/* 301 */ return true; +/* */ } +/* */ +/* 304 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hitTriRegion(WObject o, Point3Temp left, Point3Temp d, Point3Temp extent) +/* */ { +/* 323 */ float dist = hitPlane(o, left, d); +/* 324 */ if (dist >= 0.0F) { +/* 325 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 332 */ if (dist == -1.0F) { +/* 333 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 340 */ Point3Temp right = Point3Temp.make(left).plus(d); +/* 341 */ Point3Temp minusD = Point3Temp.make().minus(d); +/* 342 */ Point3Temp minusExtent = Point3Temp.make().minus(extent); +/* 343 */ if ((dist = isCollision(right, minusD, this.sourceAt, minusExtent)) > 0.0F) +/* */ { +/* */ +/* */ +/* */ +/* 348 */ float dx = this.sourceAt.x - (left.x + d.x / 2.0F); +/* 349 */ float dy = this.sourceAt.y - (left.y + d.y / 2.0F); +/* 350 */ float squaredDistFromMid = dx * dx + dy * dy; +/* */ +/* 352 */ dx = this.sourceAt.x - (left.x + extent.x); +/* 353 */ dy = this.sourceAt.y - (left.y + extent.y); +/* 354 */ float squaredDistFromA = dx * dx + dy * dy; +/* 355 */ if (squaredDistFromA < squaredDistFromMid) { +/* 356 */ return false; +/* */ } +/* 358 */ dx = this.sourceAt.x - (right.x + extent.x); +/* 359 */ dy = this.sourceAt.y - (right.y + extent.y); +/* 360 */ float squaredDistFromB = dx * dx + dy * dy; +/* 361 */ if (squaredDistFromB < squaredDistFromMid) { +/* 362 */ return false; +/* */ } +/* 364 */ this.target = o; +/* */ +/* 366 */ setPathFraction(0.0F); +/* 367 */ this.bumpNormal = minusExtent; +/* 368 */ return true; +/* */ } +/* */ +/* 371 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 382 */ if ((o instanceof BumpHandler)) { +/* 383 */ return ((BumpHandler)o).handle(this); +/* */ } +/* */ +/* */ +/* */ +/* 388 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BumpEventTemp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BumpHandler.java b/NET/worlds/scape/BumpHandler.java new file mode 100644 index 0000000..5672b2a --- /dev/null +++ b/NET/worlds/scape/BumpHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface BumpHandler +{ + public abstract boolean handle(BumpEventTemp paramBumpEventTemp); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BumpHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/BumpSensor.java b/NET/worlds/scape/BumpSensor.java new file mode 100644 index 0000000..8304d45 --- /dev/null +++ b/NET/worlds/scape/BumpSensor.java @@ -0,0 +1,43 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class BumpSensor +/* */ extends Sensor +/* */ implements BumpHandler +/* */ { +/* */ public BumpSensor(Action a) +/* */ { +/* 24 */ if (a != null) { +/* 25 */ addAction(a); +/* */ } +/* */ } +/* */ +/* */ public BumpSensor() {} +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 33 */ if ((e.source instanceof Pilot)) +/* 34 */ trigger(e); +/* 35 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BumpSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDAudio.java b/NET/worlds/scape/CDAudio.java new file mode 100644 index 0000000..9fb5928 --- /dev/null +++ b/NET/worlds/scape/CDAudio.java @@ -0,0 +1,597 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MainTerminalCallback; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDAudio +/* */ implements Runnable, MainCallback, MainTerminalCallback +/* */ { +/* */ private static final int STOP = 0; +/* */ private static final int PLAY = 1; +/* */ private static final int PAUSE = 2; +/* */ private static final int NEXT = 3; +/* */ private static final int PREV = 4; +/* */ private static final int CHANGE = 5; +/* */ private static final int CHANGE_MIDI = 6; +/* */ private boolean performedStartupPlay; +/* */ private boolean cancel; +/* */ private Thread playerThread; +/* 67 */ private Vector commandBuffer = new Vector(); +/* */ private boolean paused; +/* */ private int driveID; +/* */ private CDTrackInfo tracks; +/* */ private int trackOffset; +/* 72 */ private Object tracksMutex = new Object(); +/* */ private int pos; +/* */ private SoundPlayer midiPlayer; +/* 75 */ private URL defaultMIDIFile = URL.make("home:start.mid"); +/* 76 */ private URL curMIDIFile = this.defaultMIDIFile; +/* 77 */ private int trackToRepeat = -1; +/* 78 */ private int repeatingTrack = -1; +/* 79 */ private boolean enabled = true; +/* */ +/* 81 */ private static CDAudio instance = new CDAudio(); +/* */ +/* */ public static CDAudio get() +/* */ { +/* 85 */ return instance; +/* */ } +/* */ +/* */ public String getTimeReadout() +/* */ { +/* 90 */ synchronized (this.tracksMutex) { +/* 91 */ if (this.tracks == null) +/* */ { +/* 93 */ this.tracksMutex.notify(); +/* 94 */ return "00 [00:00]"; +/* */ } +/* 96 */ int count = this.tracks.getNumTracks(); +/* 97 */ if (this.pos != 0) { +/* 98 */ for (int i = 0; i < count; i++) +/* 99 */ if (this.pos < this.tracks.getEndFrames(i)) +/* 100 */ return +/* 101 */ fmt2(i + 1) + " " + fmtFrames(this.pos - this.tracks.getStartFrames(i)); +/* */ } +/* 103 */ return +/* 104 */ fmt2(count) + " " + fmtFrames(this.tracks.getEndFrames(count - 1)); +/* */ } +/* */ } +/* */ +/* */ public void setEnabled(boolean state) +/* */ { +/* 110 */ if (this.enabled != state) { +/* 111 */ this.enabled = state; +/* 112 */ if (!this.enabled) { +/* 113 */ stop(); +/* */ } else +/* 115 */ change(true); +/* */ } +/* */ } +/* */ +/* 119 */ public void play() { queueCommand(1); } +/* 120 */ public void pause() { queueCommand(2); } +/* 121 */ public void stop() { queueCommand(0); } +/* 122 */ public void next() { queueCommand(3); } +/* 123 */ public void prev() { queueCommand(4); } +/* */ +/* */ public void change(boolean loop) +/* */ { +/* 127 */ queueCommand(5); +/* */ } +/* */ +/* */ public static void startupPlay() { +/* 131 */ get(); +/* */ } +/* */ +/* */ public void setMIDIFile(URL url) +/* */ { +/* 136 */ this.curMIDIFile = url; +/* */ } +/* */ +/* */ public URL getDefaultMIDIFile() +/* */ { +/* 141 */ return this.defaultMIDIFile; +/* */ } +/* */ +/* */ public URL getMIDIFile() +/* */ { +/* 146 */ return this.curMIDIFile; +/* */ } +/* */ +/* */ public void setCDTrack(int track) +/* */ { +/* 151 */ this.trackToRepeat = (track - 1); +/* */ } +/* */ +/* */ public int getCDTrack() +/* */ { +/* 156 */ return this.trackToRepeat + 1; +/* */ } +/* */ +/* */ private CDAudio() { +/* 160 */ this.playerThread = new Thread(this); +/* 161 */ this.playerThread.start(); +/* */ } +/* */ +/* */ public void run() +/* */ { +/* 166 */ Main.register(this); +/* */ +/* 168 */ int numDrives = CDPlayerAction.getNumDrives(); +/* 169 */ while (!this.cancel) { +/* 170 */ for (int i = 0; i < numDrives; i++) { +/* 171 */ this.cdInDrive = false; +/* */ try { +/* 173 */ if ((this.driveID = CDPlayerAction.openDrive(i)) != 0) { +/* 174 */ if (!CDPlayerAction.isPlaying(this.driveID)) { +/* 175 */ CDTrackInfo tmp = +/* 176 */ CDPlayerAction.getDriveTrackList(this.driveID); +/* 177 */ char drive = (char)(65 + +/* 178 */ CDPlayerAction.getDriveLetterOffset(i)); +/* */ +/* */ +/* */ +/* 182 */ File f = new File(drive + ":\\WORLDS.CD"); +/* 183 */ if (f.exists()) { +/* 184 */ synchronized (this.tracksMutex) { +/* 185 */ this.tracks = tmp; +/* 186 */ this.trackOffset = 0; +/* */ +/* */ +/* */ +/* */ +/* 191 */ if (f.length() == 1L) +/* 192 */ this.trackOffset = 1; +/* */ } +/* 194 */ this.cdInDrive = true; +/* 195 */ if (this.performedStartupPlay) { +/* 196 */ flushPendingCommands(); +/* */ } else +/* 198 */ this.performedStartupPlay = true; +/* 199 */ change(true); +/* 200 */ waitForCommands(); +/* */ } +/* */ } +/* 203 */ this.driveID = 0; +/* */ } +/* */ } +/* */ catch (IOException localIOException) {} +/* */ +/* 208 */ if (this.driveID != 0) { +/* */ try { +/* 210 */ CDPlayerAction.closeDrive(this.driveID); +/* */ } catch (IOException localIOException1) {} +/* 212 */ this.driveID = 0; +/* 213 */ this.paused = false; +/* 214 */ this.pos = 0; +/* */ } +/* */ } +/* 217 */ this.performedStartupPlay = true; +/* */ +/* 219 */ this.cdInDrive = false; +/* */ +/* 221 */ synchronized (this.tracksMutex) { +/* 222 */ this.tracks = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 228 */ if (!this.cancel) +/* */ { +/* */ +/* 231 */ timedWait(10); +/* */ +/* 233 */ synchronized (this.tracksMutex) +/* */ { +/* */ +/* 236 */ if (!this.cancel) { +/* */ try { +/* 238 */ this.tracksMutex.wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ } +/* */ } +/* */ } +/* 245 */ Main.unregister(this); +/* */ } +/* */ +/* 248 */ static boolean useMidiFlag = IniFile.gamma().getIniInt("MIDIONSTART", 1) != 0; +/* 249 */ static boolean useAutoCDFlag = IniFile.gamma().getIniInt("AUTOPLAYCD", 1) != 0; +/* */ private boolean cdInDrive; +/* */ private boolean allowMIDIAnyway; +/* */ private boolean midiPaused; +/* */ private boolean midiStarted; +/* */ +/* 255 */ public void useAutoCD(boolean f) { if (f != useAutoCDFlag) { +/* 256 */ useAutoCDFlag = f; +/* 257 */ IniFile.gamma().setIniInt("AUTOPLAYCD", useAutoCDFlag ? 1 : 0); +/* */ +/* 259 */ if (f) { +/* 260 */ if (this.trackToRepeat != -1) { +/* 261 */ queueCommand(5); +/* */ } +/* */ } else { +/* 264 */ queueCommand(0); +/* */ } +/* */ } +/* */ } +/* */ +/* */ private synchronized void flushPendingCommands() { +/* 270 */ this.commandBuffer.removeAllElements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private synchronized void queueCommand(int command) +/* */ { +/* 278 */ if (command != 6) +/* 279 */ this.allowMIDIAnyway = false; +/* 280 */ this.commandBuffer.addElement(new Integer(command)); +/* */ } +/* */ +/* */ private synchronized int getQueuedCommand(boolean isMidi) +/* */ { +/* 285 */ if (this.commandBuffer.size() <= 0) { +/* 286 */ return -1; +/* */ } +/* 288 */ int command = ((Integer)this.commandBuffer.elementAt(0)).intValue(); +/* */ +/* 290 */ if (command == 6) { +/* 291 */ if (!isMidi) { +/* 292 */ return -1; +/* */ } +/* 294 */ } else if (isMidi == this.cdInDrive) { +/* 295 */ return -1; +/* */ } +/* 297 */ this.commandBuffer.removeElementAt(0); +/* 298 */ return command; +/* */ } +/* */ +/* */ private synchronized int peekQueuedCommand() { +/* 302 */ if (this.commandBuffer.size() <= 0) { +/* 303 */ return -1; +/* */ } +/* 305 */ return ((Integer)this.commandBuffer.elementAt(0)).intValue(); +/* */ } +/* */ +/* */ +/* */ private void waitForCommands() +/* */ throws IOException +/* */ { +/* */ for (;;) +/* */ { +/* 314 */ if (this.cancel) { +/* 315 */ CDPlayerAction.stopAudio(this.driveID); +/* 316 */ return; +/* */ } +/* 318 */ boolean playing = CDPlayerAction.isPlaying(this.driveID); +/* 319 */ if (playing) { +/* 320 */ int tmp = CDPlayerAction.getPosition(this.driveID); +/* 321 */ if (tmp > this.pos) +/* 322 */ this.pos = tmp; +/* 323 */ this.paused = false; +/* */ } +/* */ else +/* */ { +/* 327 */ CDPlayerAction.checkDrive(this.driveID); +/* 328 */ if (!this.paused) +/* 329 */ this.pos = 0; +/* 330 */ if (this.repeatingTrack != -1) { +/* 331 */ this.pos = this.tracks.getStartFrames(this.repeatingTrack + +/* 332 */ this.trackOffset); +/* 333 */ CDPlayerAction.playAudio(this.driveID, this.pos, +/* 334 */ this.tracks.getEndFrames(this.repeatingTrack + +/* 335 */ this.trackOffset)); +/* */ } +/* */ } +/* */ int command; +/* 339 */ if ((command = getQueuedCommand(false)) < 0) +/* */ { +/* */ +/* 342 */ timedWait(1); } else { boolean playing; +/* */ int command; +/* 344 */ processCommand(command, playing); +/* */ } +/* */ } +/* */ } +/* */ +/* */ private void processCommand(int command, boolean playing) throws IOException +/* */ { +/* 351 */ int wasRepeatingTrack = this.repeatingTrack; +/* 352 */ this.repeatingTrack = -1; +/* 353 */ switch (command) { +/* */ case 5: +/* 355 */ if ((useAutoCDFlag) && (this.enabled)) +/* */ { +/* 357 */ if ((this.trackToRepeat == -1) || (this.trackToRepeat < this.tracks.getNumTracks())) { +/* 358 */ this.repeatingTrack = this.trackToRepeat; +/* 359 */ if ((wasRepeatingTrack == this.trackToRepeat) && +/* 360 */ (wasRepeatingTrack != -1)) +/* */ break; +/* */ } else { +/* 363 */ CDPlayerAction.stopAudio(this.driveID); +/* 364 */ if (this.repeatingTrack == -1) { +/* 365 */ this.allowMIDIAnyway = true; +/* 366 */ queueCommand(6); +/* */ } +/* 368 */ this.paused = false; } } +/* 369 */ break; +/* */ case 0: +/* 371 */ if ((playing) || (this.paused)) +/* 372 */ CDPlayerAction.stopAudio(this.driveID); +/* 373 */ this.paused = false; +/* 374 */ break; +/* */ case 1: +/* 376 */ if (!playing) +/* 377 */ play(-this.pos); +/* 378 */ break; +/* */ case 2: +/* 380 */ if ((playing) && (!this.paused)) { +/* 381 */ CDPlayerAction.stopAudio(this.driveID); +/* 382 */ this.paused = true; +/* */ } +/* 384 */ break; +/* */ case 3: +/* 386 */ if ((playing) || (this.paused)) { +/* 387 */ for (int i = 0; i < this.tracks.getNumTracks() - 1; i++) { +/* 388 */ if ((this.pos >= this.tracks.getStartFrames(i)) && +/* 389 */ (this.pos < this.tracks.getEndFrames(i))) { +/* 390 */ play(i + 1); +/* 391 */ break; +/* */ } +/* */ +/* */ } +/* */ } else +/* 396 */ play(0); +/* 397 */ break; +/* */ case 4: +/* 399 */ if ((playing) || (this.paused)) { +/* 400 */ for (int i = 0; i < this.tracks.getNumTracks(); i++) { +/* 401 */ if (this.pos < this.tracks.getEndFrames(i)) { +/* 402 */ if ((i > 0) && (this.pos < this.tracks.getStartFrames(i) + 75)) { +/* 403 */ play(i - 1); break; +/* */ } +/* 405 */ play(i); +/* 406 */ break; +/* */ } +/* */ } +/* */ } +/* */ break; +/* */ } +/* */ } +/* */ +/* */ private void play(int location) throws IOException +/* */ { +/* 416 */ if (location < 0) { +/* 417 */ this.pos = (-location); +/* */ } else +/* 419 */ this.pos = this.tracks.getStartFrames(location); +/* 420 */ CDPlayerAction.playAudio(this.driveID, this.pos, +/* 421 */ this.tracks.getEndFrames(this.tracks.getNumTracks() - +/* 422 */ 1)); +/* 423 */ this.paused = false; +/* */ } +/* */ +/* */ private void startMidi() +/* */ { +/* 428 */ if (this.curMIDIFile == this.defaultMIDIFile) { +/* 429 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 434 */ if (this.midiPlayer != null) { +/* 435 */ this.midiPlayer.stop(); +/* 436 */ this.midiPlayer.close(); +/* */ +/* 438 */ this.midiStarted = false; +/* 439 */ if ((MCISoundPlayer.isActive()) || (WMPSoundPlayer.isActive())) { +/* 440 */ this.midiPlayer = null; +/* */ } +/* */ +/* */ } +/* 444 */ else if ((MCISoundPlayer.isActive()) || (WMPSoundPlayer.isActive())) { +/* 445 */ return; +/* */ } +/* */ +/* 448 */ Sound s = new Sound(this.curMIDIFile); +/* */ +/* 450 */ if ((this.curMIDIFile.endsWith(".mid")) || (this.curMIDIFile.endsWith(".wav"))) { +/* 451 */ this.midiPlayer = new MCISoundPlayer(s); +/* */ } else { +/* 453 */ this.midiPlayer = new WMPSoundPlayer(s); +/* */ } +/* 455 */ this.midiPlayer.open(1.0F, 0.0F, false, false); +/* */ +/* 457 */ if (!this.midiPaused) +/* */ { +/* 459 */ this.midiPlayer.start(1); +/* */ } +/* */ } +/* */ +/* */ private void killMidi() { +/* 464 */ if (this.midiPlayer != null) { +/* 465 */ this.midiStarted = false; +/* 466 */ this.midiPlayer.stop(); +/* 467 */ this.midiPlayer.close(); +/* 468 */ this.midiPlayer = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void useMidi() +/* */ { +/* 479 */ if ((useMidiFlag) && (this.enabled) && ((!this.cdInDrive) || (this.allowMIDIAnyway))) { +/* 480 */ if (this.midiPlayer == null) { +/* 481 */ startMidi(); +/* */ } +/* 483 */ else if (this.midiPlayer.getState() == 1) +/* */ { +/* 485 */ if (this.midiStarted) { +/* 486 */ startMidi(); +/* 487 */ this.midiStarted = false; +/* */ } +/* */ } else { +/* 490 */ this.midiStarted = true; +/* */ } +/* */ } +/* */ +/* 494 */ if ((!useMidiFlag) || (!this.enabled) || ((this.cdInDrive) && (!this.allowMIDIAnyway))) +/* 495 */ killMidi(); +/* */ } +/* */ +/* */ public void setMidiFlag(boolean f) { +/* 499 */ useMidiFlag = f; +/* 500 */ IniFile.gamma().setIniInt("MIDIONSTART", useMidiFlag ? 1 : 0); +/* */ } +/* */ +/* */ public void mainCallback() { +/* 504 */ if (!this.performedStartupPlay) { +/* 505 */ return; +/* */ } +/* 507 */ useMidi(); +/* */ +/* 509 */ while ((this.midiPlayer != null) || (peekQueuedCommand() == 6)) { +/* 510 */ if ((this.cdInDrive) && (this.repeatingTrack != -1)) { +/* 511 */ if (peekQueuedCommand() == 6) +/* 512 */ getQueuedCommand(true); +/* 513 */ this.allowMIDIAnyway = false; +/* 514 */ useMidi(); return; +/* */ } +/* */ +/* */ int command; +/* */ +/* 519 */ if ((command = getQueuedCommand(true)) < 0) { +/* 520 */ return; +/* */ } +/* 522 */ switch (command) { +/* */ case 5: +/* */ case 6: +/* 525 */ if ((useMidiFlag) && (this.enabled)) { +/* 526 */ this.midiStarted = false; +/* 527 */ this.midiPaused = false; +/* 528 */ startMidi(); +/* */ } +/* 530 */ break; +/* */ case 1: +/* 532 */ if ((this.midiPaused) || (!this.midiStarted)) { +/* 533 */ this.midiPaused = false; +/* 534 */ startMidi(); +/* */ } +/* 536 */ break; +/* */ +/* */ +/* */ case 0: +/* */ case 2: +/* 541 */ this.midiPaused = true; +/* 542 */ this.midiPlayer.stop(); +/* 543 */ this.midiStarted = false; +/* 544 */ break; +/* */ +/* */ case 3: +/* */ case 4: +/* 548 */ startMidi(); +/* */ } +/* */ +/* */ } +/* */ } +/* */ +/* */ private synchronized void timedWait(int secs) +/* */ { +/* 556 */ if (!this.cancel) +/* */ try { +/* 558 */ wait(secs * 1000); +/* */ } catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ +/* */ public void terminalCallback() { +/* 563 */ this.cancel = true; +/* 564 */ killMidi(); +/* */ +/* 566 */ synchronized (this) { +/* 567 */ notify(); +/* */ } +/* */ +/* 570 */ synchronized (this.tracksMutex) { +/* 571 */ this.tracksMutex.notify(); +/* */ } +/* */ } +/* */ +/* */ private static String fmt2(int val) +/* */ { +/* 577 */ if (val < 10) +/* 578 */ return "0" + val; +/* 579 */ return val; +/* */ } +/* */ +/* */ private static String fmtFrames(int frames) +/* */ { +/* 584 */ if (frames < 0) +/* 585 */ frames = 0; +/* 586 */ int minutes = frames / 4500; +/* 587 */ frames -= minutes * 4500; +/* 588 */ int seconds = frames / 75; +/* 589 */ return "[" + fmt2(minutes) + ":" + fmt2(seconds) + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDAudio.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDControl.java b/NET/worlds/scape/CDControl.java new file mode 100644 index 0000000..006823d --- /dev/null +++ b/NET/worlds/scape/CDControl.java @@ -0,0 +1,112 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.awt.Button; +/* */ import java.awt.Checkbox; +/* */ import java.awt.Event; +/* */ import java.awt.FlowLayout; +/* */ import java.awt.Font; +/* */ import java.awt.GridLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Panel; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDControl +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Label display; +/* 30 */ private Button stopButton = new Button("[]"); +/* 31 */ private Button pauseButton = new Button("||"); +/* 32 */ private Button playButton = new Button(">"); +/* 33 */ private Button prevButton = new Button("|<<"); +/* 34 */ private Button nextButton = new Button(">>|"); +/* */ +/* 36 */ private Panel top = new Panel(); +/* 37 */ private Panel bottom = new Panel(); +/* 38 */ private Checkbox cdBox = new Checkbox( +/* 39 */ Console.message("Autoplay-CD"), +/* 40 */ CDAudio.useAutoCDFlag); +/* 41 */ private Checkbox midiBox = new Checkbox( +/* 42 */ Console.message("Autoplay-MIDI"), +/* 43 */ CDAudio.useMidiFlag); +/* */ private String time; +/* 45 */ private static Font font = new Font( +/* 46 */ Console.message("MenuFont"), 0, 12); +/* */ +/* */ public CDControl(Window parent, DialogReceiver receiver) +/* */ { +/* 50 */ super(parent, receiver, Console.message("Music"), false); +/* 51 */ this.display = new Label(this.time = CDAudio.get().getTimeReadout()); +/* 52 */ setAlignment(1); +/* 53 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 58 */ setLayout(new GridLayout(2, 1)); +/* */ +/* 60 */ this.top.setLayout(new FlowLayout()); +/* 61 */ this.top.add(this.display); +/* 62 */ this.top.add(this.stopButton); +/* 63 */ this.top.add(this.pauseButton); +/* 64 */ this.top.add(this.playButton); +/* 65 */ this.top.add(this.prevButton); +/* 66 */ this.top.add(this.nextButton); +/* */ +/* 68 */ this.bottom.setLayout(new GridLayout(2, 1)); +/* 69 */ this.cdBox.setFont(font); +/* 70 */ this.midiBox.setFont(font); +/* 71 */ this.bottom.add(this.cdBox); +/* 72 */ this.bottom.add(this.midiBox); +/* */ +/* 74 */ add(this.top); +/* 75 */ add(this.bottom); +/* */ } +/* */ +/* */ protected void activeCallback() +/* */ { +/* 80 */ String tmp = CDAudio.get().getTimeReadout(); +/* 81 */ if (!tmp.equals(this.time)) { +/* 82 */ this.display.setText(this.time = tmp); +/* */ } +/* */ } +/* */ +/* */ public boolean action(Event event, Object what) { +/* 87 */ Object target = event.target; +/* 88 */ if (target == this.stopButton) { +/* 89 */ CDAudio.get().stop(); +/* 90 */ } else if (target == this.pauseButton) { +/* 91 */ CDAudio.get().pause(); +/* 92 */ } else if (target == this.playButton) { +/* 93 */ CDAudio.get().play(); +/* 94 */ } else if (target == this.prevButton) { +/* 95 */ CDAudio.get().prev(); +/* 96 */ } else if (target == this.nextButton) { +/* 97 */ CDAudio.get().next(); +/* 98 */ } else if (target == this.cdBox) { +/* 99 */ CDAudio.get().useAutoCD(this.cdBox.getState()); +/* 100 */ } else if (target == this.midiBox) { +/* 101 */ CDAudio.get().setMidiFlag(this.midiBox.getState()); +/* */ } else +/* 103 */ return false; +/* 104 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDControl.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDBConnection.java b/NET/worlds/scape/CDDBConnection.java new file mode 100644 index 0000000..9d4d055 --- /dev/null +++ b/NET/worlds/scape/CDDBConnection.java @@ -0,0 +1,465 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.DNSLookup; +/* */ import java.io.DataInputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.net.Socket; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class CDDBConnection +/* */ { +/* */ private Socket sock; +/* */ private PrintStream sockOut; +/* */ private DataInputStream sockIn; +/* */ private boolean readOnly; +/* */ private boolean debug; +/* */ +/* */ public CDDBConnection(CDDBHost host, boolean debug) +/* */ throws IOException +/* */ { +/* 404 */ this.debug = debug; +/* 405 */ if (debug) { +/* 406 */ System.out.println("Contacting host " + host); +/* */ } +/* 408 */ this.sock = new Socket(DNSLookup.lookup(host.getHost()), host.getPort()); +/* 409 */ CDDBLookup.markActivity(); +/* 410 */ this.sockOut = new PrintStream(this.sock.getOutputStream(), true); +/* 411 */ this.sockIn = new DataInputStream(this.sock.getInputStream()); +/* 412 */ String msg = recv(); +/* 413 */ if (msg.startsWith("200 ")) { +/* 414 */ this.readOnly = false; +/* 415 */ } else if (msg.startsWith("201 ")) { +/* 416 */ this.readOnly = true; +/* */ } else { +/* 418 */ throw new IOException("Can't connect to " + host + ": " + msg); +/* */ } +/* */ } +/* */ +/* */ public String command(String command) throws IOException +/* */ { +/* 424 */ send(command); +/* 425 */ return recv(); +/* */ } +/* */ +/* */ public String readBody() throws IOException +/* */ { +/* 430 */ String str = recv(); +/* 431 */ return str.equals(".") ? null : str; +/* */ } +/* */ +/* */ public void close() +/* */ { +/* */ try { +/* 437 */ send("quit"); +/* 438 */ recv(); +/* 439 */ this.sock.close(); +/* */ } +/* */ catch (IOException localIOException) {} +/* */ } +/* */ +/* */ private void send(String msg) throws IOException { +/* 445 */ if (this.debug) +/* 446 */ System.out.println("--> " + msg); +/* 447 */ this.sockOut.println(msg); +/* 448 */ CDDBLookup.markActivity(); +/* */ } +/* */ +/* */ private String recv() throws IOException +/* */ { +/* 453 */ String msg = this.sockIn.readLine(); +/* 454 */ CDDBLookup.markActivity(); +/* 455 */ if (this.debug) +/* 456 */ System.out.println("<-- " + msg); +/* 457 */ return msg; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDBConnection.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDBHash.java b/NET/worlds/scape/CDDBHash.java new file mode 100644 index 0000000..23e8a01 --- /dev/null +++ b/NET/worlds/scape/CDDBHash.java @@ -0,0 +1,88 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDDBHash +/* */ { +/* */ public static String hashString(CDTrackInfo tracks) +/* */ { +/* 12 */ String id = Integer.toHexString(hash(tracks)); +/* 13 */ int len = id.length(); +/* 14 */ if (len < 8) { +/* 15 */ String pad = "0"; +/* */ do { +/* 17 */ pad = pad + "0";len++; +/* 16 */ } while (len < 8); +/* */ +/* 18 */ return pad + id; +/* */ } +/* 20 */ return id; +/* */ } +/* */ +/* */ public static String lookupString(CDTrackInfo tracks) +/* */ { +/* 25 */ int numTracks = tracks.getNumTracks(); +/* 26 */ String ret = hashString(tracks) + " " + numTracks; +/* 27 */ for (int i = 0; i < numTracks; i++) +/* 28 */ ret = ret + " " + tracks.getStartFrames(i); +/* 29 */ return ret + " " + leadOutSecs(tracks); +/* */ } +/* */ +/* */ private static int addDigits(int n) +/* */ { +/* 34 */ String buf = n; +/* 35 */ int ret = 0; +/* 36 */ for (int i = 0; i < buf.length(); i++) +/* 37 */ ret += buf.charAt(i) - '0'; +/* 38 */ return ret; +/* */ } +/* */ +/* */ private static int leadOutSecs(CDTrackInfo tracks) +/* */ { +/* 43 */ int last = tracks.getNumTracks() - 1; +/* */ +/* 45 */ int omin = tracks.getPosM(last); +/* 46 */ int osec = tracks.getPosS(last); +/* 47 */ int ofrm = tracks.getPosF(last); +/* */ +/* 49 */ int lmin = tracks.getLenM(last); +/* 50 */ int lsec = tracks.getLenS(last); +/* 51 */ int lfrm = tracks.getLenF(last); +/* */ +/* 53 */ lfrm++; if (lfrm == 75) { +/* 54 */ lfrm = 0; +/* 55 */ lsec++; if (lsec == 60) { +/* 56 */ lsec = 0; +/* 57 */ lmin++; +/* */ } +/* */ } +/* */ +/* 61 */ ofrm += lfrm; +/* 62 */ osec += ofrm / 75 + lsec; +/* 63 */ omin += osec / 60 + lmin; +/* 64 */ osec %= 60; +/* 65 */ return omin * 60 + osec; +/* */ } +/* */ +/* */ private static int hash(CDTrackInfo tracks) +/* */ { +/* 70 */ int n = 0; +/* 71 */ int numTracks = tracks.getNumTracks(); +/* */ +/* 73 */ for (int i = 0; i < numTracks; i++) { +/* 74 */ n += addDigits(tracks.getPosM(i) * 60 + tracks.getPosS(i)); +/* */ } +/* 76 */ int t = leadOutSecs(tracks) - +/* 77 */ tracks.getPosM(0) * 60 - tracks.getPosS(0); +/* 78 */ return n % 255 << 24 | t << 8 | numTracks; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDBHash.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDBHost.java b/NET/worlds/scape/CDDBHost.java new file mode 100644 index 0000000..7c17865 --- /dev/null +++ b/NET/worlds/scape/CDDBHost.java @@ -0,0 +1,397 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class CDDBHost +/* */ { +/* */ private String host; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int port; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public CDDBHost(String host, int port) +/* */ { +/* 380 */ this.host = host; +/* 381 */ this.port = port; +/* */ } +/* */ +/* 384 */ public String getHost() { return this.host; } +/* 385 */ public int getPort() { return this.port; } +/* */ +/* */ public String toString() +/* */ { +/* 389 */ return this.host + ":" + this.port; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDBHost.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDBLookup.java b/NET/worlds/scape/CDDBLookup.java new file mode 100644 index 0000000..7a129e4 --- /dev/null +++ b/NET/worlds/scape/CDDBLookup.java @@ -0,0 +1,381 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Hashtable; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.net.InetAddress; +/* */ import java.net.UnknownHostException; +/* */ import java.util.NoSuchElementException; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDDBLookup +/* */ implements Runnable +/* */ { +/* */ public static final int STATUS_SERVERERROR = -3; +/* */ public static final int STATUS_NOTUNIQUE = -2; +/* */ public static final int STATUS_NOTFOUND = -1; +/* */ public static final int STATUS_LOOKING = 0; +/* */ public static final int STATUS_EXACTMATCH = 1; +/* */ public static final int STATUS_CLOSEMATCH = 2; +/* */ private static final boolean debug = false; +/* */ private static final String lookupThreadName = "lookup"; +/* */ private static final String siteThreadName = "site"; +/* */ private static final String pkgName = "gamma"; +/* */ private static final String pkgVersion = "1.0"; +/* */ private static final int TIMEOUT = 3000; +/* */ private static final String dbName = "home:cdcache.db"; +/* 37 */ private static CDDBHost siteHost = new CDDBHost("cddb.cddb.com", 888); +/* */ private static Vector sites; +/* 39 */ private static Object siteMutex = new Object(); +/* 40 */ private static Object knownDisksMutex = new Object(); +/* */ +/* 42 */ private static Hashtable threadActivity = new Hashtable(); +/* */ private static Hashtable knownDisks; +/* */ private static String userName; +/* */ private static String hostName; +/* */ private CDTrackInfo tracks; +/* */ private String hash; +/* */ private CDDBStatus status; +/* */ private static final String discTitleKey = "DTITLE="; +/* */ private static final String trackTitleKey = "TTITLE"; +/* */ +/* */ public CDDBLookup(CDTrackInfo tracks) +/* */ { +/* 54 */ if (userName == null) { +/* 55 */ userName = System.getProperty("user.name").replace(' ', '_'); +/* */ try { +/* 57 */ hostName = InetAddress.getLocalHost().getHostName(); +/* */ } catch (UnknownHostException e) { +/* 59 */ hostName = "unknown"; +/* */ } +/* */ } +/* 62 */ this.tracks = tracks; +/* 63 */ this.hash = CDDBHash.hashString(tracks); +/* 64 */ if ((this.status = dbLookup()) == null) { +/* 65 */ runThread("lookup"); +/* */ } +/* */ } +/* */ +/* */ public String getHash() { +/* 70 */ return this.hash; +/* */ } +/* */ +/* */ public CDDiskInfo getDiskInfo() +/* */ { +/* 75 */ return getDiskInfo(false); +/* */ } +/* */ +/* */ public synchronized CDDiskInfo getDiskInfo(boolean wait) +/* */ { +/* 80 */ if (wait) { +/* 81 */ while (this.status == null) { +/* */ try { +/* 83 */ wait(); +/* */ } catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ } +/* 87 */ if (this.status != null) +/* 88 */ return this.status.getDiskInfo(); +/* 89 */ return null; +/* */ } +/* */ +/* */ public int getStatus() +/* */ { +/* 94 */ if (this.status != null) +/* 95 */ return this.status.getStatus(); +/* 96 */ return 0; +/* */ } +/* */ +/* */ public void run() +/* */ { +/* 101 */ String name = Thread.currentThread().getName(); +/* */ +/* */ +/* 104 */ if (name.equals("lookup")) { +/* 105 */ maybeRunSiteThread(); +/* 106 */ for (int i = 0; i < sites.size(); i++) { +/* 107 */ synchronized (this) { +/* 108 */ Thread t = runThread(i); +/* */ try { +/* */ do { +/* 111 */ wait(3000L); +/* 112 */ if (this.status != null) break; } while (recentlyActive(t)); +/* */ } catch (InterruptedException localInterruptedException) {} +/* 114 */ forgetThread(t); +/* 115 */ if (this.status != null) +/* */ break; +/* 117 */ if (i == sites.size() - 1) { +/* 118 */ this.status = new CDDBStatus(-3); +/* 119 */ notifyAll(); +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 124 */ if (name.equals("site")) { +/* 125 */ Vector v = getSiteList(); +/* 126 */ synchronized (siteMutex) { +/* 127 */ if (sites == null) +/* 128 */ sites = v; +/* 129 */ siteMutex.notifyAll(); +/* */ } +/* */ } +/* */ +/* 133 */ CDDBStatus newStatus = null; +/* 134 */ int hostIndex = 0; +/* */ try { +/* 136 */ hostIndex = Integer.parseInt(name); +/* */ } catch (NumberFormatException localNumberFormatException) {} +/* 138 */ CDDBHost host = null; +/* 139 */ synchronized (siteMutex) { +/* 140 */ host = (CDDBHost)sites.elementAt(hostIndex); +/* */ } +/* 142 */ newStatus = findDiskInfo(host); +/* 143 */ synchronized (this) { +/* 144 */ if ((this.status == null) && (newStatus != null)) { +/* 145 */ this.status = newStatus; +/* 146 */ if (hostIndex != 0) { +/* 147 */ synchronized (siteMutex) { +/* 148 */ Object site = sites.elementAt(hostIndex); +/* 149 */ sites.removeElementAt(hostIndex); +/* 150 */ sites.insertElementAt(site, 0); +/* */ } +/* */ } +/* 153 */ notifyAll(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private static void addSite(Vector v, String host, int port) +/* */ { +/* 163 */ v.addElement(new CDDBHost(host, port)); +/* */ } +/* */ +/* */ +/* */ +/* */ private static void defaultSites() +/* */ { +/* 170 */ sites = new Vector(); +/* 171 */ addSite(sites, "cddb.moonsoft.com", 888); +/* 172 */ addSite(sites, "cddb.moonsoft.com", 8880); +/* 173 */ addSite(sites, "cddb.celestial.com", 888); +/* 174 */ addSite(sites, "cddb.sonic.net", 888); +/* 175 */ addSite(sites, "sunsite.unc.edu", 888); +/* 176 */ addSite(sites, "cddb.netads.com", 888); +/* 177 */ addSite(sites, "cddb.mattdm.org", 888); +/* 178 */ addSite(sites, "cddb.dartmouth.edu", 888); +/* */ } +/* */ +/* */ private static Vector getSiteList() +/* */ { +/* 183 */ CDDBConnection con = null; +/* */ +/* */ try +/* */ { +/* 187 */ con = new CDDBConnection(siteHost, false); +/* 188 */ con.command("sites").startsWith("210 "); +/* */ +/* 190 */ Vector v = new Vector(); +/* 191 */ String line; while ((line = con.readBody()) != null) { String line; +/* 192 */ StringTokenizer tok = new StringTokenizer(line, " "); +/* 193 */ addSite(v, tok.nextToken(), +/* 194 */ Integer.parseInt(tok.nextToken())); +/* */ } +/* 196 */ return v; +/* */ +/* */ } +/* */ catch (IOException localIOException) {}catch (NumberFormatException localNumberFormatException) {}catch (NoSuchElementException localNoSuchElementException) {}finally +/* */ { +/* */ +/* 202 */ if (con != null) +/* 203 */ con.close(); +/* */ } +/* 205 */ return null; +/* */ } +/* */ +/* */ private CDDBStatus findDiskInfo(CDDBHost host) +/* */ { +/* 210 */ CDDBConnection con = null; +/* */ try { +/* 212 */ con = new CDDBConnection(host, false); +/* */ +/* 214 */ if (con.command("cddb hello " + userName + " " + hostName + " " + "gamma" + " " + "1.0").startsWith("200 ")) { +/* 215 */ String resp = con.command("cddb query " + +/* 216 */ CDDBHash.lookupString(this.tracks)); +/* 217 */ StringTokenizer t = new StringTokenizer(resp, " "); +/* 218 */ String code = t.nextToken(); +/* 219 */ CDDBStatus localCDDBStatus; if (code.equals("200")) +/* 220 */ return dbAdd(new CDDBStatus(1, +/* 221 */ getCDDBEntry(con, t))); +/* 222 */ if (code.equals("211")) { +/* 223 */ String line = con.readBody(); +/* */ +/* 225 */ for (int extra = 0; con.readBody() != null; extra++) {} +/* */ +/* 227 */ if (extra != 0) +/* 228 */ return dbAdd(new CDDBStatus(-2)); +/* 229 */ return dbAdd(new CDDBStatus(2, +/* 230 */ getCDDBEntry(con, +/* 231 */ new StringTokenizer(line, +/* 232 */ " ")))); +/* */ } +/* 234 */ if (code.equals("202")) { +/* 235 */ return new CDDBStatus(-1); +/* */ } +/* */ } +/* */ } +/* */ catch (IOException localIOException) {}catch (NoSuchElementException localNoSuchElementException) {}finally +/* */ { +/* 241 */ if (con != null) { +/* 242 */ con.close(); +/* */ } +/* */ } +/* 241 */ if (con != null) { +/* 242 */ con.close(); +/* */ } +/* 244 */ return null; +/* */ } +/* */ +/* */ private Thread runThread(String name) +/* */ { +/* 249 */ Thread t = new Thread(this, name); +/* 250 */ t.setDaemon(true); +/* 251 */ t.start(); +/* 252 */ return t; +/* */ } +/* */ +/* */ private void maybeRunSiteThread() +/* */ { +/* 257 */ synchronized (siteMutex) { +/* 258 */ if (sites == null) { +/* 259 */ Thread t = runThread("site"); +/* */ try { +/* */ do { +/* 262 */ siteMutex.wait(3000L); +/* 263 */ if (sites != null) break; } while (recentlyActive(t)); +/* */ } catch (InterruptedException localInterruptedException) {} +/* 265 */ forgetThread(t); +/* 266 */ if (sites == null) { +/* 267 */ defaultSites(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ private CDDiskInfo getCDDBEntry(CDDBConnection con, StringTokenizer t) { +/* */ try { +/* 275 */ String cat = t.nextToken(); +/* 276 */ String id = t.nextToken(); +/* 277 */ if (con.command("cddb read " + cat + " " + id).startsWith("210 ")) { +/* 278 */ return parseCDDBEntry(cat, con); +/* */ } +/* */ } +/* */ catch (IOException localIOException) {}catch (NoSuchElementException localNoSuchElementException) {} +/* 282 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private CDDiskInfo parseCDDBEntry(String category, CDDBConnection con) +/* */ throws IOException +/* */ { +/* 291 */ String artist = null; +/* 292 */ String title = null; +/* 293 */ String[] trackNames = new String[this.tracks.getNumTracks()]; +/* 294 */ for (int i = 0; i < trackNames.length; i++) +/* 295 */ trackNames[i] = ""; +/* */ String line; +/* 297 */ while ((line = con.readBody()) != null) { String line; +/* 298 */ if (line.startsWith("DTITLE=")) { +/* 299 */ line = line.substring("DTITLE=".length()); +/* 300 */ int slashPos = line.indexOf('/'); +/* 301 */ if (slashPos == -1) { +/* 302 */ artist = title = line.trim(); +/* */ } else { +/* 304 */ artist = line.substring(0, slashPos).trim(); +/* 305 */ title = line.substring(slashPos + 1).trim(); +/* */ } +/* */ } +/* 308 */ else if (line.startsWith("TTITLE")) { +/* 309 */ int eqIndex = line.indexOf('='); +/* */ try { +/* 311 */ int trackNum = +/* 312 */ Integer.parseInt(line.substring( +/* 313 */ "TTITLE".length(), +/* 314 */ eqIndex)); int +/* 315 */ tmp163_161 = trackNum; String[] tmp163_159 = trackNames;tmp163_159[tmp163_161] = (tmp163_159[tmp163_161] + line.substring(eqIndex + 1)); +/* */ } +/* */ catch (NumberFormatException localNumberFormatException) {}catch (IndexOutOfBoundsException localIndexOutOfBoundsException) {} +/* */ } +/* */ } +/* */ +/* 321 */ return new CDDiskInfo(artist, title, category, trackNames); +/* */ } +/* */ +/* */ static void markActivity() +/* */ { +/* 326 */ threadActivity.put(Thread.currentThread(), +/* 327 */ new Long(System.currentTimeMillis())); +/* */ } +/* */ +/* */ private boolean recentlyActive(Thread t) +/* */ { +/* 332 */ Long l = (Long)threadActivity.get(t); +/* 333 */ if (l != null) +/* 334 */ return System.currentTimeMillis() - l.longValue() < 3000L; +/* 335 */ return false; +/* */ } +/* */ +/* */ private void forgetThread(Thread t) +/* */ { +/* 340 */ threadActivity.remove(t); +/* */ } +/* */ +/* */ private CDDBStatus dbAdd(CDDBStatus status) +/* */ { +/* 345 */ synchronized (knownDisksMutex) { +/* 346 */ if (knownDisks.get(this.hash) == null) { +/* 347 */ knownDisks.put(this.hash, status); +/* */ try { +/* 349 */ new Saver(new URL("home:cdcache.db")).save(knownDisks); +/* */ } catch (Exception localException) {} +/* */ } +/* */ } +/* 353 */ return status; +/* */ } +/* */ +/* */ +/* */ private CDDBStatus dbLookup() +/* */ { +/* 359 */ synchronized (knownDisksMutex) { +/* 360 */ if (knownDisks == null) { +/* */ try { +/* 362 */ knownDisks = +/* 363 */ (Hashtable)new Restorer(new URL("home:cdcache.db")).restore(); +/* */ } catch (Exception ex) { +/* 365 */ knownDisks = new Hashtable(); +/* */ } +/* */ } +/* 368 */ return (CDDBStatus)knownDisks.get(this.hash); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDBLookup.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDBStatus.java b/NET/worlds/scape/CDDBStatus.java new file mode 100644 index 0000000..8f790ad --- /dev/null +++ b/NET/worlds/scape/CDDBStatus.java @@ -0,0 +1,60 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDDBStatus +/* */ implements Persister +/* */ { +/* */ private int status; +/* */ private CDDiskInfo diskInfo; +/* */ +/* */ public CDDBStatus(int status, CDDiskInfo diskInfo) +/* */ { +/* 17 */ this.status = status; +/* 18 */ this.diskInfo = diskInfo; +/* */ } +/* */ +/* */ public CDDBStatus(int status) +/* */ { +/* 23 */ this.status = status; +/* */ } +/* */ +/* */ public CDDBStatus() {} +/* */ +/* 28 */ public int getStatus() { return this.status; } +/* 29 */ public CDDiskInfo getDiskInfo() { return this.diskInfo; } +/* */ +/* 31 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 35 */ s.saveVersion(1, classCookie); +/* 36 */ s.saveInt(this.status); +/* 37 */ s.saveMaybeNull(this.diskInfo); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 42 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 44 */ this.status = r.restoreInt(); +/* 45 */ this.diskInfo = ((CDDiskInfo)r.restoreMaybeNull()); +/* 46 */ break; +/* */ +/* */ default: +/* 49 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDBStatus.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDDiskInfo.java b/NET/worlds/scape/CDDiskInfo.java new file mode 100644 index 0000000..bdbd065 --- /dev/null +++ b/NET/worlds/scape/CDDiskInfo.java @@ -0,0 +1,86 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDDiskInfo +/* */ implements Persister +/* */ { +/* */ private String artist; +/* */ private String title; +/* */ private String category; +/* */ private String[] trackNames; +/* */ +/* */ public CDDiskInfo(String artist, String title, String category, String[] trackNames) +/* */ { +/* 19 */ this.artist = artist; +/* 20 */ this.title = title; +/* 21 */ this.category = category; +/* 22 */ this.trackNames = new String[trackNames.length]; +/* 23 */ System.arraycopy(trackNames, 0, this.trackNames, 0, +/* 24 */ trackNames.length); +/* */ } +/* */ +/* */ public CDDiskInfo() {} +/* */ +/* 29 */ public String getArtist() { return this.artist; } +/* 30 */ public String getTitle() { return this.title; } +/* 31 */ public String getCategory() { return this.category; } +/* 32 */ public int getNumTracks() { return this.trackNames.length; } +/* 33 */ public String getTrackName(int track) { return this.trackNames[track]; } +/* */ +/* */ public String toString() +/* */ { +/* 37 */ String ret = "Artist: " + this.artist + "\n" + +/* 38 */ "Title: " + this.title + "\n" + +/* 39 */ "Category: " + this.category + "\n"; +/* 40 */ for (int i = 0; i < this.trackNames.length; i++) { +/* 41 */ ret = ret + "Track " + (i + 1) + ":"; +/* 42 */ if (this.trackNames[i] != null) +/* 43 */ ret = ret + this.trackNames[i]; +/* 44 */ ret = ret + "\n"; +/* */ } +/* 46 */ return ret; +/* */ } +/* */ +/* 49 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 53 */ s.saveVersion(1, classCookie); +/* 54 */ s.saveString(this.artist); +/* 55 */ s.saveString(this.title); +/* 56 */ s.saveString(this.category); +/* 57 */ s.saveInt(this.trackNames.length); +/* 58 */ for (int i = 0; i < this.trackNames.length; i++) { +/* 59 */ s.saveString(this.trackNames[i]); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 64 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 66 */ this.artist = r.restoreString(); +/* 67 */ this.title = r.restoreString(); +/* 68 */ this.category = r.restoreString(); +/* 69 */ this.trackNames = new String[r.restoreInt()]; +/* 70 */ for (int i = 0; i < this.trackNames.length; i++) +/* 71 */ this.trackNames[i] = r.restoreString(); +/* 72 */ break; +/* */ +/* */ default: +/* 75 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDDiskInfo.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDPlayerAction.java b/NET/worlds/scape/CDPlayerAction.java new file mode 100644 index 0000000..ab5a648 --- /dev/null +++ b/NET/worlds/scape/CDPlayerAction.java @@ -0,0 +1,336 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MainTerminalCallback; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDPlayerAction +/* */ extends Action +/* */ implements Runnable, MainCallback, MainTerminalCallback +/* */ { +/* */ private static final boolean DISABLE_ALL = true; +/* */ private static final int STATE_INITIAL = 0; +/* */ private static final int STATE_WAITING = 1; +/* */ private static final int STATE_DONE = 2; +/* 46 */ private static int numDrives = -1; +/* */ +/* */ private static CDPlayerAction active; +/* */ +/* */ private String artist; +/* */ private String title; +/* */ private String hash; +/* */ private int start; +/* */ private int stop; +/* */ private boolean isStopper; +/* */ private boolean cancel; +/* 57 */ private int state = 0; +/* */ +/* */ +/* */ +/* */ private boolean same(String str1, String str2) +/* */ { +/* 63 */ if (str1 == null) { +/* 64 */ if (str2 == null) +/* 65 */ return true; +/* 66 */ return false; +/* */ } +/* 68 */ if (str2 == null) +/* 69 */ return false; +/* 70 */ return str1.equals(str2); +/* */ } +/* */ +/* */ private boolean same(CDPlayerAction other) +/* */ { +/* 75 */ return (other != null) && +/* 76 */ (same(this.artist, other.artist)) && (same(this.title, other.title)) && +/* 77 */ (same(this.hash, other.hash)) && (this.start == other.start) && +/* 78 */ (this.stop == other.stop); +/* */ } +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 84 */ return null; +/* */ +/* 86 */ boolean done = false; +/* 87 */ if (seqID == null) +/* 88 */ this.state = 0; +/* 89 */ if (this.state == 0) { +/* 90 */ if ((this.isStopper) && (!same(active))) { +/* 91 */ done = true; +/* 92 */ } else if ((active != null) && (active != this)) { +/* 93 */ active.cancel = true; +/* 94 */ } else if (this.start >= this.stop) { +/* 95 */ done = true; +/* */ } else { +/* 97 */ active = this; +/* 98 */ this.cancel = false; +/* 99 */ Main.register(this); +/* 100 */ this.state = 1; +/* 101 */ Thread t = new Thread(this); +/* 102 */ t.setDaemon(true); +/* 103 */ t.start(); +/* */ } +/* */ } +/* 106 */ else if (this.state == 2) { +/* 107 */ active = null; +/* 108 */ Main.unregister(this); +/* 109 */ done = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 116 */ return done ? null : this; +/* */ } +/* */ +/* */ public void run() +/* */ { +/* 121 */ if (numDrives == -1) { +/* 122 */ numDrives = getNumDrives(); +/* */ } +/* 124 */ for (int i = 0; i < numDrives;) { +/* */ try { +/* 126 */ CDTrackInfo trackInfo = getTrackList(i); +/* 127 */ String curHash = null; +/* 128 */ if (trackInfo != null) { +/* 129 */ curHash = CDDBHash.hashString(trackInfo); +/* 130 */ if (curHash.equals(this.hash)) { +/* 131 */ play(i); +/* 132 */ break; +/* */ } +/* */ } +/* 135 */ if (this.cancel) { +/* */ break; +/* */ } +/* 124 */ i++; +/* */ } +/* */ catch (IOException localIOException) {} +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 139 */ this.state = 2; +/* */ } +/* */ +/* */ +/* */ public void mainCallback() {} +/* */ +/* */ +/* */ public void terminalCallback() +/* */ { +/* 148 */ this.cancel = true; +/* 149 */ if (this.state == 2) { +/* 150 */ Main.unregister(this); +/* */ } +/* */ } +/* */ +/* */ private void play(int drive) throws IOException { +/* */ int driveID; +/* 156 */ if ((driveID = openDrive(drive)) != 0) { +/* 157 */ playAudio(driveID, this.start, this.stop); +/* 158 */ while (isPlaying(driveID)) { +/* */ try { +/* 160 */ Thread.sleep(1000L); +/* */ } catch (InterruptedException localInterruptedException) {} +/* 162 */ if (this.cancel) { +/* 163 */ stopAudio(driveID); +/* 164 */ break; +/* */ } +/* */ } +/* 167 */ closeDrive(driveID); +/* */ } +/* */ } +/* */ +/* */ public static CDTrackInfo getTrackList(int drive) +/* */ throws IOException +/* */ { +/* 174 */ CDTrackInfo ret = null; +/* 175 */ int driveID; if ((driveID = openDrive(drive)) != 0) { +/* 176 */ ret = getDriveTrackList(driveID); +/* 177 */ closeDrive(driveID); +/* */ } +/* 179 */ return ret; } +/* */ +/* */ public static native int getNumDrives(); +/* */ +/* */ public static native int getDriveLetterOffset(int paramInt); +/* */ +/* */ public static native int openDrive(int paramInt) throws IOException; +/* */ +/* */ public static native void closeDrive(int paramInt) throws IOException; +/* */ +/* */ public static native void checkDrive(int paramInt) throws IOException; +/* */ +/* */ public static native CDTrackInfo getDriveTrackList(int paramInt) throws IOException; +/* */ +/* */ public static native void playAudio(int paramInt1, int paramInt2, int paramInt3) throws IOException; +/* */ +/* */ public static native void stopAudio(int paramInt) throws IOException; +/* */ public static native void pauseAudio(int paramInt) throws IOException; +/* */ public static native void resumeAudio(int paramInt) throws IOException; +/* */ public static native boolean isPlaying(int paramInt) throws IOException; +/* */ public static native int getPosition(int paramInt) throws IOException; +/* */ public static native void setNTAutoPlayCode(int paramInt); +/* */ public static native boolean launchVolumeControlApp(); +/* 202 */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException { Object ret = null; +/* 203 */ switch (index - offset) { +/* */ case 0: +/* 205 */ if (mode == 0) { +/* 206 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 207 */ "Artist")); +/* 208 */ } else if (mode == 1) { +/* 209 */ ret = this.artist; +/* 210 */ } else if (mode == 2) +/* 211 */ this.artist = ((String)value); +/* 212 */ break; +/* */ case 1: +/* 214 */ if (mode == 0) { +/* 215 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 216 */ "Title")); +/* 217 */ } else if (mode == 1) { +/* 218 */ ret = this.title; +/* 219 */ } else if (mode == 2) +/* 220 */ this.title = ((String)value); +/* 221 */ break; +/* */ case 2: +/* 223 */ if (mode == 0) { +/* 224 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 225 */ "Disk ID (Edit or Delete to read CD)").allowSetNull()); +/* 226 */ } else if (mode == 1) { +/* 227 */ if (this.hash == null) { +/* */ try { +/* 229 */ CDTrackInfo trackList = getTrackList(0); +/* 230 */ if (trackList != null) +/* 231 */ this.hash = CDDBHash.hashString(trackList); +/* */ } catch (IOException localIOException) {} +/* */ } +/* 234 */ ret = this.hash; +/* */ } +/* 236 */ else if (mode == 2) { +/* 237 */ this.hash = ((String)value); } +/* 238 */ break; +/* */ case 3: +/* 240 */ if (mode == 0) { +/* 241 */ ret = CDPositionPropertyEditor.make(new Property(this, index, +/* 242 */ "Start (75ths of a second)"), +/* 243 */ false); +/* 244 */ } else if (mode == 1) { +/* 245 */ ret = new Integer(this.start); +/* 246 */ } else if (mode == 2) +/* 247 */ this.start = ((Integer)value).intValue(); +/* 248 */ break; +/* */ case 4: +/* 250 */ if (mode == 0) { +/* 251 */ ret = CDPositionPropertyEditor.make(new Property(this, index, +/* 252 */ "Stop (75ths of a second)"), +/* 253 */ true); +/* 254 */ } else if (mode == 1) { +/* 255 */ ret = new Integer(this.stop); +/* 256 */ } else if (mode == 2) +/* 257 */ this.stop = ((Integer)value).intValue(); +/* 258 */ break; +/* */ case 5: +/* 260 */ if (mode == 0) { +/* 261 */ ret = BooleanPropertyEditor.make( +/* 262 */ new Property(this, index, "Stop identical CDPlayerAction"), +/* 263 */ "No", "Yes"); +/* 264 */ } else if (mode == 1) { +/* 265 */ ret = new Boolean(this.isStopper); +/* 266 */ } else if (mode == 2) +/* 267 */ this.isStopper = ((Boolean)value).booleanValue(); +/* 268 */ break; +/* */ +/* */ default: +/* 271 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 273 */ return ret; +/* */ } +/* */ +/* 276 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 280 */ s.saveVersion(2, classCookie); +/* 281 */ super.saveState(s); +/* 282 */ s.saveString(this.artist); +/* 283 */ s.saveString(this.title); +/* 284 */ s.saveString(this.hash); +/* 285 */ s.saveInt(this.start); +/* 286 */ s.saveInt(this.stop); +/* 287 */ s.saveBoolean(this.isStopper); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 292 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 294 */ super.restoreState(r); +/* 295 */ this.artist = r.restoreString(); +/* 296 */ this.title = r.restoreString(); +/* 297 */ this.hash = r.restoreString(); +/* 298 */ this.start = r.restoreInt(); +/* 299 */ this.stop = r.restoreInt(); +/* 300 */ break; +/* */ +/* */ case 2: +/* 303 */ super.restoreState(r); +/* 304 */ this.artist = r.restoreString(); +/* 305 */ this.title = r.restoreString(); +/* 306 */ this.hash = r.restoreString(); +/* 307 */ this.start = r.restoreInt(); +/* 308 */ this.stop = r.restoreInt(); +/* 309 */ this.isStopper = r.restoreBoolean(); +/* 310 */ break; +/* */ +/* */ default: +/* 313 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDPlayerAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDPositionEditorDialog.java b/NET/worlds/scape/CDPositionEditorDialog.java new file mode 100644 index 0000000..e88739b --- /dev/null +++ b/NET/worlds/scape/CDPositionEditorDialog.java @@ -0,0 +1,55 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class CDPositionEditorDialog +/* */ extends FieldWithListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ Property property; +/* */ +/* */ CDPositionEditorDialog(EditTile parent, String title, Property property, Vector trackList) +/* */ { +/* 28 */ super(parent, title, trackList); +/* 29 */ this.property = property; +/* 30 */ ready(); +/* */ } +/* */ +/* */ protected String getValue() +/* */ { +/* 35 */ return (String)this.property.get(); +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 40 */ int index = text.indexOf("#"); +/* 41 */ if (index != -1) +/* 42 */ text = text.substring(0, index).trim(); +/* */ try { +/* 44 */ this.parent.addUndoableSet(this.property, new Integer(text)); +/* 45 */ return true; +/* */ } catch (NumberFormatException nfe) {} +/* 47 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDPositionEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDPositionPropertyEditor.java b/NET/worlds/scape/CDPositionPropertyEditor.java new file mode 100644 index 0000000..b54e099 --- /dev/null +++ b/NET/worlds/scape/CDPositionPropertyEditor.java @@ -0,0 +1,104 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CDPositionPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private boolean ending; +/* */ +/* */ private CDPositionPropertyEditor(Property property, boolean ending) +/* */ { +/* 58 */ super(property); +/* 59 */ this.ending = ending; +/* */ } +/* */ +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 65 */ CDTrackInfo trackInfo = null; +/* */ try { +/* 67 */ trackInfo = CDPlayerAction.getTrackList(0); +/* */ } +/* */ catch (IOException localIOException) {} +/* */ +/* */ +/* */ +/* 73 */ Vector trackList = new Vector(); +/* 74 */ if (trackInfo != null) { +/* 75 */ for (int i = 0; i < trackInfo.getNumTracks(); i++) { +/* 76 */ int frames = this.ending ? trackInfo.getEndFrames(i) : +/* 77 */ trackInfo.getStartFrames(i); +/* 78 */ String type = this.ending ? Console.message("End") : +/* 79 */ Console.message("Start"); +/* */ +/* 81 */ Object[] arguments = { new String(frames), +/* 82 */ new String(type), new String(i + 1) }; +/* 83 */ trackList.addElement(MessageFormat.format( +/* 84 */ Console.message("of-track"), arguments)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 90 */ return new CDPositionEditorDialog(parent, title, this.property, trackList); +/* */ } +/* */ +/* */ public static Property make(Property property, boolean ending) +/* */ { +/* 95 */ return property.setEditor(new CDPositionPropertyEditor(property, +/* 96 */ ending)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDPositionPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CDTrackInfo.java b/NET/worlds/scape/CDTrackInfo.java new file mode 100644 index 0000000..75326f7 --- /dev/null +++ b/NET/worlds/scape/CDTrackInfo.java @@ -0,0 +1,85 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ public class CDTrackInfo +/* */ { +/* */ private int[] pos; +/* */ private int[] len; +/* */ +/* */ public CDTrackInfo(int numTracks) +/* */ { +/* 14 */ this.pos = new int[numTracks]; +/* 15 */ this.len = new int[numTracks]; +/* */ } +/* */ +/* 18 */ public int getNumTracks() { return this.pos.length; } +/* */ +/* */ public int getStartFrames(int track) +/* */ { +/* 22 */ return getPosM(track) * 60 * 75 + getPosS(track) * 75 + getPosF(track); +/* */ } +/* */ +/* */ public int getEndFrames(int track) +/* */ { +/* 27 */ if (track == this.pos.length - 1) +/* 28 */ return getStartFrames(track) + +/* 29 */ getLenM(track) * 60 * 75 + getLenS(track) * 75 + +/* 30 */ getLenF(track); +/* 31 */ return getStartFrames(track + 1) - 1; +/* */ } +/* */ +/* 34 */ public int getPosM(int track) { return minutes(this.pos[track]); } +/* 35 */ public int getPosS(int track) { return seconds(this.pos[track]); } +/* 36 */ public int getPosF(int track) { return frames(this.pos[track]); } +/* */ +/* 38 */ public int getLenM(int track) { return minutes(this.len[track]); } +/* 39 */ public int getLenS(int track) { return seconds(this.len[track]); } +/* 40 */ public int getLenF(int track) { return frames(this.len[track]); } +/* */ +/* */ private static int minutes(int packed) +/* */ { +/* 44 */ return packed & 0xFF; +/* */ } +/* */ +/* */ private static int seconds(int packed) +/* */ { +/* 49 */ return packed >> 8 & 0xFF; +/* */ } +/* */ +/* */ private static int frames(int packed) +/* */ { +/* 54 */ return packed >> 16 & 0xFF; +/* */ } +/* */ +/* */ private static String format2(int val) +/* */ { +/* 59 */ String result = ""; +/* 60 */ if (val < 10) +/* 61 */ result = "0"; +/* 62 */ return result + val; +/* */ } +/* */ +/* */ private static String format(int packed) +/* */ { +/* 67 */ return +/* 68 */ minutes(packed) + ":" + format2(seconds(packed)) + ":" + format2(frames(packed)); +/* */ } +/* */ +/* */ public void dump() +/* */ { +/* 73 */ System.out.println("Tracks: " + this.pos.length); +/* 74 */ for (int i = 0; i < this.pos.length; i++) { +/* 75 */ System.out.println("Track " + i + " " + "start " + format(this.pos[i]) + +/* 76 */ " length " + format(this.len[i])); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CDTrackInfo.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CallbackPropertyOperator.java b/NET/worlds/scape/CallbackPropertyOperator.java new file mode 100644 index 0000000..87395fd --- /dev/null +++ b/NET/worlds/scape/CallbackPropertyOperator.java @@ -0,0 +1,64 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CallbackPropertyOperator +/* */ implements MainCallback +/* */ { +/* */ private Property prop; +/* */ private int func; +/* */ private Object value; +/* */ private boolean done; +/* */ +/* */ CallbackPropertyOperator(Property prop, int func, Object value) +/* */ { +/* 30 */ this.prop = prop; +/* 31 */ this.func = func; +/* 32 */ this.value = value; +/* 33 */ assert (!Main.isMainThread()); +/* 34 */ Main.register(this); +/* */ } +/* */ +/* */ synchronized Object getValue() +/* */ { +/* 39 */ while (!this.done) +/* */ try { +/* 41 */ wait(); +/* */ } catch (InterruptedException localInterruptedException) {} +/* 43 */ return this.value; +/* */ } +/* */ +/* */ public synchronized void mainCallback() +/* */ { +/* 48 */ modify(); +/* 49 */ Main.unregister(this); +/* 50 */ notify(); +/* */ } +/* */ +/* */ private void modify() +/* */ { +/* 55 */ this.value = this.prop.safeOperate(this.func, this.value); +/* 56 */ this.done = true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CallbackPropertyOperator.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Camera.java b/NET/worlds/scape/Camera.java new file mode 100644 index 0000000..adf6ea9 --- /dev/null +++ b/NET/worlds/scape/Camera.java @@ -0,0 +1,616 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Cursor; +/* */ import NET.worlds.console.Gamma; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import NET.worlds.console.Window; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Camera +/* */ extends WObject +/* */ implements MouseButtonHandler, MouseEnterHandler, MouseExitHandler, MouseMoveHandler, IncrementalRestorer, URLSelf +/* */ { +/* */ private RenderCanvas canvas; +/* */ static final int CAMERA_SIZE = 20; +/* */ +/* */ public Camera() +/* */ { +/* 122 */ setVisible(false); +/* */ } +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 129 */ cameraNativeInit(); +/* */ } +/* */ +/* */ public Window getWindow() { +/* 133 */ if (this.canvas == null) { +/* 134 */ return null; +/* */ } +/* 136 */ return this.canvas.getWindow(); +/* */ } +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 143 */ Transform t = getObjectToWorldMatrix(); +/* 144 */ Point3Temp p = t.getPosition(); +/* 145 */ t.recycle(); +/* */ +/* 147 */ Point3Temp q = Point3Temp.make(p).minus(20.0F); +/* 148 */ return BoundBoxTemp.make(q, p.plus(20.0F)); +/* */ } +/* */ +/* */ +/* 152 */ private boolean mouseIsOverClickable = false; +/* 153 */ private boolean validMouseCoordinates = false; +/* 154 */ private float validMouseX = -1.0F; +/* 155 */ private float validMouseY = -1.0F; +/* */ +/* */ +/* 158 */ private static WObject cachedWObject = null; +/* 159 */ private static float cachedMouseX = -1.0F; +/* 160 */ private static float cachedMouseY = -1.0F; +/* */ private int cameraID; +/* */ private int cameraMode; +/* */ private boolean alwaysClearBackground; +/* */ +/* 165 */ public static WObject getMousePickWObject() { return cachedWObject; } +/* */ +/* */ +/* */ public static float getMousePickX() +/* */ { +/* 170 */ return cachedMouseX; +/* */ } +/* */ +/* */ public static float getMousePickY() +/* */ { +/* 175 */ return cachedMouseY; +/* */ } +/* */ +/* */ +/* */ +/* */ protected WObject updateView(Window w, int mode) +/* */ { +/* 182 */ Room r = getRoom(); +/* */ +/* */ +/* 185 */ if ((!hasClump()) && (r != null)) { +/* 186 */ r.aboutToDraw(); +/* */ } +/* 188 */ Transform t = null; +/* 189 */ SuperRoot o = getOwner(); +/* */ +/* */ +/* 192 */ Pilot pilot = null; +/* */ +/* 194 */ if (((o instanceof Pilot)) && (o.getOwner() == r)) { +/* 195 */ pilot = (Pilot)o; +/* */ +/* 197 */ if (r != null) { +/* 198 */ pilot.aboutToDraw(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 204 */ detach(); +/* 205 */ r.add(this); +/* */ +/* 207 */ t = getTransform(); +/* */ +/* */ +/* */ +/* */ +/* 212 */ Point3Temp motion = t.getPosition().times(pilot) +/* 213 */ .minus(pilot.getPosition()); +/* 214 */ post(pilot); +/* */ +/* 216 */ if (motion.squaredLength() > 1.0F) { +/* 217 */ moveBy(Point3Temp.make().minus(motion)); +/* */ +/* 219 */ boolean pBumpable = pilot.getBumpable(); +/* 220 */ pilot.setBumpable(false); +/* 221 */ moveThrough(motion); +/* 222 */ pilot.setBumpable(pBumpable); +/* */ +/* */ +/* */ +/* 226 */ Room r2 = getRoom(); +/* 227 */ if ((!hasClump()) && (r2 != null) && (r2 != r)) { +/* 228 */ r2.aboutToDraw(); +/* */ } +/* */ } +/* */ } +/* */ } +/* 233 */ WObject result = renderScene(w.getHwnd(), w.fullWidth(), +/* 234 */ w.fullHeight(), mode, pilot); +/* */ +/* 236 */ if (t != null) { +/* 237 */ detach(); +/* 238 */ pilot.add(this); +/* 239 */ setTransform(t); +/* 240 */ t.recycle(); +/* */ } +/* 242 */ return result; +/* */ } +/* */ +/* */ +/* */ public void renderToCanvas() +/* */ { +/* 248 */ assert (this.cameraID == 0); +/* */ +/* 250 */ if (!isActive()) { +/* 251 */ return; +/* */ } +/* 253 */ Window w = getWindow(); +/* 254 */ if (w == null) { +/* 255 */ return; +/* */ } +/* 257 */ if (this.validMouseCoordinates) +/* */ { +/* 259 */ this.xPick = this.validMouseX; +/* 260 */ this.yPick = this.validMouseY; +/* */ +/* 262 */ WObject obj = updateView(w, +/* 263 */ 7); +/* */ +/* 265 */ boolean toggleMouseCursor = false; +/* */ +/* 267 */ cachedWObject = obj; +/* 268 */ cachedMouseX = this.validMouseX; +/* 269 */ cachedMouseY = this.validMouseY; +/* */ +/* 271 */ if ((obj != null) && (obj.acceptsLeftClicks())) +/* */ { +/* 273 */ if (!this.mouseIsOverClickable) +/* */ { +/* 275 */ this.mouseIsOverClickable = true; +/* 276 */ toggleMouseCursor = true; +/* */ } +/* */ +/* */ +/* */ } +/* 281 */ else if (this.mouseIsOverClickable) +/* */ { +/* 283 */ this.mouseIsOverClickable = false; +/* 284 */ toggleMouseCursor = true; +/* */ } +/* */ +/* */ +/* 288 */ if (toggleMouseCursor) +/* */ { +/* 290 */ URL newURL = null; +/* */ +/* 292 */ if (this.mouseIsOverClickable) +/* */ { +/* 294 */ newURL = URL.make("home:HAND-M.CUR"); +/* */ } +/* */ else +/* */ { +/* 298 */ newURL = URL.make("system:DEFAULT_CURSOR"); +/* */ } +/* */ +/* 301 */ Console.getActive().getCursor().setURL(newURL); +/* */ } +/* */ } +/* */ else +/* */ { +/* 306 */ updateView(w, 6); +/* */ } +/* */ } +/* */ +/* */ +/* */ public RenderCanvas getCanvas() +/* */ { +/* 313 */ return this.canvas; +/* */ } +/* */ +/* 316 */ public void setCanvas(RenderCanvas c) { this.canvas = c; } +/* */ +/* */ +/* */ private float xPick; +/* */ +/* */ private float yPick; +/* */ +/* */ private Point3Temp unpickSpot; +/* */ +/* */ private WObject pickedObj; +/* */ +/* */ public void setAlwaysClearBackground(boolean in) +/* */ { +/* 329 */ this.alwaysClearBackground = in; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp lastPickSpot() +/* */ { +/* 338 */ return this.unpickSpot; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 344 */ public Transform lookAround = Transform.make(); +/* */ private static final int isBotMode = 0; +/* */ private static final int isPickingMode = 1; +/* */ +/* */ public void transferFrom(Camera target) { +/* 349 */ this.lookAround.setTransform(target.lookAround); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static final int isDrawingMode = 2; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static final int isThroughMode = 4; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject getObjectAt(float x, float y, boolean pickingThrough, Point3Temp pt) +/* */ { +/* 382 */ Window w = getWindow(); +/* 383 */ if (w == null) { +/* 384 */ return null; +/* */ } +/* 386 */ this.xPick = x; +/* 387 */ this.yPick = y; +/* 388 */ this.unpickSpot = null; +/* 389 */ WObject obj = updateView(w, 1 + ( +/* 390 */ pickingThrough ? 4 : 0)); +/* 391 */ if ((pt != null) && (this.unpickSpot != null)) +/* 392 */ pt.copy(this.unpickSpot); +/* 393 */ return obj; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void sendClick(WObject obj, MouseButtonEvent e) +/* */ { +/* 402 */ WObject oldTarget = e.target; +/* 403 */ e.target = obj; +/* 404 */ obj.deliver(e); +/* 405 */ e.target = oldTarget; +/* */ } +/* */ +/* 408 */ static WObject[] downWentTo = new WObject[3]; +/* 409 */ static Point3 downAt = new Point3(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseButtonEvent e) +/* */ { +/* 420 */ WObject obj = null; +/* */ +/* 422 */ int which = 3; +/* 423 */ if (e.key == 58113) { +/* 424 */ which = 0; +/* 425 */ } else if (e.key == 58114) { +/* 426 */ which = 1; +/* 427 */ } else if (e.key == 58116) { +/* 428 */ which = 2; +/* */ } +/* 430 */ assert (which != 3); +/* */ +/* 432 */ if ((e instanceof MouseUpEvent)) +/* */ { +/* */ +/* 435 */ obj = downWentTo[which]; +/* 436 */ downWentTo[which] = null; +/* */ } +/* */ else +/* */ { +/* 440 */ Window w = getWindow(); +/* 441 */ if ((w != null) && (!w.getDeltaMode())) +/* */ { +/* */ +/* */ +/* 445 */ if ((which == 1) && (Gamma.getShaper() != null)) +/* */ { +/* 447 */ obj = getObjectAt(e.x, e.y, false, null); +/* */ +/* 449 */ if (obj != null) +/* */ { +/* 451 */ obj.rightMenu(); +/* */ } +/* */ +/* */ } +/* */ else +/* */ { +/* 457 */ obj = getObjectAt(e.x, e.y, true, downAt); +/* */ } +/* */ +/* 460 */ downWentTo[which] = obj; +/* */ } +/* */ } +/* */ +/* 464 */ if (obj != null) +/* */ { +/* 466 */ if ((which == 0) && ((e instanceof MouseUpEvent))) +/* 467 */ obj.doAction(Console.getActive().getDefaultAction(), e); +/* 468 */ sendClick(obj, e); +/* */ } +/* */ +/* */ +/* */ +/* 473 */ return false; +/* */ } +/* */ +/* */ public boolean handle(MouseEnterEvent e) +/* */ { +/* 478 */ if (e != null) +/* */ { +/* 480 */ URL defaultCursor = URL.make("system:DEFAULT_CURSOR"); +/* 481 */ Console.getActive().getCursor().setURL(defaultCursor); +/* */ +/* 483 */ this.mouseIsOverClickable = false; +/* 484 */ this.validMouseCoordinates = true; +/* 485 */ this.validMouseX = e.x; +/* 486 */ this.validMouseY = e.y; +/* */ +/* 488 */ cachedWObject = null; +/* 489 */ cachedMouseX = -1.0F; +/* 490 */ cachedMouseY = -1.0F; +/* */ } +/* */ +/* 493 */ return false; +/* */ } +/* */ +/* */ public boolean handle(MouseExitEvent e) +/* */ { +/* 498 */ if (e != null) +/* */ { +/* 500 */ URL defaultCursor = URL.make("system:DEFAULT_CURSOR"); +/* 501 */ Console.getActive().getCursor().setURL(defaultCursor); +/* */ +/* 503 */ this.mouseIsOverClickable = false; +/* 504 */ this.validMouseCoordinates = false; +/* 505 */ this.validMouseX = -1.0F; +/* 506 */ this.validMouseY = -1.0F; +/* */ +/* 508 */ cachedWObject = null; +/* 509 */ cachedMouseX = -1.0F; +/* 510 */ cachedMouseY = -1.0F; +/* */ } +/* */ +/* 513 */ return false; +/* */ } +/* */ +/* */ public boolean handle(MouseMoveEvent e) +/* */ { +/* 518 */ if (e != null) +/* */ { +/* 520 */ this.validMouseX = e.x; +/* 521 */ this.validMouseY = e.y; +/* */ } +/* */ +/* 524 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 532 */ Object ret = null; +/* 533 */ (index - offset); +/* */ +/* 535 */ ret = super.properties(index, offset + 0, mode, value); +/* */ +/* 537 */ return ret; +/* */ } +/* */ +/* 540 */ private static Object classCookie = new Object(); +/* */ public float xForRoomPreAndPostRender; +/* */ +/* 543 */ public void saveState(Saver s) throws IOException { s.saveVersion(2, classCookie); +/* 544 */ super.saveState(s); +/* */ } +/* */ +/* */ +/* */ public float yForRoomPreAndPostRender; +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 553 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 555 */ super.restoreState(r); +/* 556 */ r.restoreFloat(); +/* 557 */ r.restore(); +/* 558 */ r.restore(); +/* 559 */ break; +/* */ +/* */ case 0: +/* */ case 2: +/* 563 */ super.restoreState(r); +/* 564 */ break; +/* */ +/* */ default: +/* 567 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public int incRestore(int state, Restorer r, URLSelfLoader p) +/* */ throws Exception +/* */ { +/* 578 */ if (state == 0) { +/* 579 */ restoreState(r); +/* */ } +/* 581 */ if (r.version() != 3) { +/* 582 */ return -1; +/* */ } +/* */ +/* 585 */ if (state == 0) { +/* 586 */ p.otemp1 = r.restore(false); +/* */ } +/* 588 */ World w = (World)p.otemp1; +/* 589 */ if (state == 0) +/* 590 */ w.setSourceURL(getSourceURL()); +/* 591 */ return w.incRestore(state, r, p); +/* */ } +/* */ +/* */ +/* */ public float zForRoomPreAndPostRender; +/* */ +/* */ public float dForRoomPreAndPostRender; +/* */ +/* */ public void incRef() +/* */ { +/* 601 */ if (!$assertionsDisabled) throw new AssertionError(); } +/* 602 */ public void decRef() { if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public static native void cameraNativeInit(); +/* */ +/* */ public native void nDrawText(String paramString, int paramInt1, int paramInt2, int paramInt3, int paramInt4); +/* */ +/* */ synchronized native WObject renderScene(int paramInt1, int paramInt2, int paramInt3, int paramInt4, Pilot paramPilot); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Camera.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CameraHeightAction.java b/NET/worlds/scape/CameraHeightAction.java new file mode 100644 index 0000000..ad2e7b2 --- /dev/null +++ b/NET/worlds/scape/CameraHeightAction.java @@ -0,0 +1,116 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CameraHeightAction +/* */ extends Action +/* */ { +/* */ public float newEyeHeight; +/* */ +/* */ public CameraHeightAction() +/* */ { +/* 24 */ this.newEyeHeight = 0.0F; +/* */ } +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 30 */ Object owner = getOwner(); +/* 31 */ if ((owner == null) || (!(owner instanceof WObject))) { +/* 32 */ return null; +/* */ } +/* 34 */ WObject o = (WObject)owner; +/* */ +/* 36 */ Pilot pilot = Pilot.getActive(); +/* 37 */ if (pilot == null) { +/* 38 */ return null; +/* */ } +/* */ +/* 41 */ if (pilot.getRoom() != o.getRoom()) { +/* 42 */ return null; +/* */ } +/* 44 */ if ((pilot instanceof HoloPilot)) +/* */ { +/* 46 */ HoloPilot hp = (HoloPilot)pilot; +/* 47 */ hp.setEyeHeight(this.newEyeHeight); +/* */ } +/* */ +/* 50 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 59 */ Object ret = null; +/* 60 */ switch (index - offset) { +/* */ case 0: +/* 62 */ if (mode == 0) +/* */ { +/* 64 */ ret = FloatPropertyEditor.make( +/* 65 */ new Property(this, index, "New Eye Height")); +/* */ } +/* 67 */ else if (mode == 1) +/* */ { +/* 69 */ ret = new Float(this.newEyeHeight); +/* */ } +/* 71 */ else if (mode == 2) +/* */ { +/* 73 */ this.newEyeHeight = ((Float)value).floatValue(); +/* */ } +/* 75 */ break; +/* */ +/* */ default: +/* 78 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* */ +/* 81 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 86 */ return +/* 87 */ super.toString() + "[New Eye Height: " + this.newEyeHeight + "]"; +/* */ } +/* */ +/* 90 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 94 */ s.saveVersion(0, classCookie); +/* 95 */ super.saveState(s); +/* 96 */ s.saveFloat(this.newEyeHeight); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 101 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 103 */ super.restoreState(r); +/* 104 */ this.newEyeHeight = r.restoreFloat(); +/* 105 */ break; +/* */ default: +/* 107 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CameraHeightAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ChangeAvatarDialog.java b/NET/worlds/scape/ChangeAvatarDialog.java new file mode 100644 index 0000000..05416cb --- /dev/null +++ b/NET/worlds/scape/ChangeAvatarDialog.java @@ -0,0 +1,81 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.ImageButtons; +/* */ import NET.worlds.console.ImageButtonsCallback; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Rectangle; +/* */ import java.awt.Window; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ChangeAvatarDialog +/* */ extends PolledDialog +/* */ implements ImageButtonsCallback +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private ImageButtons ib; +/* */ +/* */ public ChangeAvatarDialog(Window parent, DialogReceiver receiver, String name) +/* */ { +/* 32 */ super(parent, receiver, Console.message("Change-Avatar"), false); +/* 33 */ setAlignment(1); +/* 34 */ Rectangle[] rects = new Rectangle[2]; +/* 35 */ int yesX = IniFile.override().getIniInt("changeavYesX", 39); +/* 36 */ int yesY = IniFile.override().getIniInt("changeavYesY", 23); +/* 37 */ int yesW = IniFile.override().getIniInt("changeavYesW", 48); +/* 38 */ int yesH = IniFile.override().getIniInt("changeavYesH", 18); +/* 39 */ rects[0] = new Rectangle(yesX, yesY, yesW, yesH); +/* 40 */ int noX = IniFile.override().getIniInt("changeavNoX", 96); +/* 41 */ int noY = IniFile.override().getIniInt("changeavNoY", 23); +/* 42 */ int noW = IniFile.override().getIniInt("changeavNoW", 42); +/* 43 */ int noH = IniFile.override().getIniInt("changeavnoH", 18); +/* 44 */ rects[1] = new Rectangle(noX, noY, noW, noH); +/* 45 */ Object[] arguments = { new String(name) }; +/* 46 */ this.ib = new ChangeAvatarImageButtons( +/* 47 */ IniFile.override().getIniString("changeAvDlg", Console.message( +/* 48 */ "changeav.gif")), +/* 49 */ rects, this, +/* 50 */ MessageFormat.format(Console.message("Change-avatar-to"), +/* 51 */ arguments)); +/* 52 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 57 */ add("Center", this.ib); +/* */ } +/* */ +/* */ public Object imageButtonsCallback(Component who, int which) +/* */ { +/* 62 */ done(which == 0); +/* 63 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 69 */ if (key == 27) +/* 70 */ return done(false); +/* 71 */ if (key == 10) +/* 72 */ return done(true); +/* 73 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ChangeAvatarDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ChangeAvatarImageButtons.java b/NET/worlds/scape/ChangeAvatarImageButtons.java new file mode 100644 index 0000000..c99ebcf --- /dev/null +++ b/NET/worlds/scape/ChangeAvatarImageButtons.java @@ -0,0 +1,121 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.ImageButtons; +/* */ import NET.worlds.console.ImageButtonsCallback; +/* */ import java.awt.Color; +/* */ import java.awt.Font; +/* */ import java.awt.FontMetrics; +/* */ import java.awt.Graphics; +/* */ import java.awt.Rectangle; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ChangeAvatarImageButtons +/* */ extends ImageButtons +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private static final int textBoxW = 177; +/* */ private static final int textBoxH = 23; +/* 87 */ private static Font font = new Font( +/* 88 */ Console.message("AvatarFont"), 0, 12); +/* */ +/* */ private static int textWidth; +/* */ +/* */ private static int textX; +/* */ private static int textY; +/* */ private String text; +/* */ +/* */ public ChangeAvatarImageButtons(String texture, Rectangle[] rects, ImageButtonsCallback cb, String text) +/* */ { +/* 98 */ super(texture, rects, cb); +/* 99 */ this.text = text; +/* */ } +/* */ +/* */ public void paint(Graphics g) +/* */ { +/* 104 */ super.paint(g); +/* 105 */ g.setFont(font); +/* 106 */ g.setColor(Color.white); +/* 107 */ if (textWidth == 0) { +/* 108 */ FontMetrics fm = g.getFontMetrics(); +/* 109 */ textWidth = fm.stringWidth(this.text); +/* 110 */ textX = (177 - textWidth) / 2; +/* 111 */ textY = 23 - (23 - fm.getAscent()) / 2; +/* */ } +/* 113 */ g.drawString(this.text, textX, textY); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ChangeAvatarImageButtons.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CheckboxEditorDialog.java b/NET/worlds/scape/CheckboxEditorDialog.java new file mode 100644 index 0000000..6681007 --- /dev/null +++ b/NET/worlds/scape/CheckboxEditorDialog.java @@ -0,0 +1,83 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.Checkbox; +/* */ import java.awt.CheckboxGroup; +/* */ import java.awt.Dimension; +/* */ import java.awt.GridBagConstraints; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class CheckboxEditorDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 21 */ private CheckboxGroup group = new CheckboxGroup(); +/* */ +/* */ private Checkbox[] choices; +/* */ private String[] labels; +/* */ protected EditTile parent; +/* */ +/* */ protected CheckboxEditorDialog(EditTile parent, String title, String[] labels) +/* */ { +/* 29 */ super(Console.getFrame(), parent, title); +/* 30 */ this.labels = labels; +/* 31 */ this.parent = parent; +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 36 */ this.choices = new Checkbox[this.labels.length]; +/* */ +/* 38 */ GridBagConstraints c = new GridBagConstraints(); +/* 39 */ c.weightx = 1.0D; +/* 40 */ c.weighty = 1.0D; +/* 41 */ c.gridwidth = 0; +/* 42 */ for (int i = 0; i < this.labels.length; i++) +/* 43 */ add(this.gbag, this.choices[i] = new Checkbox(this.labels[i], this.group, false), c); +/* 44 */ super.build(); +/* */ } +/* */ +/* */ protected abstract int getValue(); +/* */ +/* */ protected abstract void setValue(int paramInt); +/* */ +/* */ protected boolean setValue() { +/* 52 */ Checkbox selected = this.group.getSelectedCheckbox(); +/* 53 */ for (int i = 0; i < this.choices.length; i++) +/* 54 */ if (this.choices[i] == selected) { +/* 55 */ setValue(i); +/* 56 */ return true; +/* */ } +/* 58 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 65 */ if (visible) { +/* 66 */ Dimension mySize = getSize(); +/* 67 */ initialSize(mySize.width < 160 ? 160 : mySize.width, +/* 68 */ mySize.height < 120 ? 120 : mySize.height); +/* 69 */ super.setVisible(visible); +/* 70 */ int choice = getValue(); +/* 71 */ this.choices[choice].requestFocus(); +/* 72 */ this.choices[choice].setState(true); +/* */ } else { +/* 74 */ super.setVisible(visible); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CheckboxEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ClassProperty.java b/NET/worlds/scape/ClassProperty.java new file mode 100644 index 0000000..b1b314a --- /dev/null +++ b/NET/worlds/scape/ClassProperty.java @@ -0,0 +1,27 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ClassProperty +/* */ extends Property +/* */ { +/* */ public ClassProperty(Properties owner, int index, String className) +/* */ { +/* 19 */ super(owner, index, "Class " + className + " (obsolete; for backwards compatibility)"); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ClassProperty.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ClickEventHandler.java b/NET/worlds/scape/ClickEventHandler.java new file mode 100644 index 0000000..5f39b59 --- /dev/null +++ b/NET/worlds/scape/ClickEventHandler.java @@ -0,0 +1,20 @@ +package NET.worlds.scape; + +import java.awt.Component; +import java.awt.Point; + +public abstract interface ClickEventHandler +{ + public static final int DOWN = 1; + public static final int UP = 2; + public static final int META = 4; + public static final int DRAG = 8; + + public abstract void clickEvent(Component paramComponent, Point paramPoint, int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ClickEventHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ClickSensor.java b/NET/worlds/scape/ClickSensor.java new file mode 100644 index 0000000..b5958f7 --- /dev/null +++ b/NET/worlds/scape/ClickSensor.java @@ -0,0 +1,664 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ClickSensor +/* */ extends Sensor +/* */ implements MouseDownHandler, MouseUpHandler, BGLoaded +/* */ { +/* */ private static final int clickTime = 750; +/* */ public static final int CENTER = 4; +/* */ public static final int RIGHT = 2; +/* */ public static final int LEFT = 1; +/* */ public static final int ANY = 7; +/* 73 */ protected long mouseDownTime = 0L; +/* 74 */ protected int keyToCheck = 1; +/* 75 */ protected boolean waitForUp = false; +/* 76 */ protected URL config = null; +/* */ +/* */ transient int width; +/* */ +/* */ transient int height; +/* */ transient Area[] configTable; +/* */ +/* */ public ClickSensor(Action a, char whichButton) +/* */ { +/* 85 */ this(a, whichButton); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public ClickSensor(Action a, int whichButton) +/* */ { +/* 97 */ this.keyToCheck = (whichButton & 0x7); +/* 98 */ if (a != null) { +/* 99 */ addAction(a); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public ClickSensor(Action a) +/* */ { +/* 108 */ this(a, 7); +/* */ } +/* */ +/* */ +/* */ +/* */ public ClickSensor() {} +/* */ +/* */ +/* */ public int getWhichButton() +/* */ { +/* 118 */ return this.keyToCheck; +/* */ } +/* */ +/* */ public boolean getWaitForUp() { +/* 122 */ return this.waitForUp; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setWhichButton(int which) +/* */ { +/* 131 */ assert ((which >= 0) && (which <= 7)); +/* 132 */ this.keyToCheck = which; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setWaitForUp(boolean wait) +/* */ { +/* 139 */ this.waitForUp = wait; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 147 */ if ((this.keyToCheck == 7) || ((e.key & this.keyToCheck) != 0)) { +/* 148 */ if (this.waitForUp) { +/* 149 */ this.mouseDownTime = System.currentTimeMillis(); +/* */ } else +/* 151 */ trigger(e); +/* */ } +/* 153 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseUpEvent e) +/* */ { +/* 161 */ if ((this.waitForUp) && +/* 162 */ ((this.keyToCheck == 7) || ((e.key & this.keyToCheck) != 0)) && +/* 163 */ (System.currentTimeMillis() - this.mouseDownTime < 750L)) { +/* 164 */ trigger(e); +/* */ } +/* */ +/* */ +/* 168 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void triggerAction(String actionNamePrefix, Vector props, Event event) +/* */ { +/* 185 */ int len = this.actions.size(); +/* 186 */ for (int i = 0; i < len; i++) { +/* 187 */ Action a = (Action)this.actions.elementAt(i); +/* */ +/* 189 */ if (a.getName().regionMatches(0, actionNamePrefix, 0, actionNamePrefix.length())) +/* */ { +/* 191 */ len = props.size(); +/* 192 */ for (i = 0; i < len; i += 2) { +/* 193 */ String prop = (String)props.elementAt(i); +/* 194 */ String val = (String)props.elementAt(i + 1); +/* 195 */ SetPropertyAction.propHelper(2, val, prop, a); +/* */ } +/* */ +/* 198 */ RunningActionHandler.trigger(a, getWorld(), event); +/* 199 */ return; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public void trigger(Event event) +/* */ { +/* 207 */ if ((this.configTable != null) && ((getOwner() instanceof WObject))) { +/* 208 */ WObject w = (WObject)getOwner(); +/* 209 */ Transform t = w.getObjectToWorldMatrix().invert(); +/* */ +/* */ +/* 212 */ Point3Temp p = Point3Temp.make(Camera.downAt).times(t); +/* 213 */ p.x *= this.width; +/* 214 */ p.z *= this.height; +/* */ +/* */ +/* 217 */ for (int i = 0; i < this.configTable.length; i++) { +/* 218 */ Area a = this.configTable[i]; +/* 219 */ if ((p.x > a.x) && (p.z > a.y) && (p.x - a.x < a.w) && +/* 220 */ (p.z - a.y < a.h)) +/* */ { +/* 222 */ triggerAction(a.actionNamePrefix, a.props, event); +/* */ } +/* */ } +/* */ +/* 226 */ t.recycle(); +/* */ } else { +/* 228 */ super.trigger(event); +/* */ } +/* */ } +/* */ +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteURL) +/* */ { +/* 235 */ return localName; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 240 */ if (obj != null) +/* 241 */ loadConfig((String)obj); +/* 242 */ return false; +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 247 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getString(StringTokenizer st) +/* */ { +/* 256 */ String s = st.nextToken(); +/* 257 */ if ((s.length() > 0) && (s.charAt(0) == '"')) { +/* 258 */ StringBuffer sb = new StringBuffer(s.substring(1)); +/* 259 */ while (sb.charAt(sb.length() - 1) != '"') { +/* 260 */ sb.append(" "); +/* 261 */ sb.append(st.nextToken()); +/* */ } +/* 263 */ sb.setLength(sb.length() - 1); +/* 264 */ s = sb.toString(); +/* */ } +/* 266 */ return s; +/* */ } +/* */ +/* */ /* Error */ +/* */ public void loadConfig(String name) +/* */ { +/* */ // Byte code: +/* */ // 0: aconst_null +/* */ // 1: astore_2 +/* */ // 2: aconst_null +/* */ // 3: astore_3 +/* */ // 4: iconst_1 +/* */ // 5: istore 4 +/* */ // 7: new 303 java/io/DataInputStream +/* */ // 10: dup +/* */ // 11: new 305 java/io/FileInputStream +/* */ // 14: dup +/* */ // 15: aload_1 +/* */ // 16: invokespecial 307 java/io/FileInputStream: (Ljava/lang/String;)V +/* */ // 19: invokespecial 308 java/io/DataInputStream: (Ljava/io/InputStream;)V +/* */ // 22: astore_3 +/* */ // 23: new 268 java/util/StringTokenizer +/* */ // 26: dup +/* */ // 27: aload_3 +/* */ // 28: invokevirtual 311 java/io/DataInputStream:readLine ()Ljava/lang/String; +/* */ // 31: invokespecial 314 java/util/StringTokenizer: (Ljava/lang/String;)V +/* */ // 34: astore 5 +/* */ // 36: aload 5 +/* */ // 38: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 41: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 44: istore 6 +/* */ // 46: aload_0 +/* */ // 47: aload 5 +/* */ // 49: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 52: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 55: putfield 214 NET/worlds/scape/ClickSensor:width I +/* */ // 58: aload_0 +/* */ // 59: aload 5 +/* */ // 61: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 64: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 67: putfield 219 NET/worlds/scape/ClickSensor:height I +/* */ // 70: iload 6 +/* */ // 72: anewarray 222 NET/worlds/scape/ClickSensor$Area +/* */ // 75: astore_2 +/* */ // 76: iconst_0 +/* */ // 77: istore 7 +/* */ // 79: goto +147 -> 226 +/* */ // 82: new 222 NET/worlds/scape/ClickSensor$Area +/* */ // 85: dup +/* */ // 86: aload_0 +/* */ // 87: invokespecial 321 NET/worlds/scape/ClickSensor$Area: (LNET/worlds/scape/ClickSensor;)V +/* */ // 90: astore 8 +/* */ // 92: iinc 4 1 +/* */ // 95: new 268 java/util/StringTokenizer +/* */ // 98: dup +/* */ // 99: aload_3 +/* */ // 100: invokevirtual 311 java/io/DataInputStream:readLine ()Ljava/lang/String; +/* */ // 103: invokespecial 314 java/util/StringTokenizer: (Ljava/lang/String;)V +/* */ // 106: astore 5 +/* */ // 108: aload 8 +/* */ // 110: aload 5 +/* */ // 112: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 115: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 118: putfield 221 NET/worlds/scape/ClickSensor$Area:x I +/* */ // 121: aload 8 +/* */ // 123: aload 5 +/* */ // 125: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 128: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 131: putfield 225 NET/worlds/scape/ClickSensor$Area:y I +/* */ // 134: aload 8 +/* */ // 136: aload 5 +/* */ // 138: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 141: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 144: putfield 228 NET/worlds/scape/ClickSensor$Area:w I +/* */ // 147: aload 8 +/* */ // 149: aload 5 +/* */ // 151: invokevirtual 267 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 154: invokestatic 315 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 157: putfield 231 NET/worlds/scape/ClickSensor$Area:h I +/* */ // 160: aload 8 +/* */ // 162: aload 5 +/* */ // 164: invokestatic 324 NET/worlds/scape/ClickSensor:getString (Ljava/util/StringTokenizer;)Ljava/lang/String; +/* */ // 167: putfield 234 NET/worlds/scape/ClickSensor$Area:actionNamePrefix Ljava/lang/String; +/* */ // 170: new 130 java/util/Vector +/* */ // 173: dup +/* */ // 174: invokespecial 326 java/util/Vector: ()V +/* */ // 177: astore 9 +/* */ // 179: goto +23 -> 202 +/* */ // 182: aload 9 +/* */ // 184: aload 5 +/* */ // 186: invokestatic 324 NET/worlds/scape/ClickSensor:getString (Ljava/util/StringTokenizer;)Ljava/lang/String; +/* */ // 189: invokevirtual 327 java/util/Vector:addElement (Ljava/lang/Object;)V +/* */ // 192: aload 9 +/* */ // 194: aload 5 +/* */ // 196: invokestatic 324 NET/worlds/scape/ClickSensor:getString (Ljava/util/StringTokenizer;)Ljava/lang/String; +/* */ // 199: invokevirtual 327 java/util/Vector:addElement (Ljava/lang/Object;)V +/* */ // 202: aload 5 +/* */ // 204: invokevirtual 331 java/util/StringTokenizer:hasMoreTokens ()Z +/* */ // 207: ifne -25 -> 182 +/* */ // 210: aload 8 +/* */ // 212: aload 9 +/* */ // 214: putfield 236 NET/worlds/scape/ClickSensor$Area:props Ljava/util/Vector; +/* */ // 217: aload_2 +/* */ // 218: iload 7 +/* */ // 220: aload 8 +/* */ // 222: aastore +/* */ // 223: iinc 7 1 +/* */ // 226: iload 7 +/* */ // 228: iload 6 +/* */ // 230: if_icmplt -148 -> 82 +/* */ // 233: aload_0 +/* */ // 234: aload_2 +/* */ // 235: putfield 177 NET/worlds/scape/ClickSensor:configTable [LNET/worlds/scape/ClickSensor$Area; +/* */ // 238: goto +95 -> 333 +/* */ // 241: astore 5 +/* */ // 243: iconst_2 +/* */ // 244: anewarray 48 java/lang/Object +/* */ // 247: dup +/* */ // 248: iconst_0 +/* */ // 249: new 143 java/lang/String +/* */ // 252: dup +/* */ // 253: aload_1 +/* */ // 254: invokespecial 334 java/lang/String: (Ljava/lang/String;)V +/* */ // 257: aastore +/* */ // 258: dup +/* */ // 259: iconst_1 +/* */ // 260: new 143 java/lang/String +/* */ // 263: dup +/* */ // 264: new 335 java/lang/StringBuilder +/* */ // 267: dup +/* */ // 268: invokespecial 337 java/lang/StringBuilder: ()V +/* */ // 271: iload 4 +/* */ // 273: invokevirtual 338 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; +/* */ // 276: invokevirtual 341 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 279: invokespecial 334 java/lang/String: (Ljava/lang/String;)V +/* */ // 282: aastore +/* */ // 283: astore 6 +/* */ // 285: ldc_w 342 +/* */ // 288: invokestatic 344 NET/worlds/console/Console:message (Ljava/lang/String;)Ljava/lang/String; +/* */ // 291: aload 6 +/* */ // 293: invokestatic 350 java/text/MessageFormat:format (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; +/* */ // 296: invokestatic 356 NET/worlds/console/Console:println (Ljava/lang/String;)V +/* */ // 299: aload_3 +/* */ // 300: ifnull +46 -> 346 +/* */ // 303: aload_3 +/* */ // 304: invokevirtual 359 java/io/DataInputStream:close ()V +/* */ // 307: goto +39 -> 346 +/* */ // 310: astore 11 +/* */ // 312: goto +34 -> 346 +/* */ // 315: astore 10 +/* */ // 317: aload_3 +/* */ // 318: ifnull +12 -> 330 +/* */ // 321: aload_3 +/* */ // 322: invokevirtual 359 java/io/DataInputStream:close ()V +/* */ // 325: goto +5 -> 330 +/* */ // 328: astore 11 +/* */ // 330: aload 10 +/* */ // 332: athrow +/* */ // 333: aload_3 +/* */ // 334: ifnull +12 -> 346 +/* */ // 337: aload_3 +/* */ // 338: invokevirtual 359 java/io/DataInputStream:close ()V +/* */ // 341: goto +5 -> 346 +/* */ // 344: astore 11 +/* */ // 346: return +/* */ // Line number table: +/* */ // Java source line #273 -> byte code offset #0 +/* */ // Java source line #275 -> byte code offset #2 +/* */ // Java source line #276 -> byte code offset #4 +/* */ // Java source line #278 -> byte code offset #7 +/* */ // Java source line #279 -> byte code offset #23 +/* */ // Java source line #280 -> byte code offset #36 +/* */ // Java source line #281 -> byte code offset #46 +/* */ // Java source line #282 -> byte code offset #58 +/* */ // Java source line #284 -> byte code offset #70 +/* */ // Java source line #286 -> byte code offset #76 +/* */ // Java source line #287 -> byte code offset #82 +/* */ // Java source line #289 -> byte code offset #92 +/* */ // Java source line #290 -> byte code offset #95 +/* */ // Java source line #291 -> byte code offset #108 +/* */ // Java source line #292 -> byte code offset #121 +/* */ // Java source line #293 -> byte code offset #134 +/* */ // Java source line #294 -> byte code offset #147 +/* */ // Java source line #296 -> byte code offset #160 +/* */ // Java source line #297 -> byte code offset #170 +/* */ // Java source line #298 -> byte code offset #179 +/* */ // Java source line #299 -> byte code offset #182 +/* */ // Java source line #300 -> byte code offset #192 +/* */ // Java source line #298 -> byte code offset #202 +/* */ // Java source line #302 -> byte code offset #210 +/* */ // Java source line #303 -> byte code offset #217 +/* */ // Java source line #286 -> byte code offset #223 +/* */ // Java source line #305 -> byte code offset #233 +/* */ // Java source line #306 -> byte code offset #238 +/* */ // Java source line #307 -> byte code offset #243 +/* */ // Java source line #309 -> byte code offset #285 +/* */ // Java source line #308 -> byte code offset #293 +/* */ // Java source line #312 -> byte code offset #299 +/* */ // Java source line #313 -> byte code offset #303 +/* */ // Java source line #314 -> byte code offset #307 +/* */ // Java source line #310 -> byte code offset #315 +/* */ // Java source line #312 -> byte code offset #317 +/* */ // Java source line #313 -> byte code offset #321 +/* */ // Java source line #314 -> byte code offset #325 +/* */ // Java source line #316 -> byte code offset #330 +/* */ // Java source line #312 -> byte code offset #333 +/* */ // Java source line #313 -> byte code offset #337 +/* */ // Java source line #314 -> byte code offset #341 +/* */ // Java source line #317 -> byte code offset #346 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 347 0 this ClickSensor +/* */ // 0 347 1 name String +/* */ // 1 234 2 result Area[] +/* */ // 3 335 3 in java.io.DataInputStream +/* */ // 5 267 4 line int +/* */ // 34 169 5 st StringTokenizer +/* */ // 241 3 5 e Exception +/* */ // 44 185 6 numLines int +/* */ // 283 9 6 arguments Object[] +/* */ // 77 150 7 i int +/* */ // 90 131 8 a Area +/* */ // 177 36 9 props Vector +/* */ // 315 16 10 localObject Object +/* */ // 310 1 11 localIOException IOException +/* */ // 328 1 11 localIOException1 IOException +/* */ // 344 1 11 localIOException2 IOException +/* */ // Exception table: +/* */ // from to target type +/* */ // 7 238 241 java/lang/Exception +/* */ // 299 307 310 java/io/IOException +/* */ // 7 299 315 finally +/* */ // 317 325 328 java/io/IOException +/* */ // 333 341 344 java/io/IOException +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 328 */ Object ret = null; +/* 329 */ switch (index - offset) { +/* */ case 0: +/* 331 */ if (mode == 0) { +/* 332 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 333 */ "Left Button"), "No", "Yes"); +/* 334 */ } else if (mode == 1) { +/* 335 */ ret = new Boolean((this.keyToCheck & 0x1) != 0); +/* 336 */ } else if (mode == 2) { +/* 337 */ if (((Boolean)value).booleanValue()) { +/* 338 */ this.keyToCheck |= 0x1; +/* */ } else +/* 340 */ this.keyToCheck &= 0xFFFFFFFE; +/* */ } +/* 342 */ break; +/* */ case 1: +/* 344 */ if (mode == 0) { +/* 345 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 346 */ "Right Button"), "No", "Yes"); +/* 347 */ } else if (mode == 1) { +/* 348 */ ret = new Boolean((this.keyToCheck & 0x2) != 0); +/* 349 */ } else if (mode == 2) { +/* 350 */ if (((Boolean)value).booleanValue()) { +/* 351 */ this.keyToCheck |= 0x2; +/* */ } else +/* 353 */ this.keyToCheck &= 0xFFFFFFFD; +/* */ } +/* 355 */ break; +/* */ case 2: +/* 357 */ if (mode == 0) { +/* 358 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 359 */ "Center Button"), "No", "Yes"); +/* 360 */ } else if (mode == 1) { +/* 361 */ ret = new Boolean((this.keyToCheck & 0x4) != 0); +/* 362 */ } else if (mode == 2) { +/* 363 */ if (((Boolean)value).booleanValue()) { +/* 364 */ this.keyToCheck |= 0x4; +/* */ } else +/* 366 */ this.keyToCheck &= 0xFFFFFFFB; +/* */ } +/* 368 */ break; +/* */ case 3: +/* 370 */ if (mode == 0) { +/* 371 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 372 */ "Wait for up-click"), "Down", "Up"); +/* 373 */ } else if (mode == 1) { +/* 374 */ ret = new Boolean(this.waitForUp); +/* 375 */ } else if (mode == 2) { +/* 376 */ this.waitForUp = ((Boolean)value).booleanValue(); +/* */ } +/* 378 */ break; +/* */ case 4: +/* 380 */ if (mode == 0) { +/* 381 */ ret = URLPropertyEditor.make(new Property(this, index, +/* 382 */ "Config File").allowSetNull(), "clk"); +/* 383 */ } else if (mode == 1) { +/* 384 */ ret = this.config; +/* 385 */ } else if (mode == 2) { +/* 386 */ this.config = ((URL)value); +/* 387 */ if (this.config != null) { +/* 388 */ BackgroundLoader.get(this, this.config); +/* */ } else +/* 390 */ this.configTable = null; +/* */ } +/* 392 */ break; +/* */ default: +/* 394 */ ret = super.properties(index, offset + 5, mode, value); +/* */ } +/* */ +/* 397 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 403 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 407 */ s.saveVersion(2, classCookie); +/* 408 */ super.saveState(s); +/* 409 */ s.saveInt(this.keyToCheck); +/* 410 */ s.saveBoolean(this.waitForUp); +/* 411 */ URL.save(s, this.config); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 416 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 418 */ super.restoreState(r); +/* 419 */ this.keyToCheck = ((char)r.restoreInt()); +/* 420 */ break; +/* */ case 1: +/* 422 */ super.restoreState(r); +/* 423 */ this.keyToCheck = ((char)r.restoreInt()); +/* 424 */ this.waitForUp = r.restoreBoolean(); +/* 425 */ break; +/* */ case 2: +/* 427 */ super.restoreState(r); +/* 428 */ this.keyToCheck = ((char)r.restoreInt()); +/* 429 */ this.waitForUp = r.restoreBoolean(); +/* 430 */ this.config = URL.restore(r); +/* 431 */ break; +/* */ default: +/* 433 */ throw new TooNewException(); +/* */ } +/* 435 */ if (this.config == null) { +/* 436 */ this.configTable = null; +/* */ } else { +/* 438 */ BackgroundLoader.get(this, this.config); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 450 */ String rval = super.toString() + "["; +/* 451 */ if ((this.keyToCheck & 0x1) != 0) { +/* 452 */ rval = rval + "*"; +/* */ } else +/* 454 */ rval = rval + " "; +/* 455 */ if ((this.keyToCheck & 0x4) != 0) { +/* 456 */ rval = rval + "*"; +/* */ } else +/* 458 */ rval = rval + " "; +/* 459 */ if ((this.keyToCheck & 0x2) != 0) { +/* 460 */ rval = rval + "*"; +/* */ } else +/* 462 */ rval = rval + " "; +/* 463 */ if (this.waitForUp) { +/* 464 */ rval = rval + "u]"; +/* */ } else +/* 466 */ rval = rval + "d]"; +/* 467 */ return rval; +/* */ } +/* */ +/* */ class Area +/* */ { +/* */ int x; +/* */ int y; +/* */ int w; +/* */ int h; +/* */ String actionNamePrefix; +/* */ Vector props; +/* */ +/* */ Area() {} +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ClickSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ClickWidget.java b/NET/worlds/scape/ClickWidget.java new file mode 100644 index 0000000..5a5ef6c --- /dev/null +++ b/NET/worlds/scape/ClickWidget.java @@ -0,0 +1,37 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ abstract class ClickWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ ClickWidget(ToolBar toolbar, String name, String prompt) +/* */ { +/* 19 */ super(toolbar, name, prompt); +/* */ } +/* */ +/* */ public boolean usesDrag() +/* */ { +/* 24 */ return false; +/* */ } +/* */ +/* */ public boolean available() +/* */ { +/* 29 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ClickWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ClipboardEntry.java b/NET/worlds/scape/ClipboardEntry.java new file mode 100644 index 0000000..d0e2c1d --- /dev/null +++ b/NET/worlds/scape/ClipboardEntry.java @@ -0,0 +1,67 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ClipboardEntry +/* */ { +/* */ private SuperRoot original; +/* */ +/* */ +/* */ +/* */ +/* */ private byte[] copy; +/* */ +/* */ +/* */ +/* */ +/* */ private boolean canPasteOriginal; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean copy(SuperRoot obj) +/* */ { +/* 28 */ this.original = obj; +/* 29 */ this.copy = obj.getByteCopy(); +/* 30 */ this.canPasteOriginal = false; +/* 31 */ return this.copy != null; +/* */ } +/* */ +/* */ boolean cut(SuperRoot obj) +/* */ { +/* */ try { +/* 37 */ return copy(obj); +/* */ } finally { +/* 39 */ this.canPasteOriginal = true; +/* */ } +/* */ } +/* */ +/* */ SuperRoot paste() +/* */ { +/* 45 */ if (this.copy != null) { +/* 46 */ if (this.canPasteOriginal) { +/* 47 */ this.canPasteOriginal = false; +/* 48 */ return this.original; +/* */ } +/* 50 */ return SuperRoot.getCopyFromBytes(this.copy); +/* */ } +/* 52 */ return null; +/* */ } +/* */ +/* */ void unPaste(SuperRoot obj) +/* */ { +/* 57 */ if (obj == this.original) { +/* 58 */ this.canPasteOriginal = true; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ClipboardEntry.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ColorAttribute.java b/NET/worlds/scape/ColorAttribute.java new file mode 100644 index 0000000..3be60e7 --- /dev/null +++ b/NET/worlds/scape/ColorAttribute.java @@ -0,0 +1,111 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColorAttribute +/* */ extends Attribute +/* */ { +/* */ public ColorAttribute(int attrID) +/* */ { +/* 19 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 26 */ private Color value = Color.black; +/* */ +/* */ +/* */ +/* */ public ColorAttribute() {} +/* */ +/* */ +/* */ public void set(Color x) +/* */ { +/* 35 */ this.value = x; +/* */ +/* 37 */ noteChange(); +/* */ } +/* */ +/* */ public Color get() +/* */ { +/* 42 */ return this.value; +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 47 */ s.writeInt(this.value.getRGB()); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 52 */ this.value = new Color(ds.readInt()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 61 */ Object ret = null; +/* 62 */ switch (index - offset) { +/* */ case 0: +/* 64 */ if (mode == 0) { +/* 65 */ ret = ColorPropertyEditor.make( +/* 66 */ new Property(this, index, "value")); +/* 67 */ } else if (mode == 1) { +/* 68 */ ret = get(); +/* 69 */ } else if (mode == 2) +/* 70 */ set((Color)value); +/* 71 */ break; +/* */ default: +/* 73 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 75 */ return ret; +/* */ } +/* */ +/* */ +/* 79 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 83 */ s.saveVersion(0, classCookie); +/* 84 */ super.saveState(s); +/* */ +/* 86 */ s.saveInt(this.value.getRGB()); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 91 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 93 */ super.restoreState(r); +/* 94 */ this.value = new Color(r.restoreInt()); +/* 95 */ break; +/* */ default: +/* 97 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 103 */ return super.toString() + "[" + get() + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ColorAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ColorEditorDialog.java b/NET/worlds/scape/ColorEditorDialog.java new file mode 100644 index 0000000..d64294f --- /dev/null +++ b/NET/worlds/scape/ColorEditorDialog.java @@ -0,0 +1,84 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ColorEditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected Color c; +/* */ +/* */ ColorEditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 28 */ super(parent, title); +/* 29 */ this.property = property; +/* 30 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 35 */ this.c = ((Color)this.property.get()); +/* 36 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 41 */ return 3; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 46 */ if (this.c == null) { +/* 47 */ return "null"; +/* */ } +/* 49 */ switch (index) { +/* */ case 0: +/* 51 */ return this.c.getRed(); +/* */ case 1: +/* 53 */ return this.c.getGreen(); +/* */ } +/* 55 */ return this.c.getBlue(); +/* */ } +/* */ +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 61 */ int[] c = new int[3]; +/* 62 */ int count = 0; +/* 63 */ while (e.hasMoreTokens()) +/* */ try { +/* 65 */ int tmp = Integer.valueOf(e.nextToken()).intValue(); +/* 66 */ if ((tmp < 0) || (tmp > 255)) +/* 67 */ return false; +/* 68 */ c[(count++)] = tmp; +/* */ } catch (Exception x) { +/* 70 */ return false; +/* */ } +/* 72 */ if (count == 3) { +/* 73 */ this.parent.addUndoableSet(this.property, new Color(c[0], c[1], c[2])); +/* 74 */ return true; +/* */ } +/* 76 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ColorEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ColorPropertyEditor.java b/NET/worlds/scape/ColorPropertyEditor.java new file mode 100644 index 0000000..92da997 --- /dev/null +++ b/NET/worlds/scape/ColorPropertyEditor.java @@ -0,0 +1,102 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ColorPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private ColorPropertyEditor(Property property) +/* */ { +/* 83 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 88 */ return new ColorEditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 93 */ property.setPropertyType(4); +/* 94 */ return property.setEditor(new ColorPropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ColorPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CopyWidget.java b/NET/worlds/scape/CopyWidget.java new file mode 100644 index 0000000..65737da --- /dev/null +++ b/NET/worlds/scape/CopyWidget.java @@ -0,0 +1,36 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class CopyWidget +/* */ extends ClickWidget +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public CopyWidget(ToolBar toolbar) +/* */ { +/* 23 */ super(toolbar, Console.message("copy.gif"), Console.message("Copy")); +/* */ } +/* */ +/* */ public void perform() +/* */ { +/* 28 */ Console.getFrame().getEditTile().copy(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CopyWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CrashAction.java b/NET/worlds/scape/CrashAction.java new file mode 100644 index 0000000..b3c5d6c --- /dev/null +++ b/NET/worlds/scape/CrashAction.java @@ -0,0 +1,78 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class CrashAction +/* */ extends Action +/* */ { +/* 13 */ private String message = "CrashAction"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setMessage(String m) +/* */ { +/* 21 */ this.message = m; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqId) +/* */ { +/* 26 */ throw new Error(this.message); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 35 */ Object ret = null; +/* 36 */ switch (index - offset) { +/* */ case 0: +/* 38 */ if (mode == 0) { +/* 39 */ ret = StringPropertyEditor.make( +/* 40 */ new Property(this, index, "Message")); +/* 41 */ } else if (mode == 1) { +/* 42 */ ret = new String(this.message); +/* 43 */ } else if (mode == 2) +/* 44 */ this.message = ((String)value); +/* 45 */ break; +/* */ default: +/* 47 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 49 */ return ret; +/* */ } +/* */ +/* 52 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 56 */ s.saveVersion(1, classCookie); +/* 57 */ super.saveState(s); +/* 58 */ s.saveString(this.message); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 63 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 65 */ super.restoreState(r); +/* 66 */ this.message = r.restoreString(); +/* 67 */ break; +/* */ default: +/* 69 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CrashAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/CutWidget.java b/NET/worlds/scape/CutWidget.java new file mode 100644 index 0000000..d3b70a3 --- /dev/null +++ b/NET/worlds/scape/CutWidget.java @@ -0,0 +1,36 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class CutWidget +/* */ extends ClickWidget +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public CutWidget(ToolBar toolbar) +/* */ { +/* 23 */ super(toolbar, "cut.gif", Console.message("Cut")); +/* */ } +/* */ +/* */ public void perform() +/* */ { +/* 28 */ Console.getFrame().getEditTile().cut(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\CutWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DPAction.java b/NET/worlds/scape/DPAction.java new file mode 100644 index 0000000..64ee529 --- /dev/null +++ b/NET/worlds/scape/DPAction.java @@ -0,0 +1,386 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DPAction +/* */ extends Action +/* */ { +/* */ private static final int INFINITY = 60000; +/* 63 */ protected int loadDist = 2; +/* 64 */ protected int unloadDist = 4; +/* */ +/* */ +/* 67 */ protected DPState state = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 73 */ public int getLoadDist() { return this.loadDist; } +/* 74 */ public int getUnloadDist() { return this.unloadDist; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setLoadDist(int v) +/* */ { +/* 86 */ assert (v > 0); +/* */ +/* 88 */ if (v <= 0) +/* 89 */ return; +/* 90 */ this.loadDist = v; +/* 91 */ if (this.unloadDist <= this.loadDist) { +/* 92 */ this.unloadDist = (v + 1); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setUnloadDist(int v) +/* */ { +/* 106 */ assert (v > 1); +/* */ +/* 108 */ if (v <= this.loadDist) { +/* 109 */ this.unloadDist = (this.loadDist + 1); +/* */ } else { +/* 111 */ this.unloadDist = v; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 120 */ if (this.state == null) { +/* 121 */ return null; +/* */ } +/* 123 */ if (e != null) { +/* 124 */ this.state.setDist(0, e.time); +/* */ } else { +/* 126 */ this.state.setDist(0, Std.getFastTime()); +/* */ } +/* 128 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void handleDist(int dist, int time) +/* */ { +/* 152 */ assert (this.loadDist < this.unloadDist); +/* */ +/* 154 */ if (!(getOwner() instanceof Portal)) { +/* 155 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 161 */ if (dist <= this.loadDist) +/* */ { +/* 163 */ ((Portal)getOwner()).triggerLoad(); +/* 164 */ if (((Portal)getOwner()).active()) { +/* 165 */ informOtherSide(dist + 1, time); +/* */ } else +/* 167 */ new DPLoadTracker(this, dist + 1, time); +/* 168 */ } else if (dist > this.unloadDist) +/* */ { +/* 170 */ ((Portal)getOwner()).reset(); +/* 171 */ } else if (((Portal)getOwner()).active()) { +/* 172 */ informOtherSide(dist + 1, time); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void informOtherSide(int distance, int triggerTime) +/* */ { +/* 189 */ DPState s = null; +/* 190 */ Portal p = ((Portal)getOwner()).farSide(); +/* 191 */ Enumeration e = p.getActions(); +/* 192 */ while (e.hasMoreElements()) { +/* 193 */ Object a = e.nextElement(); +/* 194 */ if ((a instanceof DPAction)) { +/* 195 */ s = ((DPAction)a).getState(); +/* 196 */ assert (s != null); +/* */ } +/* */ } +/* */ +/* */ +/* 201 */ if (s != null) +/* */ { +/* */ +/* 204 */ s.setDist(distance, triggerTime); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 217 */ super.noteAddingTo(owner); +/* */ +/* */ +/* 220 */ if (this.state != null) { +/* 221 */ return; +/* */ } +/* */ +/* 224 */ if (!(owner instanceof Portal)) { +/* 225 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 235 */ World w = owner.getWorld(); +/* 236 */ if (w != null) { +/* 237 */ this.state = findState(w); +/* */ } +/* */ +/* */ +/* 241 */ if (this.state == null) { +/* 242 */ this.state = new DPState(60000, this); +/* */ } else { +/* 244 */ this.state.addConnection(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected DPState findState(SuperRoot root) +/* */ { +/* 255 */ DPState rVal = null; +/* */ +/* 257 */ Enumeration e = root.getDeepOwned(); +/* 258 */ while ((e.hasMoreElements()) && (rVal == null)) { +/* 259 */ SuperRoot sr = (SuperRoot)e.nextElement(); +/* 260 */ if ((sr instanceof DPAction)) { +/* 261 */ rVal = ((DPAction)sr).getState(); +/* */ } +/* */ } +/* 264 */ return rVal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DPState getState() +/* */ { +/* 273 */ return this.state; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 282 */ if (this.state != null) { +/* 283 */ this.state.dropConnection(this); +/* 284 */ this.state = null; +/* */ } +/* */ +/* 287 */ super.detach(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 297 */ Object ret = null; +/* 298 */ switch (index - offset) { +/* */ case 0: +/* 300 */ if (mode == 0) { +/* 301 */ ret = IntegerPropertyEditor.make( +/* 302 */ new Property(this, index, "Load Distance")); +/* 303 */ } else if (mode == 1) { +/* 304 */ ret = new Integer(this.loadDist); +/* 305 */ } else if (mode == 2) +/* 306 */ setLoadDist(((Integer)value).intValue()); +/* 307 */ break; +/* */ case 1: +/* 309 */ if (mode == 0) { +/* 310 */ ret = IntegerPropertyEditor.make( +/* 311 */ new Property(this, index, "Unload Distance")); +/* 312 */ } else if (mode == 1) { +/* 313 */ ret = new Integer(this.unloadDist); +/* 314 */ } else if (mode == 2) +/* 315 */ setUnloadDist(((Integer)value).intValue()); +/* 316 */ break; +/* */ case 2: +/* 318 */ if (mode == 0) { +/* 319 */ ret = new Property(this, index, "Cell State"); +/* 320 */ } else if (mode == 1) +/* 321 */ ret = this.state; +/* 322 */ break; +/* */ default: +/* 324 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 326 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 333 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 337 */ s.saveVersion(2, classCookie); +/* 338 */ super.saveState(s); +/* 339 */ s.saveInt(this.loadDist); +/* 340 */ s.saveInt(this.unloadDist); +/* 341 */ s.saveMaybeNull(this.state); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 346 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 348 */ super.restoreState(r); +/* 349 */ this.loadDist = r.restoreInt(); +/* 350 */ this.unloadDist = r.restoreInt(); +/* 351 */ this.state = ((DPState)r.restore()); +/* 352 */ r.restoreInt(); +/* 353 */ break; +/* */ case 1: +/* 355 */ super.restoreState(r); +/* 356 */ this.loadDist = r.restoreInt(); +/* 357 */ this.unloadDist = r.restoreInt(); +/* 358 */ this.state = ((DPState)r.restore()); +/* 359 */ break; +/* */ case 2: +/* 361 */ super.restoreState(r); +/* 362 */ this.loadDist = r.restoreInt(); +/* 363 */ this.unloadDist = r.restoreInt(); +/* 364 */ this.state = ((DPState)r.restoreMaybeNull()); +/* 365 */ break; +/* */ default: +/* 367 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 377 */ return +/* 378 */ super.toString() + "[" + getOwner().getWorld().getName() + "|" + getOwner().getName() + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DPAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DPLoadTracker.java b/NET/worlds/scape/DPLoadTracker.java new file mode 100644 index 0000000..602e212 --- /dev/null +++ b/NET/worlds/scape/DPLoadTracker.java @@ -0,0 +1,119 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class DPLoadTracker +/* */ extends WObject +/* */ implements FrameHandler, NonPersister +/* */ { +/* */ protected DPAction src; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected int distance; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 31 */ protected int triggerTime = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DPLoadTracker(DPAction a, int dist, int time) +/* */ { +/* 43 */ this.src = a; +/* 44 */ setDistance(dist, time); +/* 45 */ ((Portal)this.src.getOwner()).addHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DPLoadTracker() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setDistance(int dist, int time) +/* */ { +/* 63 */ if (time > this.triggerTime) { +/* 64 */ this.distance = dist; +/* 65 */ this.triggerTime = time; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent ev) +/* */ { +/* 78 */ if (((Portal)this.src.getOwner()).active()) +/* */ { +/* 80 */ this.src.informOtherSide(this.distance, this.triggerTime); +/* */ +/* 82 */ finish(); +/* 83 */ } else if (((Portal)this.src.getOwner()).unconnected()) +/* */ { +/* 85 */ finish(); +/* */ } +/* 87 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void finish() +/* */ { +/* 96 */ ((Portal)this.src.getOwner()).removeHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 111 */ return super.toString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DPLoadTracker.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DPState.java b/NET/worlds/scape/DPState.java new file mode 100644 index 0000000..c5df105 --- /dev/null +++ b/NET/worlds/scape/DPState.java @@ -0,0 +1,221 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DPState +/* */ extends SuperRoot +/* */ { +/* */ public static final int INFINITY = 60000; +/* 44 */ protected Vector connections = new Vector(); +/* */ +/* */ +/* 47 */ protected int currentDist = 60000; +/* */ +/* */ +/* 50 */ protected long currentTime = 0L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DPState(int dist, DPAction conn) +/* */ { +/* 61 */ this.currentDist = dist; +/* 62 */ this.currentTime = 0L; +/* 63 */ addConnection(conn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DPState() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setDist(int d, int t) +/* */ { +/* 82 */ if (this.currentTime > t) +/* 83 */ return; +/* 84 */ if ((this.currentDist <= d) && (this.currentTime == t)) { +/* 85 */ return; +/* */ } +/* 87 */ this.currentDist = d; +/* 88 */ this.currentTime = t; +/* */ +/* */ +/* 91 */ Enumeration e = this.connections.elements(); +/* 92 */ while (e.hasMoreElements()) { +/* 93 */ ((DPAction)e.nextElement()).handleDist(d, t); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public int getDist() +/* */ { +/* 102 */ return this.currentDist; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getConnections() +/* */ { +/* 111 */ return this.connections.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getPortals() +/* */ { +/* 120 */ Vector v = new Vector(this.connections.size()); +/* 121 */ Enumeration e = this.connections.elements(); +/* 122 */ while (e.hasMoreElements()) +/* 123 */ v.addElement(((DPAction)e.nextElement()).getOwner()); +/* 124 */ return v.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addConnection(DPAction conn) +/* */ { +/* 134 */ if (this.connections.contains(conn)) { +/* 135 */ return; +/* */ } +/* 137 */ this.connections.addElement(conn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void dropConnection(DPAction conn) +/* */ { +/* 147 */ this.connections.removeElement(conn); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 157 */ Object ret = null; +/* 158 */ switch (index - offset) { +/* */ case 0: +/* 160 */ if (mode == 0) { +/* 161 */ ret = IntegerPropertyEditor.make( +/* 162 */ new Property(this, index, "Current Distance")); +/* 163 */ } else if (mode == 1) { +/* 164 */ ret = new Integer(this.currentDist); +/* 165 */ } else if (mode == 2) +/* 166 */ this.currentDist = ((Integer)value).intValue(); +/* 167 */ break; +/* */ case 1: +/* 169 */ if (mode == 0) { +/* 170 */ ret = new VectorProperty(this, index, "Connections"); +/* 171 */ } else if (mode == 1) +/* 172 */ ret = this.connections.clone(); +/* 173 */ break; +/* */ default: +/* 175 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 177 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 184 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 188 */ s.saveVersion(0, classCookie); +/* 189 */ super.saveState(s); +/* 190 */ s.saveVector(this.connections); +/* 191 */ s.saveInt(this.currentDist); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 196 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 198 */ super.restoreState(r); +/* 199 */ this.connections = r.restoreVector(); +/* 200 */ this.currentDist = r.restoreInt(); +/* 201 */ break; +/* */ default: +/* 203 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 213 */ return super.getName(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DPState.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DeepEnumeration.java b/NET/worlds/scape/DeepEnumeration.java new file mode 100644 index 0000000..82000a6 --- /dev/null +++ b/NET/worlds/scape/DeepEnumeration.java @@ -0,0 +1,193 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DeepEnumeration +/* */ implements Enumeration +/* */ { +/* 27 */ Vector roots = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* 32 */ Vector> vectors = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 38 */ Vector currentVector = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 46 */ int currentIndex = -1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 52 */ SuperRoot nextValue = null; +/* */ +/* */ +/* */ +/* */ public DeepEnumeration(SuperRoot o) +/* */ { +/* 58 */ addChildElement(o); +/* */ } +/* */ +/* */ +/* */ +/* */ public DeepEnumeration(Vector v) +/* */ { +/* 65 */ addChildVector(v); +/* */ } +/* */ +/* */ +/* */ +/* */ public DeepEnumeration(Enumeration e) +/* */ { +/* 72 */ addChildEnumeration(e); +/* */ } +/* */ +/* */ +/* */ +/* */ public DeepEnumeration() {} +/* */ +/* */ +/* */ +/* 81 */ protected boolean valueRetrieved = true; +/* */ +/* */ public boolean hasMoreElements() { +/* 84 */ if (this.valueRetrieved) +/* 85 */ getNextElement(); +/* 86 */ return this.nextValue != null; +/* */ } +/* */ +/* */ public K nextElement() +/* */ { +/* 91 */ if (this.valueRetrieved) +/* 92 */ getNextElement(); +/* 93 */ this.valueRetrieved = true; +/* */ +/* */ +/* 96 */ return this.nextValue; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void getNextElement() +/* */ { +/* 115 */ this.valueRetrieved = false; +/* 116 */ if (!this.roots.isEmpty()) { +/* 117 */ this.nextValue = ((SuperRoot)this.roots.elementAt(this.roots.size() - 1)); +/* 118 */ this.roots.removeElementAt(this.roots.size() - 1); +/* 119 */ assert (this.nextValue != null); +/* 120 */ this.nextValue.getChildren(this); +/* 121 */ } else if (this.currentIndex >= 0) { +/* */ try { +/* 123 */ this.nextValue = ((SuperRoot)this.currentVector.elementAt(this.currentIndex--)); +/* */ } catch (ArrayIndexOutOfBoundsException e) { +/* 125 */ this.currentIndex = (this.currentVector.size() - 1); +/* 126 */ getNextElement(); +/* */ } +/* 128 */ assert (this.nextValue != null); +/* 129 */ this.nextValue.getChildren(this); +/* 130 */ } else if (!this.vectors.isEmpty()) { +/* 131 */ this.currentVector = ((Vector)this.vectors.elementAt(this.vectors.size() - 1)); +/* 132 */ this.currentIndex = (this.currentVector.size() - 1); +/* 133 */ this.vectors.removeElementAt(this.vectors.size() - 1); +/* 134 */ getNextElement(); +/* */ } else { +/* 136 */ this.nextValue = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addChildVector(Vector v) +/* */ { +/* 146 */ assert (v != null); +/* 147 */ this.vectors.addElement(v); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addChildEnumeration(Enumeration e) +/* */ { +/* 156 */ if ((!$assertionsDisabled) && (e == null)) throw new AssertionError(); +/* 157 */ while (e.hasMoreElements()) { +/* 158 */ addChildElement(e.nextElement()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void addChildVectorWithNulls(Vector v) +/* */ { +/* 167 */ assert (v != null); +/* 168 */ for (int i = v.size() - 1; i >= 0; i--) { +/* 169 */ Object obj = v.elementAt(i--); +/* 170 */ if (obj != null) { +/* 171 */ addChildElement(obj); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public void addChildElement(Object o) +/* */ { +/* 179 */ assert (o != null); +/* 180 */ this.roots.addElement((SuperRoot)o); +/* */ } +/* */ +/* */ public void addChildVectorAction(Vector actions) { +/* 184 */ assert (actions != null); +/* 185 */ this.vectors.addElement(actions); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DeepEnumeration.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DialogAction.java b/NET/worlds/scape/DialogAction.java new file mode 100644 index 0000000..c1c14fd --- /dev/null +++ b/NET/worlds/scape/DialogAction.java @@ -0,0 +1,171 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class DialogAction +/* */ extends Action +/* */ implements DialogReceiver +/* */ { +/* 28 */ boolean showDialog = true; +/* 29 */ boolean cancelOnly = false; +/* */ +/* 31 */ private static PolledDialog dialogUp = null; +/* */ private PolledDialog thisDialog; +/* 33 */ protected static boolean doCancel = false; +/* */ +/* */ +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) +/* */ { +/* 39 */ if (dialogUp == who) { +/* 40 */ doCancel = true; +/* 41 */ if (confirmed) { +/* 42 */ doIt(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public abstract void doIt(); +/* */ +/* */ +/* */ +/* */ public abstract PolledDialog getDialog(); +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 59 */ Console console = Console.getActive(); +/* */ +/* */ +/* 62 */ if (console == null) { +/* 63 */ return null; +/* */ } +/* */ +/* 66 */ if ((!this.showDialog) && (!this.cancelOnly)) { +/* 67 */ if (console != null) +/* 68 */ doIt(); +/* 69 */ return null; +/* */ } +/* */ +/* 72 */ if (dialogUp != null) +/* */ { +/* */ +/* */ +/* 76 */ if ((this.thisDialog != dialogUp) || (seqID == null)) { +/* 77 */ doCancel = true; +/* 78 */ } else if (doCancel) { +/* 79 */ dialogUp.closeIt(false); +/* 80 */ dialogUp = null; +/* 81 */ this.thisDialog = null; +/* 82 */ return null; +/* */ } +/* 84 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 90 */ if (this.cancelOnly) { +/* 91 */ return null; +/* */ } +/* 93 */ this.thisDialog = (dialogUp = getDialog()); +/* 94 */ doCancel = false; +/* 95 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 103 */ Object ret = null; +/* 104 */ switch (index - offset) { +/* */ case 0: +/* 106 */ if (mode == 0) { +/* 107 */ ret = BooleanPropertyEditor.make( +/* 108 */ new Property(this, index, "Display Dialog Box"), +/* 109 */ "Don't ask", +/* 110 */ "Ask user to ok choice"); +/* */ } +/* 112 */ else if (mode == 1) { +/* 113 */ ret = new Boolean(this.showDialog); +/* */ } +/* 115 */ else if (mode == 2) { +/* 116 */ this.showDialog = ((Boolean)value).booleanValue(); +/* */ } +/* 118 */ break; +/* */ case 1: +/* 120 */ if (mode == 0) { +/* 121 */ ret = BooleanPropertyEditor.make( +/* 122 */ new Property(this, index, "Cancel only"), +/* 123 */ "Regular operation", +/* 124 */ "Cancels dialog, doesn't do action"); +/* 125 */ } else if (mode == 1) { +/* 126 */ ret = new Boolean(this.cancelOnly); +/* 127 */ } else if (mode == 2) +/* 128 */ this.cancelOnly = ((Boolean)value).booleanValue(); +/* 129 */ break; +/* */ default: +/* 131 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 133 */ return ret; +/* */ } +/* */ +/* */ +/* 137 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 140 */ s.saveVersion(0, classCookie); +/* 141 */ super.saveState(s); +/* */ +/* 143 */ s.saveBoolean(this.showDialog); +/* 144 */ s.saveBoolean(this.cancelOnly); +/* */ } +/* */ +/* */ protected void dialogActionSkipRestore(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 150 */ super.restoreState(r); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 154 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 156 */ super.restoreState(r); +/* 157 */ this.showDialog = r.restoreBoolean(); +/* 158 */ this.cancelOnly = r.restoreBoolean(); +/* 159 */ break; +/* */ +/* */ default: +/* 162 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DialogAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DiffRoomSensor.java b/NET/worlds/scape/DiffRoomSensor.java new file mode 100644 index 0000000..bfa6e79 --- /dev/null +++ b/NET/worlds/scape/DiffRoomSensor.java @@ -0,0 +1,87 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DiffRoomSensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* */ private Room lastCamRoom; +/* */ +/* */ public void detach() +/* */ { +/* 34 */ this.lastCamRoom = null; +/* 35 */ super.detach(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 45 */ Object owner = getOwner(); +/* 46 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 47 */ return true; +/* 48 */ WObject o = (WObject)owner; +/* */ +/* 50 */ Room thisRoom = o.getRoom(); +/* 51 */ Room thisCamRoom = Pilot.getActiveRoom(); +/* */ +/* 53 */ if ((thisCamRoom != thisRoom) && (this.lastCamRoom == thisRoom)) { +/* 54 */ trigger(e); +/* */ } +/* 56 */ this.lastCamRoom = thisCamRoom; +/* 57 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 63 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 67 */ s.saveVersion(0, classCookie); +/* 68 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 73 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 75 */ super.restoreState(r); +/* 76 */ break; +/* */ default: +/* 78 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DiffRoomSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DirectShow.java b/NET/worlds/scape/DirectShow.java new file mode 100644 index 0000000..ad6f0e8 --- /dev/null +++ b/NET/worlds/scape/DirectShow.java @@ -0,0 +1,59 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ public class DirectShow implements TextureSurfaceRenderer +/* */ { +/* */ static final int nUnitialized = 0; +/* */ static final int nStopped = 1; +/* */ static final int nPaused = 2; +/* */ static final int nPlaying = 3; +/* */ private int mediaRendererInstancePtr; +/* */ private int m_hwnd; +/* */ +/* */ public DirectShow() { +/* 13 */ nativeInit(); +/* 14 */ nInit(0); +/* */ } +/* */ +/* */ public DirectShow(int hwnd) +/* */ { +/* 19 */ this.m_hwnd = hwnd; +/* 20 */ nativeInit(); +/* 21 */ nInit(hwnd); +/* */ } +/* */ +/* */ public void finalize() +/* */ { +/* 26 */ nTick(); +/* 27 */ nStop(); +/* 28 */ nShutdown(); +/* */ } +/* */ +/* */ public void renderTo(int dc) +/* */ { +/* 33 */ nRenderTo(this.m_hwnd, dc); +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ protected native void nInit(int paramInt); +/* */ +/* */ protected native void nShutdown(); +/* */ +/* */ public native void nOpen(String paramString); +/* */ +/* */ public native void nPlay(int paramInt); +/* */ +/* */ public native void nStop(); +/* */ +/* */ public native void nPause(); +/* */ +/* */ public native void nRenderTo(int paramInt1, int paramInt2); +/* */ +/* */ public native int nTick(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DirectShow.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DiskShadow.java b/NET/worlds/scape/DiskShadow.java new file mode 100644 index 0000000..b24ab89 --- /dev/null +++ b/NET/worlds/scape/DiskShadow.java @@ -0,0 +1,115 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DiskShadow +/* */ extends Polygon +/* */ implements NonPersister, Shadow +/* */ { +/* 20 */ private static int numSides = 8; +/* 21 */ private static float[] diskVertices = new float[5 * numSides]; +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 27 */ float radius = 0.5F; +/* 28 */ int end = 5 * numSides; +/* 29 */ double angle = 0.0D; +/* 30 */ double angleInc = (float)(6.283185307179586D / numSides); +/* 31 */ for (int i = 0; i < end; angle += angleInc) +/* */ { +/* 33 */ float x = (float)Math.cos(angle); +/* 34 */ float y = (float)Math.sin(angle); +/* 35 */ diskVertices[(i + 0)] = (radius * x); +/* 36 */ diskVertices[(i + 1)] = (radius * y); +/* 37 */ diskVertices[(i + 2)] = 0.0F; +/* 38 */ diskVertices[(i + 3)] = (0.5F + 0.5F * x); +/* 39 */ diskVertices[(i + 4)] = (0.5F + 0.5F * y);i += 5; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public DiskShadow(WObject caster) +/* */ { +/* 49 */ super(diskVertices, new Material(0.0F, 0.0F, 0.0F, Color.black, null, 0.5F, false, false)); +/* 50 */ setBumpable(false); +/* 51 */ adjustShadow(caster); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void adjustShadow(WObject caster) +/* */ { +/* 61 */ Room r = caster.getRoom(); +/* 62 */ if ((!caster.getVisible()) || (r == null)) +/* */ { +/* 64 */ detach(); +/* 65 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 75 */ float size = caster.getMinXYExtent(); +/* */ +/* 77 */ BoundBoxTemp box = caster.getBoundBox(); +/* */ +/* */ +/* */ +/* 81 */ if ((size <= 0.0F) || (size > 10000.0F) || (box.hi.z < 0.0F) || (box.lo.z >= 250.0F)) +/* */ { +/* 83 */ detach(); +/* 84 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 89 */ float shadowFrac = 1.0F; +/* 90 */ if (box.lo.z > 0.0F) { +/* 91 */ shadowFrac = 1.0F - box.lo.z / 250.0F; +/* */ } +/* 93 */ if ((getOwner() == null) && (r != null)) { +/* 94 */ r.getEnvironment().add(this); +/* */ } +/* 96 */ Point3Temp xyz = caster.getWorldPosition(); +/* */ +/* 98 */ moveTo(xyz.x, xyz.y, r.floorHeight(xyz.x, xyz.y, xyz.z) + 0.5F); +/* 99 */ yaw(getYaw() - caster.getYaw()); +/* */ +/* 101 */ scale(size * shadowFrac / getScaleX()); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DiskShadow.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DispenserAction.java b/NET/worlds/scape/DispenserAction.java new file mode 100644 index 0000000..a081b79 --- /dev/null +++ b/NET/worlds/scape/DispenserAction.java @@ -0,0 +1,158 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DispenserAction +/* */ extends Action +/* */ { +/* */ URL wobName; +/* 29 */ Point3 center = new Point3(200.0F, 200.0F, 0.0F); +/* 30 */ float radius = 50.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 40 */ WObject w = (WObject)getOwner(); +/* */ +/* 42 */ SuperRoot ob = SuperRoot.readFile(this.wobName); +/* */ +/* */ +/* 45 */ if (!(ob instanceof WObject)) +/* */ { +/* 47 */ Console.println(Console.message("Cant-find") + this.wobName); +/* 48 */ return null; +/* */ } +/* */ +/* 51 */ WObject wob = (WObject)ob; +/* */ +/* */ +/* */ +/* */ +/* 56 */ Point3Temp pos = Point3Temp.make( +/* 57 */ this.radius - (float)Math.random() * 2.0F * this.radius, +/* 58 */ this.radius - (float)Math.random() * 2.0F * this.radius, +/* 59 */ 0.0F) +/* 60 */ .plus(this.center); +/* */ +/* */ +/* 63 */ pos.z = wob.getZ(); +/* 64 */ wob.moveTo(pos); +/* */ +/* 66 */ w.getRoom().add(wob); +/* */ +/* 68 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 77 */ Object ret = null; +/* 78 */ switch (index - offset) { +/* */ case 0: +/* 80 */ if (mode == 0) { +/* 81 */ ret = URLPropertyEditor.make( +/* 82 */ new Property(this, index, "wob File Name"), +/* 83 */ "wob"); +/* 84 */ } else if (mode == 1) { +/* 85 */ ret = this.wobName; +/* 86 */ } else if (mode == 2) +/* 87 */ this.wobName = ((URL)value); +/* 88 */ break; +/* */ +/* */ case 1: +/* 91 */ if (mode == 0) { +/* 92 */ ret = Point3PropertyEditor.make( +/* 93 */ new Property(this, index, "Center Position For Drop")); +/* 94 */ } else if (mode == 1) { +/* 95 */ ret = new Point3(this.center); +/* 96 */ } else if (mode == 2) +/* 97 */ this.center = new Point3((Point3)value); +/* 98 */ break; +/* */ +/* */ case 2: +/* 101 */ if (mode == 0) { +/* 102 */ ret = FloatPropertyEditor.make( +/* 103 */ new Property(this, index, "Drop-position Radius")); +/* 104 */ } else if (mode == 1) { +/* 105 */ ret = new Float(this.radius); +/* 106 */ } else if (mode == 2) +/* 107 */ this.radius = ((Float)value).floatValue(); +/* 108 */ break; +/* */ +/* */ default: +/* 111 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 113 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 120 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 124 */ s.saveVersion(0, classCookie); +/* 125 */ super.saveState(s); +/* 126 */ URL.save(s, this.wobName); +/* 127 */ s.save(this.center); +/* 128 */ s.saveFloat(this.radius); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 134 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 136 */ super.restoreState(r); +/* 137 */ this.wobName = URL.restore(r); +/* 138 */ this.center = ((Point3)r.restore()); +/* 139 */ this.radius = r.restoreFloat(); +/* 140 */ break; +/* */ +/* */ default: +/* 143 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 150 */ return super.toString() + "[" + this.wobName + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DispenserAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DoorBasedFilter.java b/NET/worlds/scape/DoorBasedFilter.java new file mode 100644 index 0000000..df75b21 --- /dev/null +++ b/NET/worlds/scape/DoorBasedFilter.java @@ -0,0 +1,351 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DoorBasedFilter +/* */ extends AudibilityFilter +/* */ { +/* */ float stopDistance; +/* */ +/* */ DoorBasedFilter(Sound s, WObject o, int maxHops, float stopDist) +/* */ { +/* 52 */ super(s, o, maxHops, stopDist); +/* 53 */ debugOut(6, "DoorBasedFilter"); +/* */ +/* 55 */ this.stopDistance = stopDist; +/* */ } +/* */ +/* */ +/* */ +/* */ private void debugOut(int level, String s) +/* */ { +/* 62 */ if (Sound.debugLevel > level) { +/* 63 */ System.out.println(s); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void fillOwnerEntry() +/* */ { +/* 76 */ debugOut(9, "door fillOwnerEntry called " + this.sound.getURL()); +/* 77 */ DoorBasedParams dbp = new DoorBasedParams(); +/* 78 */ dbp.room = this.owner.getRoom(); +/* 79 */ dbp.transform = Transform.make(); +/* 80 */ dbp.hopcount = 0; +/* */ +/* 82 */ dbp.portalCenter = new Point3(this.owner.getPosition()); +/* 83 */ dbp.localPortalCenter = new Point3(dbp.portalCenter); +/* 84 */ dbp.nextLastApparent = new Point3(dbp.portalCenter); +/* 85 */ dbp.position = new Point3(dbp.portalCenter); +/* 86 */ dbp.portalWidth = 0.0F; +/* 87 */ dbp.next = null; +/* 88 */ dbp.distance = 0.0D; +/* 89 */ this.ownerPos = dbp; +/* */ +/* 91 */ this.roomList.addElement(this.ownerPos); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void fillNewAP(AudibleParams connectingRoom, Portal bestPortal, int bestCount) +/* */ { +/* 110 */ debugOut(9, "fillNewAP from " + bestPortal.farSideRoom().getName()); +/* */ +/* 112 */ DoorBasedParams conRoom = (DoorBasedParams)connectingRoom; +/* 113 */ debugOut(9, " to conRoom " + conRoom.room.getName()); +/* 114 */ DoorBasedParams newAP = new DoorBasedParams(); +/* 115 */ newAP.room = bestPortal.farSideRoom(); +/* 116 */ newAP.hopcount = bestCount; +/* */ +/* 118 */ if (bestPortal.p2pXform() == null) +/* 119 */ bestPortal.setTransform(); +/* 120 */ if (bestPortal.p2pXform() != null) { +/* 121 */ newAP.transform = bestPortal.p2pXform().getTransform(); +/* */ } else { +/* 123 */ newAP.transform = Transform.make(); +/* */ } +/* */ +/* */ +/* 127 */ newAP.portalWidth = bestPortal.getScaleX(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 136 */ newAP.portalCenter = new Point3(bestPortal.getPosition()); +/* 137 */ newAP.portalCenter.plus(bestPortal.getFarCorner()) +/* 138 */ .times(0.5F); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 144 */ newAP.localPortalCenter = new Point3(newAP.portalCenter); +/* 145 */ newAP.localPortalCenter.times(newAP.transform); +/* */ +/* */ +/* 148 */ newAP.next = conRoom; +/* */ +/* */ +/* */ +/* 152 */ newAP.nextLastApparent = new Point3(newAP.next.position); +/* 153 */ newAP.nextLastApparent.times(newAP.transform); +/* */ +/* */ +/* */ +/* 157 */ newAP.position = newAP.nextLastApparent; +/* */ +/* 159 */ newAP.distance = +/* */ +/* 161 */ (Point3Temp.make(newAP.portalCenter).minus(newAP.next.localPortalCenter).length() + newAP.next.distance); +/* */ +/* 163 */ this.roomList.addElement(newAP); +/* 164 */ this.localPos = newAP; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void adjustEmitterLocation() +/* */ { +/* 176 */ debugOut(6, "DoorBasedFilter::adjustEmitterLocation"); +/* 177 */ if (this.ownerPos.room != this.owner.getRoom()) { +/* 178 */ moveEmitter(); +/* */ } +/* */ else { +/* 181 */ recursiveFindAttenuation((DoorBasedParams)this.localPos); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recursiveFindAttenuation(DoorBasedParams dbp) +/* */ { +/* 203 */ debugOut(9, "recursiveFindAttenuation on " + dbp.room.getName()); +/* 204 */ if (dbp.next == null) { +/* 205 */ dbp.portalCenter.copy(this.owner.getPosition()); +/* 206 */ dbp.localPortalCenter.copy(dbp.portalCenter); +/* 207 */ dbp.nextLastApparent.copy(dbp.portalCenter); +/* 208 */ dbp.position.copy(dbp.portalCenter); +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 214 */ recursiveFindAttenuation(dbp.next); +/* */ +/* */ +/* */ +/* 218 */ dbp.nextLastApparent.copy(dbp.next.position); +/* 219 */ dbp.nextLastApparent.times(dbp.transform); +/* */ +/* 221 */ dbp.distance = +/* */ +/* 223 */ (Point3Temp.make(dbp.portalCenter).minus(dbp.next.localPortalCenter).length() + dbp.next.distance); +/* */ +/* */ +/* */ +/* 227 */ calculateEmitterPosition(dbp); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public double calculateTau(Point3Temp listener, Point3Temp portalPos, float portalWidth) +/* */ { +/* 246 */ assert (portalWidth > 0.0F); +/* */ +/* 248 */ double tau = (Point3Temp.make(listener).minus(portalPos) +/* 249 */ .length() - portalWidth) / portalWidth; +/* 250 */ tau = Math.max(Math.min(tau, 1.0D), 0.0D); +/* */ +/* 252 */ assert (tau >= 0.0D); +/* 253 */ assert (tau <= 1.0D); +/* 254 */ return tau; +/* */ } +/* */ +/* */ public void getEmitterPosition(Point3Temp pos) +/* */ { +/* 259 */ debugOut(9, "getEmitterPosition"); +/* */ +/* 261 */ calculateEmitterPosition((DoorBasedParams)this.localPos); +/* */ +/* */ +/* 264 */ pos.copy(((DoorBasedParams)this.localPos).position); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void calculateEmitterPosition(DoorBasedParams dbp) +/* */ { +/* 283 */ if (dbp.next == null) { +/* 284 */ return; +/* */ } +/* */ +/* 287 */ float tau = (float)calculateTau(Pilot.getActive().getPosition(), +/* 288 */ dbp.localPortalCenter, +/* 289 */ dbp.portalWidth); +/* */ +/* */ +/* */ +/* */ +/* 294 */ Point3Temp far = Point3Temp.make(dbp.nextLastApparent); +/* */ +/* 296 */ Point3Temp local = Point3Temp.make(dbp.localPortalCenter); +/* */ +/* 298 */ Point3Temp apparent = local.times(tau).plus(far.times(1.0F - tau)); +/* 299 */ dbp.position.copy(apparent); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float getEmitterVolume() +/* */ { +/* 314 */ float rv = 1.0F; +/* */ +/* 316 */ assert (this.localPos != null); +/* */ +/* 318 */ DoorBasedParams dbp = (DoorBasedParams)this.localPos; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 324 */ if (dbp.next == null) { +/* 325 */ return 1.0F; +/* */ } +/* 327 */ Point3Temp apparent = Point3Temp.make(dbp.position); +/* */ +/* 329 */ double atten = apparent.minus(dbp.localPortalCenter).length(); +/* 330 */ double atten1 = dbp.distance - atten; +/* 331 */ double atten2 = -2.0D / this.stopDistance * atten1; +/* */ +/* */ +/* */ +/* */ +/* 336 */ rv = (float)Math.exp(atten2 * log10); +/* */ +/* 338 */ return rv; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 344 */ public static final double log10 = Math.log(10.0D); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DoorBasedFilter.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DoorBasedParams.java b/NET/worlds/scape/DoorBasedParams.java new file mode 100644 index 0000000..59f12b5 --- /dev/null +++ b/NET/worlds/scape/DoorBasedParams.java @@ -0,0 +1,18 @@ +package NET.worlds.scape; + +class DoorBasedParams + extends AudibleParams +{ + public Point3 portalCenter; + public Point3 localPortalCenter; + public Point3 nextLastApparent; + public float portalWidth; + public DoorBasedParams next; + public double distance; +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DoorBasedParams.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Drone.java b/NET/worlds/scape/Drone.java new file mode 100644 index 0000000..5699ad2 --- /dev/null +++ b/NET/worlds/scape/Drone.java @@ -0,0 +1,1289 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BBAppearDroneCommand; +/* */ import NET.worlds.console.BBDisappearDroneCommand; +/* */ import NET.worlds.console.BBDroneBitmapCommand; +/* */ import NET.worlds.console.BBDroneDeltaPosCommand; +/* */ import NET.worlds.console.BBMoveDroneCommand; +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.FriendsListPart; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MuteListPart; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.core.ServerTableManager; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.FilthFilter; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.InfiniteWaitException; +/* */ import NET.worlds.network.NetworkObject; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.OldPropertyList; +/* */ import NET.worlds.network.PacketTooLargeException; +/* */ import NET.worlds.network.PropertyList; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import NET.worlds.network.net2Property; +/* */ import NET.worlds.network.netProperty; +/* */ import NET.worlds.network.propReqCmd; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class Drone +/* */ extends WObject +/* */ implements NetworkObject, WobLoaded, MouseDownHandler, FrameHandler +/* */ { +/* */ private int _last_FrameTime; +/* */ private int _last_PosTime; +/* */ private int _vel_x; +/* */ private int _vel_y; +/* */ private int _vel_z; +/* */ private int _vel_yaw; +/* */ private int _last_x; +/* */ private int _last_y; +/* */ private int _last_z; +/* */ private int _last_yaw; +/* */ private int _x; +/* */ private int _y; +/* */ private int _z; +/* */ private int _yaw; +/* 170 */ private boolean inited = false; +/* */ +/* */ +/* */ +/* */ protected WObject tag; +/* */ +/* */ +/* */ +/* */ protected WObject tagbg; +/* */ +/* */ +/* */ +/* */ private Console console; +/* */ +/* */ +/* */ +/* */ private float tagHeight; +/* */ +/* */ +/* */ +/* */ private Shape sleepBox; +/* */ +/* */ +/* */ +/* */ +/* */ public Drone(ObjID id, WorldServer serv) +/* */ { +/* 197 */ if (serv != null) { +/* 198 */ assert (id != null); +/* 199 */ attachToServer(serv.getLongID(id), serv); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected Drone(String longID, WorldServer serv) +/* */ { +/* 211 */ assert (longID != null); +/* 212 */ if (serv != null) { +/* 213 */ attachToServer(longID, serv); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void attachToServer(String longID, WorldServer serv) +/* */ { +/* 222 */ if (serv == null) { +/* 223 */ return; +/* */ } +/* */ +/* */ +/* 227 */ assert (Main.isMainThread()); +/* 228 */ String nameWas = null; +/* 229 */ if (this.tag != null) { +/* 230 */ nameWas = getLongID(); +/* */ } +/* */ +/* 233 */ getSharer().createDynamicFromNet(); +/* */ +/* 235 */ setName(longID); +/* 236 */ String nameIs = getLongID(); +/* 237 */ this._server = serv; +/* 238 */ this._server.incRefCnt(this); +/* */ +/* 240 */ this._server.regObject(nameIs, this); +/* */ try { +/* 242 */ this._server.sendNetworkMsg(new propReqCmd(new ObjID(getLongID()))); +/* */ } +/* */ catch (InfiniteWaitException localInfiniteWaitException) {}catch (PacketTooLargeException e) { +/* 245 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* 248 */ if (nameIs.equals(nameWas)) +/* */ { +/* 250 */ avatarHeightChangedTo(189.0F); +/* */ } else { +/* 252 */ makeTag(false); +/* */ } +/* 254 */ Main.register(new MakeSleepBox()); +/* */ } +/* */ +/* */ class MakeSleepBox +/* */ implements MainCallback +/* */ { +/* */ MakeSleepBox() {} +/* */ +/* */ public void mainCallback() +/* */ { +/* 264 */ if ((Drone.this.sleepMode != null) && +/* 265 */ (Drone.this.sleepMode.equals(Console.message("asleep"))) && +/* 266 */ (!(Drone.this instanceof MutedDrone))) +/* */ { +/* 268 */ if (Drone.this.sleepBox == null) { +/* 269 */ Drone.this.sleepBox = new Shape(); +/* 270 */ Drone.this.sleepBox.setURL(URL.make("home:idle.rwg")); +/* 271 */ Drone.this.sleepBox.setBumpable(false); +/* 272 */ Drone.this.sleepBox.scale(100.0F); +/* 273 */ Drone.this.sleepBox.spin(0.0F, 1.0F, 1.0F, 180.0F); +/* 274 */ Drone.this.sleepBox.raise(189.0F); +/* 275 */ Drone.this.add(Drone.this.sleepBox); +/* */ } +/* */ +/* */ } +/* 279 */ else if (Drone.this.sleepBox != null) { +/* 280 */ Drone.this.sleepBox.detach(); +/* 281 */ Drone.this.sleepBox = null; +/* */ } +/* */ +/* 284 */ Main.unregister(this); +/* */ } +/* */ } +/* */ +/* */ static class Flusher implements MainCallback { +/* */ int lastTime; +/* */ +/* */ public void mainCallback() { +/* 292 */ int now = Std.getFastTime(); +/* 293 */ if (now > this.lastTime + 1000) { +/* 294 */ Drone.access$3(); +/* 295 */ this.lastTime = now; +/* */ } +/* */ } +/* */ } +/* */ +/* */ static { +/* 301 */ Main.register(new Flusher()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static void flushUnusedDrones() +/* */ { +/* 309 */ synchronized (usableDrones) { +/* 310 */ int now = Std.getFastTime(); +/* 311 */ int i = usableDrones.size(); +/* 312 */ do { Drone d = (Drone)usableDrones.elementAt(i); +/* 313 */ if (now > d.lastUsed + 2000) { +/* 314 */ usableDrones.removeElementAt(i); +/* 315 */ d.discard(); +/* */ } +/* 311 */ i--; } while (i >= 0); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 321 */ static boolean showNametags = IniFile.gamma().getIniInt("SHOWNAMETAGS", 1) == 1; +/* */ +/* 323 */ private static String[] employeeAccounts = ServerTableManager.instance() +/* 324 */ .getTable("employeeAccounts"); +/* */ +/* 326 */ private static Hashtable employeeHash = null; +/* */ +/* */ public static boolean isEmployeeAccount(String name) { +/* 329 */ if (employeeHash == null) { +/* 330 */ employeeHash = new Hashtable(); +/* 331 */ for (int i = 0; i < employeeAccounts.length; i++) { +/* 332 */ employeeHash.put(employeeAccounts[i], employeeAccounts[i]); +/* */ } +/* */ } +/* */ +/* 336 */ return employeeHash.get(name) != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void makeTag(boolean force) +/* */ { +/* 345 */ this.tagHeight = 195.0F; +/* 346 */ if (this.tag != null) +/* */ { +/* 348 */ this.tagHeight = this.tag.getPosition().z; +/* 349 */ this.tag.detach(); +/* 350 */ this.tag = null; +/* */ } +/* 352 */ if (this.tagbg != null) { +/* 353 */ this.tagbg.detach(); +/* 354 */ this.tagbg = null; +/* */ } +/* */ +/* */ +/* 358 */ if (((this._server == null) && (!force)) || ((this instanceof MutedDrone)) || +/* 359 */ (!showNametags)) { +/* 360 */ return; +/* */ } +/* 362 */ String unfilteredName = getLongID(); +/* */ +/* 364 */ String name = FilthFilter.get().filterName(unfilteredName); +/* 365 */ if ((name == null) || (name.equals(""))) { +/* 366 */ return; +/* */ } +/* 368 */ Texture[] tagText = new Texture[1]; +/* */ +/* */ +/* 371 */ boolean hw = RenderWare.get3DHardwareInUse(); +/* */ +/* 373 */ boolean isHost = (name.toLowerCase().startsWith(Console.message("host"))) || +/* 374 */ (name.toLowerCase().startsWith("host")); +/* 375 */ if (isHost) { +/* 376 */ name = Console.message("host-upper") + name.substring(4); +/* */ } +/* 378 */ boolean isSpecialGuest = +/* 379 */ (name.toLowerCase().startsWith(Console.message("guest-"))) || +/* 380 */ (name.toLowerCase().startsWith("guest-")); +/* 381 */ if (isSpecialGuest) { +/* 382 */ name = Console.message("guest-upper") + name.substring(5); +/* */ } +/* 384 */ boolean isEmployee = isEmployeeAccount(name); +/* */ +/* */ Color bgColor; +/* */ Color bgColor; +/* 388 */ if (isSpecialGuest) { +/* 389 */ bgColor = Color.pink; } else { Color bgColor; +/* 390 */ if (isHost) { +/* 391 */ bgColor = Color.yellow; } else { Color bgColor; +/* 392 */ if (isEmployee) { +/* 393 */ bgColor = Color.cyan; +/* */ } else +/* 395 */ bgColor = Color.lightGray; +/* */ } } +/* 397 */ tagText[0] = new StringTexture(name, Console.message("TagFont"), 48, +/* 398 */ Color.black, hw ? new Color(254, 254, 254) : bgColor); +/* */ +/* */ +/* */ +/* */ +/* 403 */ int height = 14; +/* */ +/* 405 */ int width = name.length() * 10; +/* 406 */ Hologram h = new Hologram(width, height, tagText); +/* 407 */ h.setViewplaneAligned(true); +/* 408 */ h.raise(this.tagHeight); +/* 409 */ h.setScaleDist(300.0F); +/* 410 */ this.tag = h; +/* 411 */ this.tag.setVisible(true); +/* 412 */ this.tag.setBumpable(false); +/* 413 */ this.tag.setLocalShadowed(false); +/* 414 */ this.tag.setShadowedLocally(true); +/* 415 */ add(this.tag); +/* */ +/* 417 */ if (hw) { +/* 418 */ Texture[] bgText = new Texture[1]; +/* 419 */ bgText[0] = new StringTexture(name, Console.message("TagFont"), 48, +/* 420 */ Color.black, +/* */ +/* */ +/* */ +/* */ +/* 425 */ bgColor); +/* 426 */ Hologram h2 = new Hologram(width, height, bgText); +/* 427 */ h2.setViewplaneAligned(true); +/* 428 */ h2.raise(this.tagHeight); +/* */ +/* 430 */ h2.setScaleDist(300.0F); +/* 431 */ h2.setMaterial(new Material(0.75F, 0.0F, 0.0F, Color.white, null, 0.5F, +/* 432 */ false, false)); +/* 433 */ this.tagbg = h2; +/* 434 */ this.tagbg.setVisible(true); +/* 435 */ this.tagbg.setBumpable(false); +/* 436 */ this.tagbg.setLocalShadowed(false); +/* 437 */ this.tagbg.setShadowedLocally(true); +/* 438 */ add(this.tagbg); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void avatarHeightChangedTo(float h) +/* */ { +/* 447 */ if (this.tag != null) { +/* 448 */ this.tag.raise(h + 1.0F + 5.0F - this.tag.getPosition().z); +/* */ } +/* 450 */ if (this.tagbg != null) { +/* 451 */ this.tagbg.raise(h + 1.0F + 5.0F - this.tagbg.getPosition().z); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detachFromServer(boolean reuse) +/* */ { +/* 461 */ assert (Main.isMainThread()); +/* 462 */ if (this._server != null) { +/* 463 */ this._server.delObject(new ObjID(getLongID())); +/* 464 */ this._server.decRefCnt(this); +/* 465 */ this._server = null; +/* */ } +/* */ +/* */ +/* 469 */ if (reuse) { +/* 470 */ this.lastUsed = Std.getFastTime(); +/* 471 */ synchronized (usableDrones) { +/* 472 */ usableDrones.addElement(this); +/* */ } +/* */ } +/* */ } +/* */ +/* 477 */ public static Vector usableDrones = new Vector(); +/* */ +/* */ private int lastUsed; +/* */ +/* */ protected WorldServer _server; +/* */ private String sleepMode; +/* */ +/* */ public static Drone make(ObjID id, WorldServer serv) +/* */ { +/* 486 */ synchronized (usableDrones) { +/* 487 */ if ((usableDrones.isEmpty()) || (id == null) || (serv == null)) +/* */ { +/* 489 */ return new HoloDrone(id, serv); +/* */ } +/* 491 */ String name = "!" + serv.getLongID(id); +/* */ +/* */ +/* */ +/* */ +/* 496 */ for (int i = usableDrones.size() - 1; i > 0; i--) { +/* 497 */ Drone d = (Drone)usableDrones.elementAt(i); +/* 498 */ if (d.getName().equals(name)) { +/* */ break; +/* */ } +/* */ } +/* 502 */ Drone d = (Drone)usableDrones.elementAt(i); +/* */ +/* */ +/* */ +/* 506 */ if ((!d.getName().equals(name)) && (usableDrones.size() < 5)) +/* */ { +/* 508 */ return new HoloDrone(id, serv); +/* */ } +/* 510 */ usableDrones.removeElementAt(i); +/* */ +/* 512 */ d.attachToServer(serv.getLongID(id), serv); +/* 513 */ return d; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent event) +/* */ { +/* 522 */ if ((this._server != null) && ((event.key & 0x1) == '\001')) +/* */ { +/* 524 */ FriendsListPart.droneClick(this, event); +/* */ } +/* */ +/* 527 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float animate(String action) +/* */ { +/* 535 */ if (action.equalsIgnoreCase("_hdb")) { +/* 536 */ getClass();new BounceNametag(); } +/* 537 */ return 0.0F; +/* */ } +/* */ +/* */ class BounceNametag implements MainCallback { +/* */ int start; +/* */ WObject origTag; +/* */ WObject origTagbg; +/* */ +/* */ BounceNametag() { +/* 546 */ if (Drone.this.tag != null) { +/* 547 */ this.start = Std.getFastTime(); +/* 548 */ this.origTag = Drone.this.tag; +/* 549 */ this.origTagbg = Drone.this.tagbg; +/* 550 */ Main.register(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void mainCallback() +/* */ { +/* 557 */ int now = Std.getFastTime(); +/* 558 */ float h = Drone.this.tagHeight; +/* 559 */ if ((now > this.start + 6000) || (this.origTag != Drone.this.tag) || (this.origTagbg != Drone.this.tagbg)) { +/* 560 */ Main.unregister(this); +/* 561 */ } else if (now < this.start + 1500) { +/* 562 */ h = Drone.this.tagHeight + 200.0F * ((now - this.start) / 1500.0F); +/* */ } +/* */ else { +/* 565 */ float t = (now - this.start) / 1500.0F; +/* 566 */ h = (float)(200.0D * Math.pow(1.4140000343322754D, t) * +/* 567 */ Math.cos(t * 3.14159F)); +/* */ } +/* */ +/* 570 */ this.origTag.setZ(h); +/* 571 */ if (this.origTagbg != null) +/* 572 */ this.origTagbg.setZ(h); +/* */ } +/* */ } +/* */ +/* */ public Vector getAnimationList() { +/* 577 */ return new Vector(); +/* */ } +/* */ +/* */ +/* */ public void muteStateChanged() +/* */ { +/* 583 */ setAvatarNow(getCurrentURL()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean shouldBeMuted() +/* */ { +/* 591 */ return MuteListPart.isMuted(this._server, getLongID()); +/* */ } +/* */ +/* */ private World getOwnerWorld() { +/* 595 */ WObject o = (WObject)getOwner(); +/* 596 */ Room room = o == null ? null : o.getRoom(); +/* 597 */ World w = room == null ? null : room.getWorld(); +/* 598 */ return w; +/* */ } +/* */ +/* */ public boolean shouldBeForcedHuman() { +/* 602 */ World w = getOwnerWorld(); +/* 603 */ return (w != null) && (w.getForceHuman()); +/* */ } +/* */ +/* */ public URL getCurrentURL() { +/* 607 */ if ((this instanceof PosableDrone)) { +/* 608 */ return ((PosableDrone)this).getPosableShapeURL(); +/* */ } +/* */ +/* 611 */ return getSourceURL(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Drone setAvatarNow(URL url) +/* */ { +/* 627 */ if (url == null) { +/* 628 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 634 */ if (shouldBeForcedHuman()) { +/* 635 */ url = PosableShape.getHuman(url); +/* 636 */ if (Console.getActive() != null) +/* */ { +/* 638 */ Console.getActive().pendingPilot = url.toString(); +/* */ } +/* */ } +/* */ +/* */ +/* 643 */ url = PosableShape.getPermitted(url, getWorld()); +/* */ +/* 645 */ boolean muted = shouldBeMuted(); +/* */ +/* 647 */ if ((url.equals(getCurrentURL())) && +/* 648 */ (muted == this instanceof MutedDrone)) { +/* 649 */ return this; +/* */ } +/* 651 */ if ((url.endsWith(".rwx")) || (url.endsWith(".rwg")) || +/* 652 */ (url.endsWith(".mov"))) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 667 */ WObject o = (WObject)getOwner(); +/* 668 */ if (o == null) +/* */ { +/* */ +/* */ +/* */ +/* 673 */ return this; +/* */ } +/* */ +/* 676 */ WorldServer serv = this._server; +/* 677 */ String longID = getLongID(); +/* */ +/* */ +/* 680 */ detachFromServer(false); +/* */ +/* 682 */ detach(); +/* */ +/* */ Drone d; +/* */ Drone d; +/* 686 */ if (muted) { +/* 687 */ d = new MutedDrone(new ObjID(longID), serv, url); +/* 688 */ } else if (url.endsWith(".mov")) { +/* 689 */ Drone d = new HoloDrone(new ObjID(longID), serv); +/* 690 */ d.setAvatarNow(url); +/* */ } +/* */ else { +/* 693 */ d = new PosableDrone(new ObjID(longID), serv, url); +/* */ } +/* */ +/* 696 */ if (serv != null) { +/* 697 */ d.transferFrom(this); +/* 698 */ d.addTo(o.getRoom()); +/* */ } else { +/* 700 */ d.makeIdentity().post(this); +/* 701 */ d.setName(getLongID()); +/* 702 */ o.add(d); +/* */ } +/* 704 */ return d; +/* */ } +/* 706 */ String s = url.getInternal(); +/* 707 */ if (s.endsWith(".pilot")) { +/* 708 */ s = s.substring(0, s.length() - 6) + ".drone"; +/* 709 */ } else if (!s.endsWith(".drone")) { +/* 710 */ s = s + ".drone"; +/* */ } +/* 712 */ url = URL.make(s); +/* */ +/* 714 */ if (url.equals(getSourceURL())) { +/* 715 */ return this; +/* */ } +/* 717 */ new WobLoader(url, this); +/* */ +/* 719 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void wobLoaded(WobLoader loader, SuperRoot w) +/* */ { +/* 728 */ if (!(w instanceof Drone)) +/* 729 */ return; +/* 730 */ assert (w != null); +/* */ +/* 732 */ Drone d = (Drone)w; +/* 733 */ d.setName(getLongID()); +/* */ +/* */ +/* */ +/* 737 */ if (this._server == null) { +/* 738 */ WObject o = (WObject)getOwner(); +/* 739 */ detach(); +/* 740 */ d.makeIdentity().post(this); +/* 741 */ o.add(d); +/* 742 */ return; +/* */ } +/* */ +/* 745 */ WorldServer serv = this._server; +/* 746 */ String longID = getLongID(); +/* 747 */ detachFromServer(false); +/* */ +/* */ +/* 750 */ Room r = getRoom(); +/* 751 */ detach(); +/* */ +/* */ +/* 754 */ d.addTo(r); +/* */ +/* 756 */ d.attachToServer(longID, serv); +/* */ +/* 758 */ d.transferFrom(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addTo(Room r) +/* */ { +/* 767 */ if (r == null) { +/* 768 */ return; +/* */ } +/* 770 */ Console c = r.getWorld().getConsole(); +/* */ +/* 772 */ if (this.console == null) { +/* 773 */ this.console = c; +/* 774 */ if (c != null) { +/* 775 */ Pilot.copySoul(c.getDroneSoulTemplate(), this); +/* */ } +/* */ } +/* 778 */ r.add(this); +/* */ } +/* */ +/* */ +/* */ public void add(WObject w) +/* */ { +/* 784 */ super.add(w); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteUnadding(SuperRoot child) +/* */ { +/* 793 */ if ((child instanceof WObject)) { +/* 794 */ WObject w = (WObject)child; +/* */ +/* 796 */ if (w.isDynamic()) { +/* 797 */ w.setVisible(true); +/* */ } +/* */ } +/* 800 */ super.noteUnadding(child); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setSleepMode(String mode) +/* */ { +/* 808 */ if (mode.equals(this.sleepMode)) { +/* 809 */ return; +/* */ } +/* 811 */ this.sleepMode = mode; +/* 812 */ Main.register(new MakeSleepBox()); +/* */ } +/* */ +/* */ private void handleVAR_ASLEEP(String s) +/* */ { +/* 817 */ if ((s != null) && (s.length() > 2) && (s.charAt(0) == 0)) { +/* 818 */ s = s.substring(2); +/* */ } +/* 820 */ setSleepMode(s); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Drone handleVAR_BITMAP(String s) +/* */ { +/* 828 */ if (s.equals("")) { +/* 829 */ return this; +/* */ } +/* 831 */ BlackBox.getInstance().submitEvent( +/* 832 */ new BBDroneBitmapCommand(getName(), s)); +/* */ +/* */ +/* 835 */ if (s.charAt(0) == 0) { +/* 836 */ s = s.substring(2); +/* */ } +/* */ try { +/* 839 */ return setAvatarNow(new URL(URL.getAvatar(), s)); +/* */ } catch (MalformedURLException e) { +/* 841 */ Console.println(Console.message("Invalid-av") + s); } +/* 842 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp getVelocity() +/* */ { +/* 852 */ return Point3Temp.make(this._vel_x, this._vel_y, this._vel_z); +/* */ } +/* */ +/* */ public int getYawRate() { +/* 856 */ return this._vel_yaw; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent fe) { +/* 860 */ if (this._server == null) { +/* 861 */ return true; +/* */ } +/* */ +/* 864 */ int timeNow = fe.time; +/* */ +/* 866 */ interpolate(timeNow, this._server.getUpdateTime(), this); +/* */ +/* 868 */ return true; +/* */ } +/* */ +/* */ public void interpolate(int timeNow, int updateTime, Transform target) { +/* 872 */ if (!this.inited) { +/* 873 */ return; +/* */ } +/* 875 */ if (timeNow - this._last_PosTime > updateTime) +/* */ { +/* */ +/* 878 */ this._last_PosTime = timeNow; +/* 879 */ this._vel_x = (this._last_x - this._x); +/* 880 */ this._vel_y = (this._last_y - this._y); +/* 881 */ this._vel_z = (this._last_z - this._z); +/* 882 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* */ +/* 884 */ assert (this._vel_yaw >= 0); +/* 885 */ if (this._vel_yaw > 180) { +/* 886 */ this._vel_yaw -= 360; +/* */ } +/* */ } +/* */ +/* 890 */ double timeDiff = (timeNow - this._last_FrameTime) / +/* 891 */ updateTime; +/* 892 */ if (timeNow - this._last_FrameTime > updateTime) { +/* 893 */ timeDiff = 0.0D; +/* */ } +/* 895 */ this._x += (int)(timeDiff * this._vel_x); +/* 896 */ this._y += (int)(timeDiff * this._vel_y); +/* 897 */ this._z += (int)(timeDiff * this._vel_z); +/* 898 */ this._yaw += (int)(timeDiff * this._vel_yaw) % 360; +/* */ +/* 900 */ target.makeIdentity().moveBy(this._x, this._y, this._z).yaw(this._yaw); +/* */ +/* 902 */ this._last_FrameTime = timeNow; +/* */ } +/* */ +/* */ public void reset(short x, short y, short z, short yaw) { +/* 906 */ this._x = x; +/* 907 */ this._y = y; +/* 908 */ this._z = z; +/* 909 */ this._yaw = yaw; +/* */ +/* 911 */ this._vel_x = (this._vel_y = this._vel_z = 0); +/* 912 */ this._vel_yaw = 0; +/* 913 */ this._last_x = this._x; +/* 914 */ this._last_y = this._y; +/* 915 */ this._last_z = this._z; +/* 916 */ this._last_yaw = this._yaw; +/* */ +/* 918 */ this._last_PosTime = (this._last_FrameTime = Std.getRealTime()); +/* */ +/* 920 */ this.inited = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void transferFrom(Drone i) +/* */ { +/* 930 */ makeIdentity().post(i); +/* */ +/* 932 */ this._x = i._x; +/* 933 */ this._y = i._y; +/* 934 */ this._z = i._z; +/* 935 */ this._yaw = i._yaw; +/* 936 */ this._vel_x = i._vel_x; +/* 937 */ this._vel_y = i._vel_y; +/* 938 */ this._vel_z = i._vel_z; +/* 939 */ this._vel_yaw = i._vel_yaw; +/* 940 */ this._last_x = i._last_x; +/* 941 */ this._last_y = i._last_y; +/* 942 */ this._last_z = i._last_z; +/* 943 */ this._last_yaw = i._last_yaw; +/* 944 */ this._last_PosTime = i._last_PosTime; +/* 945 */ this._last_FrameTime = i._last_FrameTime; +/* 946 */ this.inited = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void appear(Room rm, short x, short y, short z, short yaw) +/* */ { +/* 961 */ assert (rm != null); +/* */ +/* 963 */ BlackBox.getInstance() +/* 964 */ .submitEvent( +/* 965 */ new BBAppearDroneCommand(rm.toString(), getName(), x, +/* 966 */ y, z, yaw)); +/* */ +/* 968 */ if (getRoom() != rm) { +/* 969 */ detach(); +/* 970 */ rm.add(this); +/* */ } +/* */ +/* 973 */ makeIdentity().moveBy(x, y, z).yaw(yaw); +/* */ +/* */ +/* 976 */ this._x = x; +/* 977 */ this._y = y; +/* 978 */ this._z = z; +/* 979 */ this._yaw = yaw; +/* 980 */ this._vel_x = (this._vel_y = this._vel_z = 0); +/* 981 */ this._vel_yaw = 0; +/* 982 */ this._last_x = x; +/* 983 */ this._last_y = y; +/* 984 */ this._last_z = z; +/* 985 */ this._last_yaw = yaw; +/* */ +/* 987 */ this._last_PosTime = (this._last_FrameTime = Std.getRealTime()); +/* */ +/* 989 */ URL u = getCurrentURL(); +/* 990 */ if (u != null) { +/* 991 */ setAvatarNow(u); +/* */ } +/* */ +/* 994 */ this.inited = true; +/* */ } +/* */ +/* */ public void disappear() { +/* 998 */ BlackBox.getInstance().submitEvent( +/* 999 */ new BBDisappearDroneCommand(getName())); +/* 1000 */ detachFromServer(true); +/* 1001 */ detach(); +/* */ } +/* */ +/* */ public void longLoc(short x, short y, short z, short yaw) { +/* 1005 */ if (!(getOwner() instanceof Pilot)) { +/* 1006 */ BlackBox.getInstance().submitEvent( +/* 1007 */ new BBMoveDroneCommand(getName(), x, y, z, yaw)); +/* */ } +/* */ +/* 1010 */ this._last_x = x; +/* 1011 */ this._last_y = y; +/* 1012 */ this._last_z = z; +/* 1013 */ this._last_yaw = yaw; +/* 1014 */ this._vel_x = (this._last_x - this._x); +/* 1015 */ this._vel_y = (this._last_y - this._y); +/* 1016 */ this._vel_z = (this._last_z - this._z); +/* 1017 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* */ +/* 1019 */ assert (this._vel_yaw >= 0); +/* 1020 */ if (this._vel_yaw > 180) { +/* 1021 */ this._vel_yaw -= 360; +/* */ } +/* */ +/* 1024 */ this._last_PosTime = Std.getRealTime(); +/* 1025 */ this.inited = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void property(OldPropertyList propList) +/* */ { +/* 1034 */ int end = propList.size(); +/* 1035 */ for (int i = 0; i < end; i++) { +/* 1036 */ netProperty tmpProp = propList.elementAt(i); +/* 1037 */ switch (tmpProp.property()) { +/* */ case 5: +/* 1039 */ handleVAR_BITMAP(tmpProp.value()); +/* 1040 */ break; +/* */ +/* */ case 23: +/* 1043 */ handleVAR_ASLEEP(tmpProp.value()); +/* 1044 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ default: +/* 1050 */ byte[] data = tmpProp.value().getBytes(); +/* 1051 */ getSharer().setFromNetData(tmpProp.property(), data); +/* */ } +/* */ +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void propertyUpdate(PropertyList propList) +/* */ { +/* 1064 */ int end = propList.size(); +/* 1065 */ for (int i = 0; i < end; i++) { +/* 1066 */ net2Property tmpProp = propList.elementAt(i); +/* */ +/* 1068 */ switch (tmpProp.property()) { +/* */ case 5: +/* 1070 */ handleVAR_BITMAP(tmpProp.value()); +/* 1071 */ break; +/* */ +/* */ case 23: +/* 1074 */ handleVAR_ASLEEP(tmpProp.value()); +/* 1075 */ break; +/* */ +/* */ default: +/* 1078 */ getSharer().setFromNetData(tmpProp.property(), tmpProp.data()); +/* */ } +/* */ +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void roomChange(Room newRoom, short x, short y, short z, short yaw) +/* */ { +/* 1088 */ detach(); +/* 1089 */ if (newRoom != null) { +/* 1090 */ appear(newRoom, x, y, z, yaw); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void shortLoc(byte dx, byte dy, byte dyaw) +/* */ { +/* 1098 */ if (!(getOwner() instanceof Pilot)) { +/* 1099 */ BlackBox.getInstance().submitEvent( +/* 1100 */ new BBDroneDeltaPosCommand(getName(), dx, dy, dyaw)); +/* */ } +/* */ +/* 1103 */ this._last_x += dx; +/* 1104 */ this._last_y += dy; +/* */ +/* 1106 */ this._last_yaw += dyaw; +/* 1107 */ this._last_yaw %= 360; +/* */ +/* 1109 */ this._vel_x = (this._last_x - this._x); +/* 1110 */ this._vel_y = (this._last_y - this._y); +/* */ +/* 1112 */ this._vel_z = 0; +/* 1113 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* */ +/* 1115 */ assert (this._vel_yaw >= 0); +/* 1116 */ if (this._vel_yaw > 180) { +/* 1117 */ this._vel_yaw -= 360; +/* */ } +/* */ +/* 1120 */ this._last_PosTime = Std.getRealTime(); +/* */ } +/* */ +/* */ public void teleport(WorldServer serv, byte exitType, byte entryType, Room newRoom, short x, short y, short z, short yaw) +/* */ { +/* 1125 */ assert (serv.getObject(new ObjID(getLongID())) == this); +/* 1126 */ Room curRoom = getRoom(); +/* 1127 */ switch (exitType) +/* */ { +/* */ case 0: +/* */ break; +/* */ default: +/* 1132 */ if (curRoom != null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1142 */ assert (curRoom != null); +/* 1143 */ detach(); +/* */ } +/* */ break; +/* */ } +/* */ +/* 1148 */ switch (entryType) { +/* */ case 0: +/* 1150 */ detachFromServer(true); +/* 1151 */ detach(); +/* 1152 */ break; +/* */ default: +/* 1154 */ if (newRoom == null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1163 */ detach(); +/* */ } else { +/* 1165 */ assert (newRoom != null); +/* 1166 */ appear(newRoom, x, y, z, yaw); +/* */ } +/* */ break; +/* */ } +/* */ +/* */ } +/* */ +/* */ public WorldServer getServer() +/* */ { +/* 1175 */ return this._server; +/* */ } +/* */ +/* */ public String getLongID() { +/* 1179 */ String name = getName(); +/* 1180 */ if (name.startsWith("!")) { +/* 1181 */ name = name.substring(1); +/* */ } +/* 1183 */ return name; +/* */ } +/* */ +/* */ public void register() +/* */ { +/* 1188 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void galaxyDisconnected() +/* */ { +/* 1193 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void reacquireServer(WorldServer oldServ) +/* */ { +/* 1198 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void changeChannel(Galaxy g, String oldChannel, String newChannel) +/* */ { +/* 1203 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 1221 */ Object ret = null; +/* 1222 */ (index - offset); +/* */ +/* 1224 */ ret = super.properties(index, offset + 0, mode, value); +/* */ +/* 1226 */ return ret; +/* */ } +/* */ +/* 1229 */ private static Object classCookie = new Object(); +/* 1230 */ private static Object classCookieInterpolatedDrone = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 1234 */ if (this.console != null) { +/* 1235 */ System.out.println("Warning: saving drone " + getName() + +/* 1236 */ " WITH soul, which won't restore correctly!"); +/* */ } +/* */ +/* 1239 */ s.saveVersion(0, classCookieInterpolatedDrone); +/* 1240 */ s.saveVersion(0, classCookie); +/* 1241 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreStateDrone(Restorer r) throws IOException, TooNewException +/* */ { +/* 1246 */ r.restoreVersion(classCookieInterpolatedDrone); +/* 1247 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 1249 */ super.restoreState(r); +/* 1250 */ break; +/* */ +/* */ default: +/* 1253 */ throw new TooNewException(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 1259 */ Enumeration e = getContents(); +/* 1260 */ while (e.hasMoreElements()) { +/* 1261 */ WObject w = (WObject)e.nextElement(); +/* 1262 */ if ((w instanceof Hologram)) { +/* 1263 */ Hologram h = (Hologram)w; +/* 1264 */ if (h.getMovieName() == null) { +/* 1265 */ this.tag = h; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 1273 */ restoreStateDrone(r); +/* */ } +/* */ +/* */ public Drone() {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Drone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DroneAnimator.java b/NET/worlds/scape/DroneAnimator.java new file mode 100644 index 0000000..ffa1e16 --- /dev/null +++ b/NET/worlds/scape/DroneAnimator.java @@ -0,0 +1,175 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Gamma; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.ProgressBar; +/* */ import NET.worlds.core.Std; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DroneAnimator +/* */ implements MainCallback +/* */ { +/* */ public static final int INVALID_INDEX = -1; +/* */ private static Vector deltypeList; +/* */ +/* */ static +/* */ { +/* 30 */ init("."); +/* 31 */ if (Gamma.loadProgress != null) { +/* 32 */ Gamma.loadProgress.setMessage("Loading avatar definitions..."); +/* 33 */ Gamma.loadProgress.advance(); +/* */ } +/* */ +/* */ +/* 37 */ loadconfig(PendingCacheDrone.getAvatarDatPath()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static native void init(String paramString); +/* */ +/* */ +/* */ +/* */ +/* */ public static native void loadconfig(String paramString); +/* */ +/* */ +/* */ +/* */ public static native int getnameindex(String paramString); +/* */ +/* */ +/* */ +/* */ public static native String getindexgeom(int paramInt); +/* */ +/* */ +/* */ +/* */ public static native void prepFigure(WObject paramWObject, boolean paramBoolean); +/* */ +/* */ +/* */ +/* */ public static native void addtype(int paramInt); +/* */ +/* */ +/* */ +/* */ public static native void deltype(int paramInt); +/* */ +/* */ +/* */ +/* */ public void delayedDeltype(int type) +/* */ { +/* 74 */ if (deltypeList == null) { +/* 75 */ deltypeList = new Vector(); +/* 76 */ Main.register(this); +/* */ } +/* */ +/* 79 */ deltypeList.addElement(new Integer(type)); +/* 80 */ deltypeList.addElement(new Integer(Std.getFastTime())); +/* */ } +/* */ +/* */ public void mainCallback() +/* */ { +/* 85 */ int eraseTime = Std.getFastTime() - 20000; +/* 86 */ while (deltypeList.size() > 1) { +/* 87 */ int nextTime = ((Integer)deltypeList.elementAt(1)).intValue(); +/* 88 */ if (nextTime > eraseTime) +/* */ break; +/* 90 */ int type = ((Integer)deltypeList.elementAt(0)).intValue(); +/* 91 */ deltype(type); +/* 92 */ deltypeList.removeElementAt(0); +/* 93 */ deltypeList.removeElementAt(0); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public DroneAnimator() +/* */ { +/* 102 */ this._rep = CreateRep(); +/* */ } +/* */ +/* */ public void finalize() throws Throwable { +/* 106 */ DestroyRep(this._rep); +/* 107 */ super.finalize(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 150 */ protected int _rep = 0; +/* */ +/* */ public native void endanimations(); +/* */ +/* */ public native void moveto(int paramInt1, short paramShort1, short paramShort2, short paramShort3, short paramShort4, int paramInt2); +/* */ +/* */ public native void moveby(int paramInt1, short paramShort1, short paramShort2, short paramShort3, int paramInt2); +/* */ +/* */ public native void update(WObject paramWObject1, WObject paramWObject2, int paramInt, float paramFloat, boolean paramBoolean); +/* */ +/* */ public native float animate(int paramInt1, String paramString, int paramInt2); +/* */ +/* */ public native float getAnimationTime(int paramInt, String paramString); +/* */ +/* */ public static synchronized native Vector getActionList(int paramInt); +/* */ +/* */ protected static native int CreateRep(); +/* */ +/* */ protected static native void DestroyRep(int paramInt); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DroneAnimator.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DroneLoader.java b/NET/worlds/scape/DroneLoader.java new file mode 100644 index 0000000..53a8b15 --- /dev/null +++ b/NET/worlds/scape/DroneLoader.java @@ -0,0 +1,155 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class DroneLoader +/* */ { +/* */ static final boolean debug = false; +/* */ +/* */ public synchronized void load(Vector droneList) +/* */ { +/* */ try +/* */ { +/* 59 */ if (droneList.size() > 0) +/* */ { +/* */ +/* 62 */ Vector listCopy = (Vector)droneList.clone(); +/* 63 */ Enumeration enums = listCopy.elements(); +/* */ +/* 65 */ while (enums.hasMoreElements()) +/* */ { +/* 67 */ PendingDrone pd = (PendingDrone)enums.nextElement(); +/* 68 */ if (pd.getDrone().discarded) +/* */ { +/* */ +/* */ +/* 72 */ droneList.removeElement(pd); +/* */ } +/* */ else +/* */ { +/* 76 */ loadDrone(pd); +/* 77 */ droneList.removeElement(pd); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 85 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ +/* */ public synchronized void wakeUp() +/* */ { +/* 92 */ notify(); +/* */ } +/* */ +/* */ private static void loadDrone(PendingDrone pd) +/* */ { +/* 97 */ if (!pd.getLoaded()) +/* */ { +/* */ +/* */ +/* 101 */ Enumeration e = PosableShape.getComponentAvatars( +/* 102 */ pd.getUrl()); +/* 103 */ if (e != null) +/* */ { +/* 105 */ while (e.hasMoreElements()) +/* */ { +/* 107 */ String avURL = (String)e.nextElement(); +/* */ +/* 109 */ pd.download(URL.make(avURL)); +/* */ } +/* */ } +/* */ PosableShape ps; +/* */ PosableShape ps; +/* 114 */ if (VehicleShape.isVehicle(pd.getUrl())) { +/* 115 */ ps = new VehicleShape(); +/* */ } else { +/* 117 */ ps = new PosableShape(); +/* */ } +/* 119 */ boolean prog = ProgressiveAdder.get().enabled(); +/* */ +/* 121 */ if (prog) +/* */ { +/* 123 */ ProgressiveAdder.get().scheduleForAdd(pd.getDrone(), +/* 124 */ ps); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 132 */ ps.setURL(pd.getUrl()); +/* */ +/* 134 */ ps.setVisible(true); +/* 135 */ ps.setBumpable(false); +/* 136 */ if (!pd.getDrone().isPilotDrone(pd.getUrl())) { +/* 137 */ ps.enableLOD(true); +/* */ } +/* */ +/* 140 */ if (!prog) +/* */ { +/* 142 */ pd.getDrone().SetPendingShape(ps); +/* */ } +/* */ +/* */ +/* 146 */ pd.setLoaded(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DroneLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DropInfo.java b/NET/worlds/scape/DropInfo.java new file mode 100644 index 0000000..1010b55 --- /dev/null +++ b/NET/worlds/scape/DropInfo.java @@ -0,0 +1,724 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Component; +/* */ import java.awt.Point; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class DropInfo +/* */ { +/* */ public URL url; +/* */ public String propertyName; +/* */ public Component comp; +/* */ public Point location; +/* */ +/* */ DropInfo(URL url, String propertyName, Component comp, Point location) +/* */ { +/* 713 */ this.url = url; +/* 714 */ this.propertyName = propertyName; +/* 715 */ this.comp = comp; +/* 716 */ this.location = location; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DropInfo.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/DynamicForwardAttribute.java b/NET/worlds/scape/DynamicForwardAttribute.java new file mode 100644 index 0000000..ecbefc9 --- /dev/null +++ b/NET/worlds/scape/DynamicForwardAttribute.java @@ -0,0 +1,308 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class DynamicForwardAttribute +/* */ extends Attribute +/* */ implements NonPersister, WobLoaded +/* */ { +/* 43 */ WObject wob = null; +/* */ +/* */ DynamicForwardAttribute(int attrID) +/* */ { +/* 47 */ super(attrID); +/* */ } +/* */ +/* 50 */ static int DYNAMIC_CODE = 21990; +/* */ +/* */ WobLoader wobLoader; +/* */ DataInputStream wobLoaderProps; +/* */ +/* */ private URL getDynamicHeader(DataInputStream ds) +/* */ { +/* */ try +/* */ { +/* 59 */ if (ds.readUnsignedShort() != DYNAMIC_CODE) { +/* 60 */ return null; +/* */ } +/* 62 */ return new URL(this, ds.readUTF()); +/* */ } +/* */ catch (IOException e) {} +/* 65 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) +/* */ throws IOException +/* */ { +/* 84 */ URL wobName = getDynamicHeader(ds); +/* 85 */ if ((wobName == null) || (this.wob == null) || +/* 86 */ (!wobName.equals(this.wob.getSourceURL()))) +/* */ { +/* */ +/* 89 */ if (this.wob != null) +/* */ { +/* */ +/* */ +/* 93 */ WObject w = this.wob; +/* 94 */ this.wob = null; +/* 95 */ w.detach(); +/* */ } +/* */ +/* */ +/* 99 */ if (wobName == null) +/* */ { +/* 101 */ ((Sharer)getOwner()).removeAttribute(this); +/* 102 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 107 */ if ((this.wobLoader == null) || (!this.wobLoader.getWobName().equals(wobName))) { +/* 108 */ this.wobLoader = new WobLoader(wobName, this); +/* */ } +/* */ +/* 111 */ this.wobLoaderProps = ds; +/* */ } +/* */ else +/* */ { +/* 115 */ setProps(ds); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void wobLoaded(WobLoader loader, SuperRoot w) +/* */ { +/* 124 */ if (loader != this.wobLoader) { +/* 125 */ return; +/* */ } +/* 127 */ Object[] arguments = { new String( +/* 128 */ loader.getWobName().toString()) }; +/* */ +/* 130 */ if (w == null) +/* */ { +/* */ +/* */ +/* 134 */ Console.println(MessageFormat.format( +/* 135 */ Console.message("Couldnt-load"), arguments)); +/* 136 */ this.wobLoaderProps = null; +/* 137 */ return; } +/* 138 */ if (!(w instanceof WObject)) { +/* 139 */ Console.println(MessageFormat.format( +/* 140 */ Console.message("not-WObject"), arguments)); +/* 141 */ this.wobLoaderProps = null; +/* 142 */ return; +/* */ } +/* */ +/* 145 */ this.wob = ((WObject)w); +/* */ +/* */ +/* 148 */ this.wob.getSharer().createDynamicForwardedFromNet(this); +/* */ +/* */ +/* 151 */ ((WObject)getOwner().getOwner()).add(this.wob); +/* */ +/* */ +/* 154 */ setProps(this.wobLoaderProps); +/* 155 */ this.wobLoaderProps = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void connect(WObject w) +/* */ { +/* 164 */ assert (this.wob == null); +/* 165 */ this.wob = w; +/* */ +/* 167 */ noteChange(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void unconnect() +/* */ { +/* 177 */ if (this.wob != null) +/* */ { +/* 179 */ this.wob = null; +/* 180 */ noteChange(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setProps(DataInputStream ds) +/* */ { +/* */ for (;;) +/* */ { +/* */ try +/* */ { +/* */ int id; +/* */ +/* */ +/* */ +/* */ +/* 200 */ if ((id = ds.read()) == -1) { +/* 201 */ return; +/* */ } +/* 203 */ int len = ds.readByte(); +/* 204 */ byte[] b = new byte[len]; +/* 205 */ ds.readFully(b, 0, len); } catch (IOException e) { break; } +/* */ int len; +/* */ byte[] b; +/* */ int id; +/* 209 */ this.wob.getSharer().setFromNetData(id, b); +/* */ } +/* */ +/* 212 */ Object[] arguments = { new String(getAttrID()) }; +/* 213 */ Console.println(MessageFormat.format( +/* 214 */ Console.message("Early-EOF"), arguments)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 221 */ private ByteArrayOutputStream _bs = new ByteArrayOutputStream(); +/* */ +/* */ +/* */ +/* */ +/* */ public void generateNetData(DataOutputStream s) +/* */ throws IOException +/* */ { +/* 229 */ if ((this.wob == null) || (this.wob.getSourceURL() == null)) { +/* 230 */ return; +/* */ } +/* 232 */ s.writeShort(DYNAMIC_CODE); +/* */ +/* 234 */ s.writeUTF(this.wob.getSourceURL().getRelativeTo(this)); +/* */ +/* */ +/* 237 */ Enumeration e = this.wob.getSharer().getAttributes(); +/* 238 */ while (e.hasMoreElements()) +/* */ { +/* */ +/* 241 */ Attribute a = (Attribute)e.nextElement(); +/* 242 */ s.writeByte(a.getAttrID()); +/* */ +/* 244 */ this._bs.reset(); +/* */ try { +/* 246 */ a.generateNetData(new DataOutputStream(this._bs)); +/* */ } +/* */ catch (IOException ex) +/* */ { +/* 250 */ System.err.println(ex); +/* 251 */ throw new Error("Fatal in generateNetData"); +/* */ } +/* */ +/* 254 */ s.writeByte(this._bs.size()); +/* 255 */ this._bs.writeTo(s); +/* */ } +/* */ } +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 262 */ WObject w = (WObject)owner.getOwner(); +/* 263 */ if ((w.getSharer().getMode() & 0x1) != 0) { +/* 264 */ throw new ClassCastException( +/* 265 */ "Must forward to unforwarded object"); +/* */ } +/* */ } +/* */ +/* */ public void detach() { +/* 270 */ if ((this.wob == null) && (!this._waitingForFeedback)) +/* */ { +/* 272 */ this.wobLoader = null; +/* 273 */ super.detach(); +/* */ } +/* */ else +/* */ { +/* 277 */ Console.println(Console.message("Shutting-down")); +/* 278 */ if (this.wob != null) { +/* 279 */ this.wob.detach(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void setAttrID(int newID) { +/* 285 */ Console.println(Console.message("Cant-change-ID")); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 290 */ if (this.wob == null) { +/* 291 */ return super.toString(); +/* */ } +/* 293 */ return +/* 294 */ super.toString() + "[forwarding wob " + this.wob.getName() + "]"; +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 300 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DynamicForwardAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EditMusicDialog.java b/NET/worlds/scape/EditMusicDialog.java new file mode 100644 index 0000000..b920897 --- /dev/null +++ b/NET/worlds/scape/EditMusicDialog.java @@ -0,0 +1,792 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.FileSysDialog; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.awt.Button; +/* */ import java.awt.Checkbox; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Panel; +/* */ import java.awt.TextField; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class EditMusicDialog +/* */ extends PolledDialog +/* */ implements DialogReceiver +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 646 */ private TextField nameField = new TextField(20); +/* 647 */ private TextField trackField = new TextField(3); +/* 648 */ private TextField midiField = new TextField(30); +/* 649 */ private Button browseButton = new Button(Console.message("Browse")); +/* 650 */ private Checkbox loopBox = new Checkbox(Console.message("Loop-cont")); +/* 651 */ private Button okButton = new Button(Console.message("OK")); +/* 652 */ private Button cancelButton = new Button(Console.message("Cancel")); +/* */ +/* */ private MusicTrack music; +/* */ private String oldName; +/* */ private String path; +/* 657 */ private static Font font = new Font(Console.message("MenuFont"), +/* 658 */ 0, 12); +/* 659 */ private static Font bfont = new Font(Console.message("ButtonFont"), +/* 660 */ 0, 12); +/* */ +/* */ public EditMusicDialog(MusicManagerDialog parent, MusicTrack music) +/* */ { +/* 664 */ super(parent, parent, music == null ? Console.message("Add-Music") : Console.message("Edit-Music"), true); +/* */ +/* 666 */ this.music = music; +/* 667 */ if (music != null) +/* 668 */ this.oldName = music.getName(); +/* 669 */ this.path = parent.getManager().getFileName().toLowerCase() +/* 670 */ .replace('/', '\\'); +/* 671 */ this.path = this.path.substring(0, this.path.lastIndexOf('\\') + 1); +/* 672 */ ready(); +/* */ } +/* */ +/* */ protected void build() { +/* 676 */ GridBagLayout gbag = new GridBagLayout(); +/* 677 */ setLayout(gbag); +/* 678 */ GridBagConstraints c = new GridBagConstraints(); +/* 679 */ c.fill = 0; +/* 680 */ c.anchor = 13; +/* 681 */ add(gbag, new Label(Console.message("Name"), 2), c); +/* 682 */ c.gridwidth = 0; +/* 683 */ c.anchor = 17; +/* */ +/* 685 */ this.nameField.setFont(font); +/* 686 */ this.trackField.setFont(font); +/* 687 */ this.midiField.setFont(font); +/* 688 */ this.browseButton.setFont(bfont); +/* 689 */ this.loopBox.setFont(font); +/* */ +/* 691 */ add(gbag, this.nameField, c); +/* 692 */ c.gridwidth = 1; +/* 693 */ c.anchor = 13; +/* 694 */ Label vt = new Label(Console.message("Virtual-track"), 2); +/* 695 */ vt.setFont(font); +/* 696 */ add(gbag, vt, c); +/* 697 */ c.gridwidth = 0; +/* 698 */ c.anchor = 17; +/* 699 */ add(gbag, this.trackField, c); +/* 700 */ c.gridwidth = 1; +/* 701 */ c.anchor = 13; +/* 702 */ Label am = new Label(Console.message("Alternate-MIDI"), 2); +/* 703 */ am.setFont(font); +/* 704 */ add(gbag, am, c); +/* 705 */ c.fill = 2; +/* 706 */ c.weightx = 1.0D; +/* 707 */ c.anchor = 17; +/* 708 */ add(gbag, this.midiField, c); +/* 709 */ c.fill = 0; +/* 710 */ c.weightx = 0.0D; +/* 711 */ c.gridwidth = 0; +/* 712 */ add(gbag, this.browseButton, c); +/* 713 */ add(gbag, this.loopBox, c); +/* 714 */ c.fill = 0; +/* 715 */ c.anchor = 10; +/* 716 */ Panel p = new Panel(); +/* 717 */ this.okButton.setFont(bfont); +/* 718 */ this.cancelButton.setFont(bfont); +/* 719 */ p.add(this.okButton); +/* 720 */ p.add(this.cancelButton); +/* 721 */ add(gbag, p, c); +/* 722 */ if (this.music != null) { +/* 723 */ this.nameField.setText(this.music.getName()); +/* 724 */ this.trackField.setText(this.music.getVirtTrackNumber()); +/* 725 */ this.midiField.setText(this.music.getMIDIFileName()); +/* 726 */ this.loopBox.setState(this.music.getLooping()); +/* */ } +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) { +/* 732 */ Object target = event.target; +/* 733 */ if ((target == this.okButton) && (this.nameField.getText().trim().length() != 0)) +/* 734 */ return done(true); +/* 735 */ if (target == this.cancelButton) +/* 736 */ return done(false); +/* 737 */ if (target == this.browseButton) { +/* 738 */ dialogDisable(true); +/* 739 */ new FileSysDialog(Console.getFrame(), this, +/* 740 */ Console.message("Browse-MIDI"), 0, +/* 741 */ "MIDI Files|*.mid;*.midi|All Files|*.*", this.path + +/* 742 */ this.midiField.getText(), false); +/* */ } +/* */ +/* 745 */ return false; +/* */ } +/* */ +/* */ public synchronized void dialogDone(Object who, boolean confirmed) { +/* 749 */ dialogDisable(false); +/* 750 */ if ((confirmed) && ((who instanceof FileSysDialog))) { +/* 751 */ String name = ((FileSysDialog)who).fileName().toLowerCase(); +/* 752 */ if (name.startsWith(this.path)) +/* 753 */ this.midiField.setText(name.substring(this.path.length())); +/* */ } +/* */ } +/* */ +/* */ public boolean isEditor() { +/* 758 */ return this.music != null; +/* */ } +/* */ +/* */ public MusicTrack getMusicTrack() { +/* 762 */ String name = this.nameField.getText().trim(); +/* 763 */ int track = 0; +/* */ try { +/* 765 */ track = Integer.parseInt(this.trackField.getText()); +/* */ } +/* */ catch (NumberFormatException localNumberFormatException) {} +/* 768 */ String midi = this.midiField.getText().trim(); +/* 769 */ boolean loop = this.loopBox.getState(); +/* */ +/* 771 */ if (this.music == null) { +/* 772 */ return new MusicTrack(name, track, midi, loop); +/* */ } +/* 774 */ this.music.setName(name); +/* 775 */ if (track != -1) +/* 776 */ this.music.setVirtTrackNumber(track); +/* 777 */ this.music.setMIDIFileName(midi); +/* 778 */ this.music.setLooping(loop); +/* 779 */ return this.music; +/* */ } +/* */ +/* */ public String getOldName() +/* */ { +/* 784 */ return this.oldName; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EditMusicDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EditRoomDialog.java b/NET/worlds/scape/EditRoomDialog.java new file mode 100644 index 0000000..274ec8c --- /dev/null +++ b/NET/worlds/scape/EditRoomDialog.java @@ -0,0 +1,903 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.Sort; +/* */ import java.awt.Button; +/* */ import java.awt.Choice; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Panel; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class EditRoomDialog +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 793 */ private Choice roomChoice = new Choice(); +/* 794 */ private Choice musicChoice = new Choice(); +/* 795 */ private Button okButton = new Button(Console.message("OK")); +/* 796 */ private Button cancelButton = new Button(Console.message("Cancel")); +/* */ +/* */ private MusicManagerDialog parent; +/* */ private MusicRoom room; +/* */ private String startSelect; +/* */ private static String lastMusic; +/* 802 */ private static Font font = new Font(Console.message("MenuFont"), +/* 803 */ 0, 12); +/* 804 */ private static Font bfont = new Font(Console.message("ButtonFont"), +/* 805 */ 0, 12); +/* */ +/* */ public EditRoomDialog(MusicManagerDialog parent, MusicRoom room, String startSelect) +/* */ { +/* 809 */ super(parent, parent, Console.message("Assign-Music"), true); +/* 810 */ this.parent = parent; +/* 811 */ this.room = room; +/* 812 */ this.startSelect = startSelect; +/* 813 */ ready(); +/* */ } +/* */ +/* */ protected void build() { +/* 817 */ GridBagLayout gbag = new GridBagLayout(); +/* 818 */ setLayout(gbag); +/* 819 */ GridBagConstraints c = new GridBagConstraints(); +/* 820 */ c.fill = 0; +/* 821 */ c.anchor = 13; +/* 822 */ Label lName = new Label(Console.message("Room-name"), 2); +/* 823 */ lName.setFont(font); +/* 824 */ add(gbag, lName, c); +/* 825 */ c.gridwidth = 0; +/* 826 */ c.anchor = 17; +/* 827 */ this.roomChoice.setFont(font); +/* 828 */ add(gbag, this.roomChoice, c); +/* 829 */ c.gridwidth = 1; +/* 830 */ c.anchor = 13; +/* 831 */ Label lMusic = new Label(Console.message("Music"), 2); +/* 832 */ lMusic.setFont(font); +/* 833 */ add(gbag, lMusic, c); +/* 834 */ c.gridwidth = 0; +/* 835 */ c.anchor = 17; +/* 836 */ this.musicChoice.setFont(font); +/* 837 */ add(gbag, this.musicChoice, c); +/* 838 */ c.anchor = 10; +/* 839 */ Panel p = new Panel(); +/* 840 */ p.setFont(bfont); +/* 841 */ p.add(this.okButton); +/* 842 */ p.add(this.cancelButton); +/* 843 */ add(gbag, p, c); +/* */ +/* 845 */ this.roomChoice.setFont(font); +/* 846 */ this.musicChoice.setFont(font); +/* 847 */ if (this.room != null) { +/* 848 */ this.roomChoice.add(this.room.getRoomName()); +/* */ } +/* 850 */ Enumeration e = this.parent.getAllRooms().elements(); +/* 851 */ Hashtable roomsWithMusic = this.parent.getManager().getRooms(); +/* 852 */ Vector v = new Vector(); +/* 853 */ while (e.hasMoreElements()) { +/* 854 */ String name = (String)e.nextElement(); +/* 855 */ if (!roomsWithMusic.containsKey(name)) +/* 856 */ v.addElement(name); +/* */ } +/* 858 */ Sort.sortInto(this.roomChoice, v); +/* */ +/* 860 */ Sort.sortInto(this.musicChoice, this.parent.getManager().getMusic()); +/* */ +/* 862 */ if (this.room != null) { +/* 863 */ this.roomChoice.select(this.room.getRoomName()); +/* 864 */ this.musicChoice.select(this.room.getMusicName()); +/* */ } else { +/* 866 */ this.roomChoice.select(this.startSelect); +/* 867 */ if (lastMusic != null) +/* 868 */ this.musicChoice.select(lastMusic); +/* */ } +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) { +/* 874 */ Object target = event.target; +/* 875 */ if (target == this.okButton) +/* 876 */ return done(true); +/* 877 */ if (target == this.cancelButton) +/* 878 */ return done(false); +/* 879 */ return false; +/* */ } +/* */ +/* */ public boolean isEditor() { +/* 883 */ return this.room != null; +/* */ } +/* */ +/* */ public MusicRoom getMusicRoom() { +/* 887 */ String roomName = this.roomChoice.getSelectedItem(); +/* 888 */ String musicName = this.musicChoice.getSelectedItem(); +/* 889 */ lastMusic = musicName; +/* 890 */ if (this.room == null) { +/* 891 */ return new MusicRoom(roomName, musicName); +/* */ } +/* 893 */ this.room.setRoomName(roomName); +/* 894 */ this.room.setMusicName(musicName); +/* 895 */ return this.room; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EditRoomDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EditTile.java b/NET/worlds/scape/EditTile.java new file mode 100644 index 0000000..863196a --- /dev/null +++ b/NET/worlds/scape/EditTile.java @@ -0,0 +1,709 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogDisabled; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.ExposedPanel; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import NET.worlds.console.SnapTool; +/* */ import NET.worlds.console.Tree; +/* */ import NET.worlds.console.TreeCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Button; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.Point; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EditTile +/* */ extends ExposedPanel +/* */ implements DialogReceiver, TreeCallback, MainCallback, DialogDisabled +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 84 */ private Button editButton = new Button(Console.message("Edit")); +/* 85 */ private Button addButton = new Button(Console.message("Add")); +/* 86 */ private Button delButton = new Button(Console.message("Delete")); +/* 87 */ private Button helpButton = new Button(Console.message("Help")); +/* 88 */ private ToolBar toolbar = new ToolBar(); +/* 89 */ private Label title = new Label(); +/* 90 */ private String titleText = ""; +/* */ private boolean usingTitleAsPrompt; +/* 92 */ private PropList props = new PropList(); +/* 93 */ private int queuedFunction = 0; +/* */ private Object queuedObject; +/* */ private Tree tree; +/* */ private PolledDialog activePopup; +/* 97 */ private boolean startup = true; +/* 98 */ private World rootWorld = null; +/* */ +/* */ private boolean isDialogDisabled; +/* */ +/* */ private static final int NONE = 0; +/* */ private static final int DELETE = 1; +/* */ private static final int ADD = 2; +/* */ private static final int CHANGE = 3; +/* */ private static final int UPDATE = 4; +/* */ private static final int CUT = 5; +/* */ private static final int COPY = 6; +/* */ private static final int PASTE = 7; +/* */ private static final int UNDO = 8; +/* */ private static final int EDIT = 9; +/* */ private static final int DROP = 10; +/* */ private static final int HELP = 11; +/* */ private static ClipboardEntry clipboard; +/* 115 */ private static UndoStack undoStack = new UndoStack(); +/* */ private Undoable preAddStackTop; +/* */ +/* 118 */ public void viewProperties(Object obj) { Console.getFrame().setShaperVisible(true); +/* 119 */ queue(3, obj); +/* */ } +/* */ +/* */ public void libraryDrop(URL url, String propertyName, Component comp, Point location) { +/* 123 */ queue(10, new DropInfo(url, propertyName, comp, location)); +/* */ } +/* */ +/* */ public EditTile(Tree tree) { +/* 127 */ this.tree = tree; +/* 128 */ tree.setOwner(this); +/* 129 */ GridBagLayout gbag = new GridBagLayout(); +/* 130 */ setLayout(gbag); +/* 131 */ GridBagConstraints c = new GridBagConstraints(); +/* 132 */ c.fill = 2; +/* 133 */ c.gridwidth = 0; +/* 134 */ c.weightx = 1.0D; +/* 135 */ c.weighty = 0.0D; +/* 136 */ c.anchor = 18; +/* 137 */ add(gbag, this.toolbar, c); +/* 138 */ add(gbag, this.title, c); +/* 139 */ c.weighty = 1.0D; +/* 140 */ c.fill = 1; +/* 141 */ c.gridwidth = 2; +/* 142 */ c.gridheight = 0; +/* 143 */ add(gbag, this.props, c); +/* 144 */ c.weightx = 0.0D; +/* 145 */ c.weighty = 0.0D; +/* 146 */ c.gridwidth = 0; +/* 147 */ c.gridheight = 1; +/* 148 */ c.fill = 2; +/* 149 */ add(gbag, this.editButton, c); +/* 150 */ add(gbag, this.addButton, c); +/* 151 */ add(gbag, this.delButton, c); +/* 152 */ add(gbag, this.helpButton, c); +/* 153 */ Main.register(this); +/* */ } +/* */ +/* */ public void update() { +/* 157 */ queue(4); +/* */ } +/* */ +/* */ private void add(GridBagLayout gbag, Component comp, GridBagConstraints c) { +/* 161 */ gbag.setConstraints(comp, c); +/* 162 */ add(comp); +/* */ } +/* */ +/* */ private boolean queue(int function) { +/* 166 */ return queue(function, null); +/* */ } +/* */ +/* */ private synchronized boolean queue(int function, Object obj) { +/* 170 */ if ((this.queuedFunction == 0) && (this.activePopup == null)) { +/* 171 */ this.queuedFunction = function; +/* 172 */ this.queuedObject = obj; +/* 173 */ setEnabled(false); +/* */ } +/* 175 */ return true; +/* */ } +/* */ +/* */ public synchronized void mainCallback() { +/* 179 */ if (this.startup) { +/* 180 */ World w = Pilot.getActiveWorld(); +/* 181 */ if (w != null) { +/* 182 */ change(w); +/* 183 */ this.startup = false; +/* */ } +/* */ } +/* */ +/* */ +/* 188 */ if (this.rootWorld != null) { +/* 189 */ this.rootWorld.incRef(); +/* */ } +/* 191 */ boolean enable = true; +/* 192 */ switch (this.queuedFunction) { +/* */ case 0: +/* 194 */ return; +/* */ case 1: +/* 196 */ delete(false); +/* 197 */ break; +/* */ case 5: +/* 199 */ delete(true); +/* 200 */ break; +/* */ case 2: +/* 202 */ enable = doAdd(); +/* 203 */ break; +/* */ case 9: +/* 205 */ enable = doEdit(); +/* 206 */ break; +/* */ case 3: +/* 208 */ change(this.queuedObject); +/* 209 */ break; +/* */ case 4: +/* 211 */ this.tree.update(); +/* 212 */ break; +/* */ case 8: +/* 214 */ doUndo(); +/* 215 */ break; +/* */ case 6: +/* 217 */ doCopy(); +/* 218 */ break; +/* */ case 7: +/* 220 */ doPaste(); +/* 221 */ break; +/* */ case 10: +/* 223 */ if (!drop((DropInfo)this.queuedObject)) { +/* 224 */ Object[] arguments = { new String(((DropInfo)this.queuedObject).url) }; +/* 225 */ Console.println(MessageFormat.format(Console.message("Target-doesnt"), arguments)); +/* */ } +/* 227 */ break; +/* */ case 11: +/* 229 */ doHelp(); +/* */ } +/* */ +/* 232 */ setEnabled(enable); +/* 233 */ this.queuedFunction = 0; +/* 234 */ this.queuedObject = null; +/* */ } +/* */ +/* */ private void delete(boolean isCut) { +/* 238 */ if (this.delButton.isEnabled()) { +/* 239 */ PropTreeNode e = (PropTreeNode)this.tree.getSelectedNode(); +/* 240 */ if ((e != null) && (this.tree.hasFocus())) { +/* 241 */ addUndoable(e.delete(isCut)); +/* */ } else { +/* 243 */ Property p = this.props.getSelectedProperty(); +/* 244 */ assert ((p.canSetNull()) && (p.get() != null)); +/* 245 */ addUndoableSet(p, null); +/* */ } +/* 247 */ this.tree.update(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void adjustDroppedSource(SuperRoot sr) +/* */ { +/* 258 */ if ((sr != null) && ( +/* 259 */ (!(sr instanceof WObject)) || (!((WObject)sr).isDynamic()))) +/* 260 */ sr.setSourceURL(null); +/* */ } +/* */ +/* */ private boolean drop(DropInfo info) { +/* 264 */ Object dropped = info.url; +/* */ +/* */ +/* 267 */ if ((info.url.endsWith(".class")) || (info.url.endsWith("." + WObject.getSaveExtension()))) { +/* 268 */ SuperRoot sr = WobLoader.immediateLoad(info.url); +/* 269 */ adjustDroppedSource(sr); +/* */ +/* 271 */ dropped = sr; +/* */ } +/* 273 */ return drop(dropped, info.propertyName, false, info.comp, info.location); +/* */ } +/* */ +/* */ private boolean drop(Object obj, String propertyName, boolean isPaste) { +/* 277 */ return drop(obj, propertyName, isPaste, null, null); +/* */ } +/* */ +/* */ private boolean drop(Object obj, String propertyName, boolean isPaste, Component comp, Point location) { +/* 281 */ if (obj == null) +/* 282 */ return false; +/* 283 */ PropTreeNode e = null; +/* 284 */ Point3Temp dropPoint = null; +/* 285 */ if ((comp == null) && (this.tree.hasFocus())) { +/* 286 */ e = (PropTreeNode)this.tree.getSelectedNode(); +/* 287 */ } else if (comp == this.tree) { +/* 288 */ e = (PropTreeNode)this.tree.elementAt(location); +/* 289 */ } else if ((comp instanceof RenderCanvas)) { +/* 290 */ Camera c = ((RenderCanvas)comp).getCamera(); +/* 291 */ dropPoint = Point3Temp.make(); +/* 292 */ WObject picked = c.getObjectAt(location.x, location.y, false, dropPoint); +/* 293 */ if (picked != null) { +/* 294 */ if ((obj instanceof WObject)) +/* 295 */ picked = picked.getRoom(); +/* */ } else { +/* 297 */ Pilot pilot = Pilot.getActive(); +/* 298 */ picked = pilot.getRoom(); +/* 299 */ dropPoint.set(0.0F, 180.0F, 0.0F); +/* 300 */ dropPoint.times(pilot); +/* */ } +/* 302 */ if (picked != null) { +/* 303 */ change(picked); +/* 304 */ e = (PropTreeNode)this.tree.getSelectedNode(); +/* */ } +/* */ } +/* 307 */ if (e == null) { +/* 308 */ return false; +/* */ } +/* */ +/* 311 */ boolean success = false; +/* 312 */ VectorProperty vp; PropAdder adder; if (((vp = e.getContainingVectorProperty()) != null) && ((adder = vp.getAdder()) != null)) +/* 313 */ success = adder.libraryDrop(this, obj, isPaste, true); +/* 314 */ if (!success) { +/* 315 */ Object top = null; +/* 316 */ while (e != null) { +/* 317 */ top = e.getObject(); +/* 318 */ if ((top instanceof Properties)) +/* */ break; +/* 320 */ if ((top instanceof Property)) +/* */ { +/* 322 */ top = ((Property)top).get(); +/* 323 */ if ((top instanceof Properties)) +/* */ break; +/* */ } +/* 326 */ e = (PropTreeNode)e.getParent(); +/* */ } +/* 328 */ if (e != null) +/* */ { +/* */ +/* */ +/* 332 */ Vector targets = new Vector(); +/* 333 */ int topLevelTargets = recurseFindDropTargets(targets, obj, propertyName, isPaste, +/* 334 */ new EnumProperties(top), 0, 10); +/* 335 */ if ((topLevelTargets == 1) || ((topLevelTargets == 0) && (targets.size() == 1))) { +/* 336 */ success = ((LibraryDrop)targets.elementAt(0)).libraryDrop(this, obj, isPaste, true); +/* */ } +/* */ } +/* */ } +/* 340 */ if (success) { +/* 341 */ if ((obj instanceof Properties)) { +/* 342 */ change(obj); +/* */ } else +/* 344 */ this.tree.update(); +/* */ } +/* */ WObject wobj; +/* 347 */ if ((dropPoint != null) && ((obj instanceof WObject)) && (!(obj instanceof Room)) && +/* 348 */ ((wobj = (WObject)obj).isActive())) { +/* 349 */ dropPoint.z = wobj.getZ(); +/* 350 */ wobj.moveTo(SnapTool.snapTool().snapTo(dropPoint)); +/* */ } +/* 352 */ return success; +/* */ } +/* */ +/* */ private int recurseFindDropTargets(Vector targets, Object obj, String propertyName, boolean isPaste, EnumProperties enumProperties, int level, int maxLevel) +/* */ { +/* 357 */ int firstLevelMatches = 0; +/* 358 */ if (level > maxLevel) { +/* 359 */ return 0; +/* */ } +/* 361 */ while (enumProperties.hasMoreElements()) { +/* 362 */ Property p = (Property)enumProperties.nextElement(); +/* 363 */ boolean propMatch = (propertyName == null) || (propertyName.equals(p.getName())); +/* 364 */ if (propMatch) { +/* 365 */ LibraryDrop target = null; +/* 366 */ if ((p instanceof VectorProperty)) { +/* 367 */ target = ((VectorProperty)p).getAdder(); +/* */ } else +/* 369 */ target = p.getEditor(); +/* 370 */ if ((target != null) && (target.libraryDrop(this, obj, isPaste, false))) { +/* 371 */ if (level == 0) { +/* 372 */ targets.insertElementAt(target, firstLevelMatches++); continue; +/* */ } +/* 374 */ targets.addElement(target); +/* 375 */ continue; +/* */ } +/* */ } +/* 378 */ if (!(p instanceof VectorProperty)) { +/* 379 */ int err = recurseFindDropTargets(targets, obj, propertyName, isPaste, new EnumProperties(p.get()), +/* 380 */ level + 1, maxLevel); +/* 381 */ if (err != 0) +/* 382 */ return err; +/* */ } +/* */ } +/* 385 */ return firstLevelMatches; +/* */ } +/* */ +/* */ +/* */ private boolean change(Object obj) +/* */ { +/* 391 */ Object parent = obj; +/* */ +/* */ +/* 394 */ Vector lineage = new Vector(); +/* 395 */ Object p; while (((parent instanceof Properties)) && ((p = ((Properties)parent).propertyParent()) != null)) { Object p; +/* 396 */ if (lineage != null) +/* */ { +/* */ +/* 399 */ EnumProperties e = new EnumProperties(p); +/* 400 */ boolean found = false; +/* 401 */ while (e.hasMoreElements()) { +/* 402 */ Property prop = (Property)e.nextElement(); +/* 403 */ Object o = prop.get(); +/* 404 */ boolean isVector = prop instanceof VectorProperty; +/* 405 */ if ((o == parent) || ((isVector) && (o != null) && (((Vector)o).indexOf(parent) != -1))) { +/* 406 */ if (isVector) { +/* 407 */ lineage.insertElementAt(parent, 0); +/* */ } +/* 409 */ lineage.insertElementAt(prop, 0); +/* 410 */ found = true; +/* 411 */ break; +/* */ } +/* */ } +/* 414 */ if (!found) +/* 415 */ lineage = null; +/* */ } +/* 417 */ parent = p; +/* */ } +/* 419 */ this.rootWorld = null; +/* 420 */ if ((parent instanceof World)) +/* 421 */ this.rootWorld = ((World)parent); +/* 422 */ PropTreeNode root = new PropTreeNode(parent); +/* 423 */ if (lineage != null) { +/* 424 */ this.tree.change(root, lineage); +/* */ } else +/* 426 */ this.tree.change(root, obj); +/* 427 */ return true; +/* */ } +/* */ +/* */ public void treeFocusChanged(boolean hasFocus) { +/* 431 */ if (hasFocus) { +/* 432 */ this.props.deselect(this.props.getSelectedIndex()); +/* 433 */ adjustButtons(); +/* */ } +/* */ } +/* */ +/* */ public void treeChange(Object obj) { +/* 438 */ if (((obj instanceof Property)) && (!(obj instanceof VectorProperty))) +/* 439 */ obj = ((Property)obj).get(); +/* 440 */ this.props.setObject(obj); +/* 441 */ this.toolbar.setCurrentObject(obj); +/* 442 */ String name = obj.getClass().getName(); +/* */ int index; +/* 444 */ if ((index = name.lastIndexOf('.')) != -1) +/* 445 */ name = name.substring(index + 1); +/* 446 */ setTitle(name + " " + Console.message("Properties")); +/* 447 */ adjustButtons(); +/* */ } +/* */ +/* */ private void setTitle(String titleText) { +/* 451 */ this.titleText = titleText; +/* 452 */ if (!this.usingTitleAsPrompt) +/* 453 */ this.title.setText(titleText); +/* */ } +/* */ +/* */ public void setPrompt(String promptText) { +/* 457 */ this.title.setText((this.usingTitleAsPrompt = promptText != null ? 1 : 0) != 0 ? promptText : this.titleText); +/* */ } +/* */ +/* */ private void adjustButtons() { +/* 461 */ PropTreeNode e = (PropTreeNode)this.tree.getSelectedNode(); +/* 462 */ if ((e != null) && (this.tree.hasFocus())) { +/* 463 */ this.editButton.setEnabled(e.canEdit()); +/* 464 */ this.delButton.setEnabled(e.canDelete()); +/* 465 */ this.addButton.setEnabled(e.canAdd()); +/* 466 */ this.helpButton.setEnabled(true); +/* */ } else { +/* 468 */ Property p = this.props.getSelectedProperty(); +/* 469 */ if (p != null) { +/* 470 */ Object obj = p.get(); +/* 471 */ this.editButton.setEnabled(p.getEditor() != null); +/* 472 */ this.delButton.setEnabled((p.canSetNull()) && (obj != null)); +/* 473 */ this.addButton.setEnabled((p.canSetNull()) && (p.getEditor() != null) && (obj == null)); +/* 474 */ this.helpButton.setEnabled(p.helpExists); +/* */ } else { +/* 476 */ this.editButton.setEnabled(false); +/* 477 */ this.delButton.setEnabled(false); +/* 478 */ this.addButton.setEnabled(false); +/* 479 */ this.helpButton.setEnabled(false); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void dialogDisable(boolean disable) { +/* 485 */ this.isDialogDisabled = disable; +/* 486 */ this.toolbar.dialogDisable(disable); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) { +/* 491 */ if (event.id == 701) { +/* 492 */ if (event.target == this.props) +/* 493 */ this.tree.setFocus(false); +/* 494 */ adjustButtons(); +/* */ } +/* */ +/* 497 */ if (this.isDialogDisabled) { +/* 498 */ return false; +/* */ } +/* 500 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) { +/* 505 */ Object target = event.target; +/* 506 */ if (target == this.delButton) +/* 507 */ return queue(1); +/* 508 */ if (target == this.addButton) +/* 509 */ return queue(2); +/* 510 */ if ((target == this.editButton) || ((target == this.props) && (this.editButton.isEnabled()))) +/* 511 */ return queue(9); +/* 512 */ if (target == this.helpButton) +/* 513 */ return queue(11); +/* 514 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private boolean isAdd; +/* */ +/* */ +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) +/* */ { +/* 526 */ if (who == this.activePopup) { +/* 527 */ this.activePopup = null; +/* 528 */ this.tree.setEnabled(true); +/* 529 */ if (confirmed) { +/* */ Undoable u; +/* */ Object obj; +/* 532 */ if ((this.isAdd) && ((u = undoStack.peek()) != this.preAddStackTop) && ((u instanceof UndoablAdd)) && +/* 533 */ (((obj = ((UndoablAdd)u).getObject()) instanceof Properties))) { +/* 534 */ change(obj); +/* */ } else +/* 536 */ this.tree.update(); +/* */ } +/* 538 */ setEnabled(true); +/* */ } +/* */ } +/* */ +/* */ private boolean doEdit() { +/* 543 */ Property p = this.props.getSelectedProperty(); +/* */ PropEditor editor; +/* 545 */ if ((p != null) && ((editor = p.getEditor()) != null)) { +/* 546 */ this.isAdd = false; +/* 547 */ this.activePopup = editor.edit(this, "Edit " + p.getName()); +/* 548 */ this.tree.setEnabled(false); +/* 549 */ return false; +/* */ } +/* 551 */ return true; +/* */ } +/* */ +/* */ private boolean doAdd() { +/* 555 */ PropTreeNode e = (PropTreeNode)this.tree.getSelectedNode(); +/* */ PropAdder adder; +/* 557 */ if ((e != null) && (this.tree.hasFocus()) && ((adder = e.getAdder()) != null)) { +/* 558 */ this.preAddStackTop = undoStack.peek(); +/* 559 */ this.isAdd = true; +/* 560 */ this.activePopup = adder.add(this, "Add to " + e.getContainerName()); +/* 561 */ this.tree.setEnabled(false); +/* 562 */ return false; +/* */ } +/* 564 */ return true; +/* */ } +/* */ +/* */ public void cut() { +/* 568 */ queue(5); +/* */ } +/* */ +/* */ public void paste() { +/* 572 */ queue(7); +/* */ } +/* */ +/* */ private boolean doPaste() { +/* 576 */ if (clipboard != null) { +/* 577 */ SuperRoot obj = clipboard.paste(); +/* 578 */ if (drop(obj, null, true)) +/* 579 */ return true; +/* 580 */ clipboard.unPaste(obj); +/* 581 */ Console.println(Console.message("Clip-contents")); +/* */ } else { +/* 583 */ Console.println(Console.message("Clip-empty")); } +/* 584 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 592 */ private SendURLAction helpAction = new SendURLAction(); +/* */ private Persister helpBrowser; +/* */ +/* */ private boolean doHelp() { +/* 596 */ this.helpAction.showDialog = false; +/* 597 */ if ((this.tree.hasFocus()) && (this.props.getSelectedProperty() == null)) { +/* */ try { +/* 599 */ SuperRoot s = (SuperRoot)((PropTreeNode)this.tree.getSelectedNode()).getObject(); +/* */ +/* */ +/* */ +/* */ +/* 604 */ if (s == null) break label141; +/* 605 */ this.helpAction.setDestination(s.getHelpURL()); +/* */ } +/* */ catch (ClassCastException e) { +/* 608 */ Console.println(Console.message("No-help")); +/* */ } +/* */ } else { +/* 611 */ Property p = this.props.getSelectedProperty(); +/* */ +/* 613 */ if ((p != null) && (p.helpExists)) { +/* */ try { +/* 615 */ SuperRoot s = (SuperRoot)((PropTreeNode)this.tree.getSelectedNode()).getObject(); +/* */ +/* */ +/* */ +/* 619 */ if (s != null) { +/* 620 */ this.helpAction.setDestination(s.getHelpURL(p)); +/* */ } +/* */ } catch (ClassCastException e) { +/* 623 */ Console.println(Console.message("No-help")); +/* */ } +/* */ } +/* */ } +/* */ label141: +/* 628 */ this.helpBrowser = this.helpAction.trigger(null, this.helpBrowser); +/* 629 */ return true; +/* */ } +/* */ +/* */ public void copy() { +/* 633 */ queue(6); +/* */ } +/* */ +/* */ private void doCopy() { +/* 637 */ SuperRoot item = getCurSuperRoot(true); +/* 638 */ if (item != null) { +/* 639 */ ClipboardEntry newClip = new ClipboardEntry(); +/* 640 */ if (newClip.copy(item)) +/* 641 */ addUndoable(new UndoabCopy(newClip)); +/* */ } +/* */ } +/* */ +/* */ public boolean save(String fileName) { +/* 646 */ SuperRoot item = getCurSuperRoot(true); +/* */ try { +/* 648 */ item.saveFile(new URL(URL.getCurDir(), fileName)); +/* 649 */ return true; +/* */ } catch (IOException e) {} +/* 651 */ return false; +/* */ } +/* */ +/* */ private SuperRoot getCurSuperRoot(boolean allowContainers) +/* */ { +/* 656 */ Object obj = this.props.getObject(); +/* 657 */ if ((obj instanceof SuperRoot)) +/* 658 */ return (SuperRoot)obj; +/* 659 */ return null; +/* */ } +/* */ +/* */ public void addUndoable(Undoable u) { +/* 663 */ undoStack.push(u); +/* */ } +/* */ +/* */ public void addUndoableSet(Property prop, Object obj) { +/* 667 */ addUndoable(new UndoablSet(prop, obj)); +/* */ } +/* */ +/* */ public void addUndoableAdd(VectorProperty prop, Object obj, boolean changeTree) { +/* 671 */ addUndoable(new UndoablAdd(prop, obj)); +/* 672 */ if (!changeTree) +/* 673 */ this.preAddStackTop = undoStack.peek(); +/* */ } +/* */ +/* */ public void addUndoablePaste(VectorProperty prop, Object obj) { +/* */ try { +/* 678 */ addUndoable(new UndoablPaste(prop, clipboard, obj)); +/* */ } catch (Error e) { +/* 680 */ Console.println(e.getMessage()); +/* */ } +/* */ } +/* */ +/* */ public void undo() { +/* 685 */ if (Main.isMainThread()) { +/* 686 */ doUndo(); +/* */ } else +/* 688 */ queue(8); +/* */ } +/* */ +/* */ private void doUndo() { +/* 692 */ if (undoStack.undo()) +/* 693 */ this.tree.update(); +/* */ } +/* */ +/* */ public static void setClipboard(ClipboardEntry clip) { +/* 697 */ clipboard = clip; +/* */ } +/* */ +/* */ public static ClipboardEntry getClipboard() { +/* 701 */ return clipboard; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EditTile.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EnumFieldEditorDialog.java b/NET/worlds/scape/EnumFieldEditorDialog.java new file mode 100644 index 0000000..1504abe --- /dev/null +++ b/NET/worlds/scape/EnumFieldEditorDialog.java @@ -0,0 +1,47 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class EnumFieldEditorDialog +/* */ extends CheckboxEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ private Property property; +/* */ +/* */ +/* */ +/* */ private int[] numbers; +/* */ +/* */ +/* */ +/* */ +/* */ EnumFieldEditorDialog(EditTile parent, String title, Property property, String[] choices, int[] values) +/* */ { +/* 26 */ super(parent, title, choices); +/* 27 */ this.property = property; +/* 28 */ this.numbers = values; +/* 29 */ ready(); +/* */ } +/* */ +/* */ protected int getValue() +/* */ { +/* 34 */ return ((Integer)this.property.get()).intValue(); +/* */ } +/* */ +/* */ protected void setValue(int choice) +/* */ { +/* 39 */ this.parent.addUndoableSet(this.property, new Integer(this.numbers[choice])); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EnumFieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EnumProperties.java b/NET/worlds/scape/EnumProperties.java new file mode 100644 index 0000000..36416b5 --- /dev/null +++ b/NET/worlds/scape/EnumProperties.java @@ -0,0 +1,50 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ import java.util.NoSuchElementException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EnumProperties +/* */ implements Enumeration +/* */ { +/* */ private Properties props; +/* */ private Property next; +/* 17 */ private int index = 0; +/* */ +/* */ public EnumProperties(Object obj) { +/* 20 */ if ((obj instanceof Properties)) +/* 21 */ this.props = ((Properties)obj); +/* */ } +/* */ +/* */ public boolean hasMoreElements() { +/* 25 */ if ((this.props != null) && (this.next == null)) { +/* */ try { +/* 27 */ this.next = ((Property)this.props.properties(this.index++, 0, 0, +/* 28 */ null)); +/* 29 */ if ((!$assertionsDisabled) && (this.next.index != this.index - 1)) throw new AssertionError(); +/* */ } catch (NoSuchPropertyException localNoSuchPropertyException) {} +/* */ } +/* 32 */ return this.next != null; +/* */ } +/* */ +/* */ public Object nextElement() { +/* 36 */ if (hasMoreElements()) +/* */ try { +/* 38 */ return this.next; +/* */ } finally { +/* 40 */ this.next = null; +/* */ } +/* 42 */ throw new NoSuchElementException(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EnumProperties.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EnumPropertyEditor.java b/NET/worlds/scape/EnumPropertyEditor.java new file mode 100644 index 0000000..e03f755 --- /dev/null +++ b/NET/worlds/scape/EnumPropertyEditor.java @@ -0,0 +1,104 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EnumPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private String[] choices; +/* */ private int[] numbers; +/* */ +/* */ private EnumPropertyEditor(Property property, String[] names, int[] values) +/* */ { +/* 55 */ super(property); +/* */ +/* 57 */ assert (names != null); +/* 58 */ assert (values != null); +/* */ +/* 60 */ int len = Math.max(names.length, values.length); +/* 61 */ assert (len > 1); +/* 62 */ this.choices = new String[len]; +/* 63 */ this.numbers = new int[len]; +/* 64 */ for (int i = 0; i < len; i++) { +/* 65 */ if (i < names.length) { +/* 66 */ this.choices[i] = names[i]; +/* */ } else +/* 68 */ this.choices[i] = (names[(names.length - 1)] + i); +/* 69 */ if (i < values.length) { +/* 70 */ this.numbers[i] = values[i]; +/* */ } else { +/* 72 */ this.numbers[i] = (values[(values.length - 1)] + i - values.length); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) { +/* 78 */ return new EnumFieldEditorDialog(parent, title, this.property, +/* 79 */ this.choices, this.numbers); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Property make(Property property, String[] names, int[] values) +/* */ { +/* 94 */ property.setPropertyType(5); +/* 95 */ return property.setEditor(new EnumPropertyEditor(property, +/* 96 */ names, values)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EnumPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EquipAction.java b/NET/worlds/scape/EquipAction.java new file mode 100644 index 0000000..6b1666c --- /dev/null +++ b/NET/worlds/scape/EquipAction.java @@ -0,0 +1,78 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EquipAction +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 40 */ InventoryDialog invDialog = new InventoryDialog( +/* 41 */ Console.getFrame()); +/* */ +/* 43 */ invDialog.setVisible(true); +/* */ +/* */ +/* 46 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 53 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 57 */ s.saveVersion(0, classCookie); +/* 58 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 64 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 66 */ super.restoreState(r); +/* 67 */ break; +/* */ default: +/* 69 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EquipAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EquippableItem.java b/NET/worlds/scape/EquippableItem.java new file mode 100644 index 0000000..1e6d082 --- /dev/null +++ b/NET/worlds/scape/EquippableItem.java @@ -0,0 +1,182 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ public class EquippableItem +/* */ extends InventoryItem +/* */ { +/* */ private String modelLocation_; +/* */ +/* */ private float xPos_; +/* */ +/* */ private float yPos_; +/* */ +/* */ private float zPos_; +/* */ +/* */ private float scale_; +/* */ +/* */ private int pitch_; +/* */ +/* */ private int roll_; +/* */ +/* */ private int yaw_; +/* */ +/* */ private Shape shape_; +/* */ +/* */ private int bodyLocation_; +/* */ +/* */ +/* */ public EquippableItem(String id, String name, int qty, String modelLoc, float scale, int bodyLoc) +/* */ { +/* 31 */ super(id, name, qty); +/* 32 */ this.modelLocation_ = modelLoc; +/* 33 */ this.scale_ = scale; +/* 34 */ this.bodyLocation_ = bodyLoc; +/* 35 */ this.shape_ = null; +/* */ } +/* */ +/* */ +/* */ +/* */ public EquippableItem(String id, String name, int qty, String modelLoc, float scale, int bodyLoc, float xPos, float yPos, float zPos) +/* */ { +/* 42 */ super(id, name, qty); +/* 43 */ this.modelLocation_ = modelLoc; +/* 44 */ this.scale_ = scale; +/* 45 */ this.bodyLocation_ = bodyLoc; +/* 46 */ this.xPos_ = xPos; +/* 47 */ this.yPos_ = yPos; +/* 48 */ this.zPos_ = zPos; +/* 49 */ this.shape_ = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public EquippableItem(String id, String name, int qty, String modelLoc, float scale, int bodyLoc, float xPos, float yPos, float zPos, int pitch, int roll, int yaw) +/* */ { +/* 58 */ super(id, name, qty); +/* 59 */ this.modelLocation_ = modelLoc; +/* 60 */ this.scale_ = scale; +/* 61 */ this.bodyLocation_ = bodyLoc; +/* 62 */ this.xPos_ = xPos; +/* 63 */ this.yPos_ = yPos; +/* 64 */ this.zPos_ = zPos; +/* 65 */ this.pitch_ = pitch; +/* 66 */ this.roll_ = roll; +/* 67 */ this.yaw_ = yaw; +/* 68 */ this.shape_ = null; +/* */ } +/* */ +/* */ +/* */ public EquippableItem(EquippableItem in) +/* */ { +/* 74 */ super(in); +/* 75 */ this.modelLocation_ = in.modelLocation_; +/* 76 */ this.scale_ = in.scale_; +/* 77 */ this.bodyLocation_ = in.bodyLocation_; +/* 78 */ this.xPos_ = in.xPos_; +/* 79 */ this.yPos_ = in.yPos_; +/* 80 */ this.zPos_ = in.zPos_; +/* 81 */ this.pitch_ = in.pitch_; +/* 82 */ this.roll_ = in.roll_; +/* 83 */ this.yaw_ = in.yaw_; +/* 84 */ this.shape_ = null; +/* */ } +/* */ +/* */ public InventoryItem cloneItem() +/* */ { +/* 89 */ return new EquippableItem(this); +/* */ } +/* */ +/* */ +/* */ +/* */ public String getModelLocation() +/* */ { +/* 96 */ return this.modelLocation_; +/* */ } +/* */ +/* */ public void setModelLocation(String loc) +/* */ { +/* 101 */ this.modelLocation_ = loc; +/* */ } +/* */ +/* */ public int getBodyLocation() +/* */ { +/* 106 */ return this.bodyLocation_; +/* */ } +/* */ +/* */ public void setBodyLocation(int loc) +/* */ { +/* 111 */ this.bodyLocation_ = loc; +/* */ } +/* */ +/* */ public float getScale() +/* */ { +/* 116 */ return this.scale_; +/* */ } +/* */ +/* */ public void setScale(float scale) +/* */ { +/* 121 */ this.scale_ = scale; +/* */ } +/* */ +/* */ public float getXPos() { +/* 125 */ return this.xPos_; +/* */ } +/* */ +/* */ public float getYPos() +/* */ { +/* 130 */ return this.yPos_; +/* */ } +/* */ +/* */ public float getZPos() +/* */ { +/* 135 */ return this.zPos_; +/* */ } +/* */ +/* */ public void setPosition(float xPos, float yPos, float zPos) +/* */ { +/* 140 */ this.xPos_ = xPos; +/* 141 */ this.yPos_ = yPos; +/* 142 */ this.zPos_ = zPos; +/* */ } +/* */ +/* */ public int getPitch() +/* */ { +/* 147 */ return this.pitch_; +/* */ } +/* */ +/* */ public int getRoll() +/* */ { +/* 152 */ return this.roll_; +/* */ } +/* */ +/* */ public int getYaw() +/* */ { +/* 157 */ return this.yaw_; +/* */ } +/* */ +/* */ public void setRotation(int pitch, int roll, int yaw) +/* */ { +/* 162 */ this.pitch_ = pitch; +/* 163 */ this.roll_ = roll; +/* 164 */ this.yaw_ = yaw; +/* */ } +/* */ +/* */ public void setOwnedShape(Shape s) +/* */ { +/* 169 */ this.shape_ = s; +/* */ } +/* */ +/* */ public Shape getOwnedShape() +/* */ { +/* 174 */ return this.shape_; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EquippableItem.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Event.java b/NET/worlds/scape/Event.java new file mode 100644 index 0000000..d02c75e --- /dev/null +++ b/NET/worlds/scape/Event.java @@ -0,0 +1,130 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Event +/* */ implements Cloneable +/* */ { +/* */ public Event(int time, Object source, WObject target) +/* */ { +/* 25 */ this.time = time; +/* 26 */ this.source = source; +/* 27 */ this.target = target; +/* */ } +/* */ +/* 30 */ public static final Class eventSuperclass = new Object().getClass(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int time; +/* */ +/* */ +/* */ +/* */ +/* */ public Object source; +/* */ +/* */ +/* */ +/* */ +/* */ public WObject target; +/* */ +/* */ +/* */ +/* */ +/* */ public WObject receiver; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object clone() +/* */ { +/* */ try +/* */ { +/* 61 */ return super.clone(); +/* */ } catch (CloneNotSupportedException e) { +/* 63 */ System.out.println("Clone of Object not supported!"); } +/* 64 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean isA(Class c) +/* */ { +/* 71 */ for (Class t = getClass(); +/* 72 */ t != eventSuperclass; +/* 73 */ t = t.getSuperclass()) +/* */ { +/* 75 */ if (t == c) { +/* 76 */ return true; +/* */ } +/* */ } +/* 79 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 91 */ if (((o instanceof Handler)) && +/* 92 */ (((Handler)o).handle(this))) { +/* 93 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 98 */ return false; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 103 */ String result = "Event at " + this.time; +/* */ +/* 105 */ String sname = null; +/* 106 */ if ((this.source instanceof SuperRoot)) { +/* 107 */ sname = ((SuperRoot)this.source).getName(); +/* 108 */ } else if (this.source != null) +/* 109 */ sname = this.source.toString(); +/* 110 */ if (sname != null) +/* 111 */ result = result + " from " + sname; +/* 112 */ String tname = null; +/* 113 */ if (this.target != null) +/* 114 */ tname = this.target.getName(); +/* 115 */ if (tname != null) +/* 116 */ result = result + " to " + tname; +/* 117 */ String rname = null; +/* 118 */ if (this.receiver != null) +/* 119 */ rname = this.receiver.getName(); +/* 120 */ if (rname != null) +/* 121 */ result = result + " handled by " + rname; +/* 122 */ return result; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Event.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/EventQueue.java b/NET/worlds/scape/EventQueue.java new file mode 100644 index 0000000..9bfb888 --- /dev/null +++ b/NET/worlds/scape/EventQueue.java @@ -0,0 +1,220 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class EventQueue +/* */ { +/* */ private static final int keyDown = 1; +/* */ private static final int keyUp = 2; +/* */ private static final int keyChar = 3; +/* */ private static final int mouseDown = 4; +/* */ private static final int mouseUp = 5; +/* */ private static final int mouseMove = 6; +/* */ private static final int mouseDelta = 7; +/* */ private static final int mouseEnter = 8; +/* */ private static final int mouseExit = 9; +/* */ private static final int teleport = 10; +/* */ private char key; +/* */ private int type; +/* */ private int time; +/* */ private int x; +/* */ private int y; +/* */ +/* */ public static void pollForEvents(Camera eventEater) +/* */ { +/* 58 */ if (eventEater != null) +/* */ { +/* */ +/* */ +/* */ +/* 63 */ int eventCount = getEventCount(); +/* */ Event e; +/* 65 */ while ((eventCount-- > 0) && ((e = dequeueInfo.dequeue()) != null)) { Event e; +/* 66 */ if (e.target == null) +/* 67 */ e.target = eventEater; +/* 68 */ eventEater.deliver(e); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean redirectDrivingKeys(java.awt.Event e) +/* */ { +/* */ boolean press; +/* */ +/* */ +/* */ +/* 82 */ if (((press = e.id == 403 ? 1 : 0) != 0) || (e.id == 404)) { char newKey; +/* */ char newKey; +/* 84 */ char newKey; char newKey; char newKey; char newKey; char newKey; char newKey; char newKey; switch (e.key) { +/* */ case 1004: +/* 86 */ newKey = 58150; +/* 87 */ break; +/* */ case 1005: +/* 89 */ newKey = 58152; +/* 90 */ break; +/* */ case 1006: +/* 92 */ newKey = 58149; +/* 93 */ break; +/* */ case 1007: +/* 95 */ newKey = 58151; +/* 96 */ break; +/* */ case 1002: +/* 98 */ newKey = 58145; +/* 99 */ break; +/* */ case 1003: +/* 101 */ newKey = 58146; +/* 102 */ break; +/* */ case 1000: +/* 104 */ newKey = 58148; +/* 105 */ break; +/* */ case 1001: +/* 107 */ newKey = 58147; +/* 108 */ break; +/* */ case 27: +/* 110 */ newKey = 58139; +/* 111 */ break; +/* */ default: +/* 113 */ return false; } +/* */ char newKey; +/* 115 */ addEvent(newKey, press ? 1 : 2, +/* 116 */ Std.getTimeZero() + Std.getRealTime(), +/* 117 */ e.x, e.y); +/* 118 */ return true; +/* */ } +/* 120 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 151 */ private static EventQueue dequeueInfo = new EventQueue(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Event dequeue() +/* */ { +/* 170 */ if (getNextEvent()) +/* */ { +/* */ +/* */ +/* 174 */ this.time -= Std.getTimeZero(); +/* */ +/* 176 */ switch (this.type) { +/* */ case 1: +/* 178 */ return new KeyDownEvent(this.time, null, this.key); +/* */ case 2: +/* 180 */ return new KeyUpEvent(this.time, null, this.key); +/* */ case 3: +/* 182 */ return new KeyCharEvent(this.time, null, this.key); +/* */ case 4: +/* 184 */ return new MouseDownEvent(this.time, null, this.key, this.x, this.y); +/* */ case 5: +/* 186 */ return new MouseUpEvent(this.time, null, this.key, this.x, this.y); +/* */ case 6: +/* 188 */ return new MouseMoveEvent(this.time, null, this.x, this.y); +/* */ case 7: +/* 190 */ return new MouseDeltaEvent(this.time, null, this.x, this.y); +/* */ case 8: +/* 192 */ return new MouseEnterEvent(this.time, null, this.x, this.y); +/* */ case 9: +/* 194 */ return new MouseExitEvent(this.time, null, this.x, this.y); +/* */ } +/* 196 */ throw new Error("Illegal internal event type"); +/* */ } +/* */ +/* 199 */ return null; +/* */ } +/* */ +/* */ static +/* */ { +/* 204 */ nativeInit(); +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ private native boolean getNextEvent(); +/* */ +/* */ private static native int getEventCount(); +/* */ +/* */ private static native void addEvent(char paramChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\EventQueue.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ExtensionFilter.java b/NET/worlds/scape/ExtensionFilter.java new file mode 100644 index 0000000..e19e239 --- /dev/null +++ b/NET/worlds/scape/ExtensionFilter.java @@ -0,0 +1,38 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.File; +/* */ import java.io.FilenameFilter; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ExtensionFilter +/* */ implements FilenameFilter +/* */ { +/* */ private String _ext; +/* */ +/* */ public ExtensionFilter(String ext) +/* */ { +/* 25 */ this._ext = ext; +/* */ } +/* */ +/* */ public boolean accept(File dir, String name) +/* */ { +/* 30 */ return name.endsWith(this._ext); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ExtensionFilter.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Facer.java b/NET/worlds/scape/Facer.java new file mode 100644 index 0000000..7cc2715 --- /dev/null +++ b/NET/worlds/scape/Facer.java @@ -0,0 +1,31 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Facer +/* */ extends SwitchableBehavior +/* */ { +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ {} +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 22 */ System.out.println( +/* 23 */ "WARNING! Facers are obsolete. Use 1-image Holograms instead."); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Facer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FieldEditorDialog.java b/NET/worlds/scape/FieldEditorDialog.java new file mode 100644 index 0000000..29d9e7e --- /dev/null +++ b/NET/worlds/scape/FieldEditorDialog.java @@ -0,0 +1,69 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.TextField; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class FieldEditorDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 23 */ private TextField strField = new TextField(40); +/* */ +/* */ protected EditTile parent; +/* 26 */ private static Font font = new Font(Console.message("GammaTextFont"), 0, 12); +/* */ +/* */ protected FieldEditorDialog(EditTile parent, String title) { +/* 29 */ super(Console.getFrame(), parent, title); +/* 30 */ this.parent = parent; +/* */ } +/* */ +/* */ protected void build() { +/* 34 */ GridBagConstraints c = new GridBagConstraints(); +/* 35 */ c.fill = 2; +/* 36 */ c.weightx = 1.0D; +/* 37 */ c.weighty = 1.0D; +/* 38 */ c.gridwidth = 0; +/* 39 */ this.strField.setFont(font); +/* 40 */ add(this.gbag, this.strField, c); +/* 41 */ super.build(); +/* */ } +/* */ +/* */ protected abstract String getValue(); +/* */ +/* */ protected abstract boolean setValue(String paramString); +/* */ +/* */ protected boolean setValue() { +/* 49 */ return setValue(this.strField.getText().trim()); +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 56 */ super.setVisible(visible); +/* 57 */ if (visible) { +/* 58 */ this.strField.setText(getValue()); +/* 59 */ this.strField.requestFocus(); +/* 60 */ this.strField.selectAll(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FieldWithListEditorDialog.java b/NET/worlds/scape/FieldWithListEditorDialog.java new file mode 100644 index 0000000..5289175 --- /dev/null +++ b/NET/worlds/scape/FieldWithListEditorDialog.java @@ -0,0 +1,105 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.List; +/* */ import java.awt.TextField; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class FieldWithListEditorDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 27 */ private TextField strField = new TextField(40); +/* 28 */ private List list = new List(); +/* */ private Vector choices; +/* */ protected EditTile parent; +/* 31 */ private static Font font = new Font( +/* 32 */ Console.message("GammaTextFont"), 0, 12); +/* */ +/* */ +/* */ protected FieldWithListEditorDialog(EditTile parent, String title, Vector choices) +/* */ { +/* 37 */ super(Console.getFrame(), parent, title); +/* 38 */ this.choices = choices; +/* 39 */ this.parent = parent; +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 44 */ Enumeration e = this.choices.elements(); +/* 45 */ while (e.hasMoreElements()) { +/* 46 */ this.list.add((String)e.nextElement()); +/* */ } +/* 48 */ GridBagConstraints c = new GridBagConstraints(); +/* 49 */ c.fill = 2; +/* 50 */ c.weightx = 0.0D; +/* 51 */ c.weighty = 0.0D; +/* 52 */ c.gridwidth = 0; +/* 53 */ this.strField.setFont(font); +/* 54 */ add(this.gbag, this.strField, c); +/* 55 */ c.fill = 1; +/* 56 */ c.weightx = 1.0D; +/* 57 */ c.weighty = 1.0D; +/* 58 */ c.gridheight = 6; +/* 59 */ add(this.gbag, this.list, c); +/* 60 */ super.build(); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) { +/* 65 */ if (event.id == 701) { +/* 66 */ this.strField.setText(this.list.getSelectedItem()); +/* 67 */ this.strField.selectAll(); +/* */ } +/* 69 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) +/* */ { +/* 75 */ if (event.target == this.list) +/* 76 */ event.target = this.okButton; +/* 77 */ return super.action(event, what); +/* */ } +/* */ +/* */ protected abstract String getValue(); +/* */ +/* */ protected abstract boolean setValue(String paramString); +/* */ +/* */ protected boolean setValue() { +/* 85 */ return setValue(this.strField.getText().trim()); +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 92 */ super.setVisible(visible); +/* 93 */ if (visible) { +/* 94 */ this.strField.setText(getValue()); +/* 95 */ this.strField.requestFocus(); +/* 96 */ this.strField.selectAll(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FieldWithListEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FileList.java b/NET/worlds/scape/FileList.java new file mode 100644 index 0000000..6764f78 --- /dev/null +++ b/NET/worlds/scape/FileList.java @@ -0,0 +1,144 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.File; +/* */ import java.io.FilenameFilter; +/* */ import java.util.Enumeration; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FileList +/* */ implements FilenameFilter +/* */ { +/* */ private String dirList; +/* */ private String extList; +/* */ private Vector exts; +/* */ private boolean keepPathInfo; +/* 25 */ private boolean sort = true; +/* */ +/* */ public FileList(String dirList, String extList) +/* */ { +/* 29 */ this.dirList = dirList; +/* 30 */ this.extList = extList; +/* */ } +/* */ +/* */ public String getExtList() { +/* 34 */ return this.extList; +/* */ } +/* */ +/* */ private static Vector breakUp(String list) { +/* 38 */ StringTokenizer t = new StringTokenizer(list, File.pathSeparator, false); +/* 39 */ Vector v = new Vector(); +/* 40 */ while (t.hasMoreTokens()) +/* 41 */ v.addElement(t.nextToken()); +/* 42 */ return v; +/* */ } +/* */ +/* */ public boolean accept(File dir, String name) { +/* 46 */ return extMatches(name, this.exts); +/* */ } +/* */ +/* */ public static boolean extMatches(String name, Vector exts) +/* */ { +/* 51 */ int index = name.lastIndexOf("."); +/* 52 */ if (index != -1) { +/* 53 */ String ext = name.substring(index + 1); +/* 54 */ Enumeration e = exts.elements(); +/* 55 */ while (e.hasMoreElements()) +/* 56 */ if (ext.equalsIgnoreCase((String)e.nextElement())) +/* 57 */ return true; +/* */ } +/* 59 */ return false; +/* */ } +/* */ +/* */ public static boolean extMatches(String name, String exts) { +/* 63 */ return extMatches(name, breakUp(exts)); +/* */ } +/* */ +/* */ public boolean extMatches(String name) +/* */ { +/* 68 */ return extMatches(name, this.extList); +/* */ } +/* */ +/* */ public FileList keepPathInfo() { +/* 72 */ this.keepPathInfo = true; +/* 73 */ return this; +/* */ } +/* */ +/* */ public FileList dontSort() { +/* 77 */ this.sort = false; +/* 78 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String removeTrailingSlash(String dir) +/* */ { +/* 86 */ if (dir != null) { +/* 87 */ int len = dir.length(); +/* 88 */ if (len > 0) { +/* 89 */ char c = dir.charAt(len - 1); +/* 90 */ if ((c == '/') || (c == '\\')) { +/* 91 */ dir = dir.substring(0, len - 1); +/* */ } +/* */ } +/* */ } +/* 95 */ return dir; +/* */ } +/* */ +/* */ public Vector getList() +/* */ { +/* 100 */ this.exts = breakUp(this.extList); +/* 101 */ Vector dirs = breakUp(this.dirList); +/* */ +/* */ +/* 104 */ Vector v = new Vector(); +/* 105 */ Enumeration edirs = dirs.elements(); +/* 106 */ while (edirs.hasMoreElements()) { +/* 107 */ String dir = removeTrailingSlash((String)edirs.nextElement()); +/* */ +/* 109 */ File f = new File(dir); +/* 110 */ if (f.exists()) { +/* 111 */ String[] list = f.list(this); +/* 112 */ if ((this.keepPathInfo) && (!dir.equals("."))) { +/* 113 */ dir = dir + File.separator; +/* */ } else +/* 115 */ dir = ""; +/* 116 */ for (int i = 0; i < list.length; i++) { +/* 117 */ String name = dir + list[i]; +/* 118 */ if (this.sort) { +/* 119 */ int count = v.size(); +/* */ +/* 121 */ String lname = name.toLowerCase(); +/* 122 */ for (int j = 0; j < count; j++) { +/* 123 */ if (lname.compareTo(((String)v.elementAt(j)) +/* 124 */ .toLowerCase()) < 0) { +/* 125 */ v.insertElementAt(name, j); +/* 126 */ break; +/* */ } +/* */ } +/* 129 */ if (j == count) +/* 130 */ v.addElement(name); +/* */ } else { +/* 132 */ v.addElement(name); +/* */ } +/* */ } +/* */ } } +/* 136 */ return v; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FileList.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FileTexture.java b/NET/worlds/scape/FileTexture.java new file mode 100644 index 0000000..a18a6a2 --- /dev/null +++ b/NET/worlds/scape/FileTexture.java @@ -0,0 +1,112 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FileTexture +/* */ extends Texture +/* */ implements Persister +/* */ { +/* */ private String _urlName; +/* */ +/* */ static {} +/* */ +/* */ public FileTexture(String urlName, String filename) +/* */ { +/* 40 */ makeTexture(urlName, filename); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected FileTexture() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static native FileTexture dictLookup(String paramString); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private native void makeTexture(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 80 */ public String getName() { return this._urlName; } +/* */ +/* 82 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 86 */ s.saveVersion(0, classCookie); +/* 87 */ super.saveState(s); +/* 88 */ s.saveString(this._urlName); +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 95 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 97 */ super.restoreState(r); +/* 98 */ String name = r.restoreString(); +/* 99 */ makeTexture(name, name); +/* 100 */ break; +/* */ default: +/* 102 */ throw new TooNewException(); +/* */ } +/* */ String name; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FileTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FileTextureDecoder.java b/NET/worlds/scape/FileTextureDecoder.java new file mode 100644 index 0000000..f5fa9e2 --- /dev/null +++ b/NET/worlds/scape/FileTextureDecoder.java @@ -0,0 +1,154 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class FileTextureDecoder +/* */ extends TextureDecoder +/* */ { +/* 135 */ private String exts = "bmp;ras"; +/* */ +/* */ +/* */ protected String getExts() +/* */ { +/* 140 */ return this.exts; +/* */ } +/* */ +/* */ +/* */ protected Texture read(String urlName, String filename) +/* */ { +/* 146 */ return new FileTexture(urlName, filename); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FileTextureDecoder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FloatArrayEditorDialog.java b/NET/worlds/scape/FloatArrayEditorDialog.java new file mode 100644 index 0000000..b20313f --- /dev/null +++ b/NET/worlds/scape/FloatArrayEditorDialog.java @@ -0,0 +1,70 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class FloatArrayEditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected float[] arr; +/* */ +/* */ FloatArrayEditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 28 */ super(parent, title); +/* 29 */ this.property = property; +/* 30 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 35 */ this.arr = ((float[])this.property.get()); +/* 36 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 41 */ return this.arr.length; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 46 */ return this.arr[index]; +/* */ } +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 51 */ int count = 0; +/* 52 */ while (e.hasMoreTokens()) +/* */ try { +/* 54 */ this.arr[(count++)] = Float.valueOf(e.nextToken()).floatValue(); +/* */ } catch (Exception x) { +/* 56 */ return false; +/* */ } +/* 58 */ if (count == this.arr.length) { +/* 59 */ this.parent.addUndoableSet(this.property, this.arr); +/* 60 */ return true; +/* */ } +/* 62 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FloatArrayEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FloatArrayPropertyEditor.java b/NET/worlds/scape/FloatArrayPropertyEditor.java new file mode 100644 index 0000000..7ac5541 --- /dev/null +++ b/NET/worlds/scape/FloatArrayPropertyEditor.java @@ -0,0 +1,88 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FloatArrayPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private FloatArrayPropertyEditor(Property property) +/* */ { +/* 69 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 74 */ return new FloatArrayEditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 79 */ property.setPropertyType(6); +/* 80 */ return property.setEditor(new FloatArrayPropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FloatArrayPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FloatFieldEditorDialog.java b/NET/worlds/scape/FloatFieldEditorDialog.java new file mode 100644 index 0000000..9a20e2b --- /dev/null +++ b/NET/worlds/scape/FloatFieldEditorDialog.java @@ -0,0 +1,60 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class FloatFieldEditorDialog +/* */ extends FieldEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ Property property; +/* */ +/* */ +/* */ +/* */ +/* */ FloatPropertyEditor limits; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ FloatFieldEditorDialog(EditTile parent, String title, Property property, FloatPropertyEditor limits) +/* */ { +/* 28 */ super(parent, title); +/* 29 */ this.property = property; +/* 30 */ this.limits = limits; +/* 31 */ ready(); +/* */ } +/* */ +/* */ protected String getValue() +/* */ { +/* 36 */ return (String)this.property.get(); +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 41 */ if (text.length() != 0) { +/* */ try { +/* 43 */ Float val = Float.valueOf(text); +/* 44 */ if ((!this.limits.rangeLimits) || ( +/* 45 */ (val.floatValue() >= this.limits.minVal) && +/* 46 */ (val.floatValue() <= this.limits.maxVal))) { +/* 47 */ this.parent.addUndoableSet(this.property, val); +/* 48 */ return true; +/* */ } +/* */ } catch (NumberFormatException localNumberFormatException) {} +/* */ } +/* 52 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FloatFieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FloatPropertyEditor.java b/NET/worlds/scape/FloatPropertyEditor.java new file mode 100644 index 0000000..6bcd184 --- /dev/null +++ b/NET/worlds/scape/FloatPropertyEditor.java @@ -0,0 +1,97 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FloatPropertyEditor +/* */ extends PropEditor +/* */ { +/* 57 */ boolean rangeLimits = false; +/* */ float minVal; +/* */ float maxVal; +/* */ +/* */ private FloatPropertyEditor(Property property) +/* */ { +/* 63 */ super(property); +/* */ } +/* */ +/* */ private FloatPropertyEditor(Property property, float minVal, float maxVal) +/* */ { +/* 68 */ super(property); +/* 69 */ this.rangeLimits = true; +/* 70 */ this.minVal = minVal; +/* 71 */ this.maxVal = maxVal; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 76 */ return new FloatFieldEditorDialog(parent, title, this.property, this); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 81 */ property.setPropertyType(2); +/* 82 */ return property.setEditor(new FloatPropertyEditor(property)); +/* */ } +/* */ +/* */ public static Property make(Property property, float minVal, float maxVal) +/* */ { +/* 87 */ property.setPropertyType(2); +/* 88 */ return property.setEditor(new FloatPropertyEditor(property, minVal, +/* 89 */ maxVal)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FloatPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FloorPatch.java b/NET/worlds/scape/FloorPatch.java new file mode 100644 index 0000000..18d517f --- /dev/null +++ b/NET/worlds/scape/FloorPatch.java @@ -0,0 +1,16 @@ +package NET.worlds.scape; + +public abstract interface FloorPatch +{ + public abstract boolean inPatch(float paramFloat1, float paramFloat2); + + public abstract float floorHeight(float paramFloat1, float paramFloat2); + + public abstract Point3 surfaceNormal(float paramFloat1, float paramFloat2); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FloorPatch.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ForwardAttribute.java b/NET/worlds/scape/ForwardAttribute.java new file mode 100644 index 0000000..ce58976 --- /dev/null +++ b/NET/worlds/scape/ForwardAttribute.java @@ -0,0 +1,115 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ForwardAttribute +/* */ extends Attribute +/* */ implements NonPersister +/* */ { +/* */ private Attribute _from; +/* */ +/* */ ForwardAttribute(Attribute forwarder, int attrID) +/* */ { +/* 47 */ super(attrID); +/* 48 */ this._from = forwarder; +/* */ } +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 54 */ WObject w = (WObject)owner.getOwner(); +/* 55 */ if ((w.getSharer().getMode() & 0x1) != 0) { +/* 56 */ throw new ClassCastException("Must forward to unforwarded object"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 64 */ super.detach(); +/* */ +/* 66 */ this._from.unforward(); +/* */ } +/* */ +/* */ +/* */ public int getFlags() +/* */ { +/* 72 */ return this._from.getFlags(); +/* */ } +/* */ +/* */ public void setFlag(int flag, boolean onoff) +/* */ { +/* 77 */ this._from.setFlag(flag, onoff); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void generateNetData(DataOutputStream s) +/* */ throws IOException +/* */ { +/* 86 */ this._from.generateNetData(s); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 91 */ this._from.setFromNetData(ds, len); +/* */ +/* */ +/* 94 */ ValueEvent e = new ValueEvent(Std.getFastTime(), +/* 95 */ this._from.getOwner(), (WObject)this._from.getOwner().getOwner(), this._from); +/* 96 */ this._from.trigger(e); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 101 */ return super.toString() + "[forwarded from " + this._from.getName() + "]"; +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 107 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ForwardAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FrameEvent.java b/NET/worlds/scape/FrameEvent.java new file mode 100644 index 0000000..00cd9f3 --- /dev/null +++ b/NET/worlds/scape/FrameEvent.java @@ -0,0 +1,113 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FrameEvent +/* */ extends Event +/* */ { +/* */ private static int lastFrameTime; +/* */ private static int deltaFrameTime; +/* */ +/* */ public FrameEvent(WObject target) +/* */ { +/* 30 */ super(lastFrameTime, null, target); +/* */ } +/* */ +/* */ public FrameEvent(WObject source, WObject target) +/* */ { +/* 35 */ super(lastFrameTime, source, target); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void newFrameTime() +/* */ { +/* 54 */ this.time = Std.getRealTime(); +/* */ +/* 56 */ if (lastFrameTime == 0) { +/* 57 */ deltaFrameTime = 0; +/* */ } +/* */ else { +/* 60 */ deltaFrameTime = this.time - lastFrameTime; +/* 61 */ assert ((this.time >= lastFrameTime) && (deltaFrameTime >= 0)); +/* */ } +/* */ +/* 64 */ lastFrameTime = this.time; +/* 65 */ this.dt = deltaFrameTime; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 72 */ public int dt = deltaFrameTime; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 87 */ if (((o instanceof FrameHandler)) && +/* 88 */ (((FrameHandler)o).handle(this))) { +/* 89 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 94 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void retargetAndDeliver(FrameHandler h, WObject o) +/* */ { +/* 103 */ this.target = o; +/* 104 */ this.receiver = o; +/* 105 */ h.handle(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FrameEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FrameHandler.java b/NET/worlds/scape/FrameHandler.java new file mode 100644 index 0000000..5e846f1 --- /dev/null +++ b/NET/worlds/scape/FrameHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface FrameHandler +{ + public abstract boolean handle(FrameEvent paramFrameEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FrameHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/FrameSensor.java b/NET/worlds/scape/FrameSensor.java new file mode 100644 index 0000000..05ef7c7 --- /dev/null +++ b/NET/worlds/scape/FrameSensor.java @@ -0,0 +1,45 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class FrameSensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* */ public FrameSensor(Action a) +/* */ { +/* 25 */ if (a != null) { +/* 26 */ addAction(a); +/* */ } +/* */ } +/* */ +/* */ +/* */ public FrameSensor() {} +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 36 */ trigger(e); +/* 37 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\FrameSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/GravityAction.java b/NET/worlds/scape/GravityAction.java new file mode 100644 index 0000000..d5af521 --- /dev/null +++ b/NET/worlds/scape/GravityAction.java @@ -0,0 +1,241 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class GravityAction +/* */ extends Action +/* */ { +/* 20 */ public float cycleTime = 0.0F; +/* */ int startTime; +/* 22 */ public int force = 300; +/* 23 */ public float xDest = 0.0F; +/* 24 */ public float yDest = 0.0F; +/* 25 */ public float zDest = 0.0F; +/* */ +/* */ static final float epsilon = 2.0F; +/* */ int lastFrameTime; +/* 29 */ float initialDistance = 0.0F; +/* */ +/* */ Point3 initialPoint; +/* 32 */ protected boolean gravityEnd = true; +/* */ +/* */ +/* */ +/* */ public void startGravity() +/* */ { +/* 38 */ this.startTime = Std.getRealTime(); +/* */ +/* 40 */ this.gravityEnd = false; +/* 41 */ this.lastFrameTime = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ private float distance(float tx, float ty, float tz, float cx, float cy, float cz) +/* */ { +/* 48 */ float dx = tx - cx; +/* 49 */ float dy = ty - cy; +/* 50 */ float dz = tz - cz; +/* */ +/* 52 */ float dist = (float)Math.sqrt(dx * dx + dy * dy + dz * dz); +/* */ +/* 54 */ return dist; +/* */ } +/* */ +/* */ public void doGravity(Pilot pilotObject, WObject o) +/* */ { +/* 59 */ int currentFrameTime = Std.getRealTime(); +/* */ +/* 61 */ float r = distance(pilotObject.getX(), pilotObject.getY(), +/* 62 */ pilotObject.getZ(), o.getX(), o.getY(), o.getZ()); +/* 63 */ if (this.lastFrameTime == 0) { +/* 64 */ this.lastFrameTime = currentFrameTime; +/* */ } +/* 66 */ float distanceTraveled = distance(this.initialPoint.x, this.initialPoint.y, +/* 67 */ this.initialPoint.z, pilotObject.getX(), pilotObject.getY(), +/* 68 */ pilotObject.getZ()); +/* */ +/* */ +/* */ +/* */ +/* 73 */ this.initialDistance = distance(this.initialPoint.x, this.initialPoint.y, +/* 74 */ this.initialPoint.z, o.getX(), o.getY(), o.getZ()); +/* */ +/* 76 */ if ((r > 2.0F) && (distanceTraveled <= this.initialDistance)) { +/* 77 */ float dx = o.getX() - pilotObject.getX(); +/* 78 */ if (dx != 0.0D) { +/* 79 */ float new_dx = (currentFrameTime - this.lastFrameTime) * this.force * dx / ( +/* 80 */ r * r); +/* 81 */ if (Math.abs(new_dx) < Math.abs(dx)) { +/* 82 */ dx = new_dx; +/* */ } +/* */ } +/* 85 */ float dy = o.getY() - pilotObject.getY(); +/* 86 */ if (dy != 0.0D) { +/* 87 */ float new_dy = (currentFrameTime - this.lastFrameTime) * this.force * dy / ( +/* 88 */ r * r); +/* 89 */ if (Math.abs(new_dy) < Math.abs(dy)) { +/* 90 */ dy = new_dy; +/* */ } +/* */ } +/* 93 */ float dz = o.getZ() - pilotObject.getZ(); +/* 94 */ if (dz != 0.0D) { +/* 95 */ float new_dz = (currentFrameTime - this.lastFrameTime) * this.force * dz / ( +/* 96 */ r * r); +/* 97 */ if (Math.abs(new_dz) < Math.abs(dz)) { +/* 98 */ dz = new_dz; +/* */ } +/* */ } +/* */ +/* 102 */ pilotObject.moveBy(dx, dy, dz); +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 108 */ pilotObject.moveTo(o.getX(), o.getY(), o.getZ()); +/* 109 */ this.gravityEnd = true; +/* */ } +/* */ +/* 112 */ this.lastFrameTime = currentFrameTime; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 117 */ Object owner = getOwner(); +/* 118 */ if ((owner == null) || (!(owner instanceof WObject))) { +/* 119 */ return null; +/* */ } +/* 121 */ WObject o = (WObject)owner; +/* */ +/* 123 */ Pilot pilot = Pilot.getActive(); +/* 124 */ if (pilot == null) { +/* 125 */ return null; +/* */ } +/* */ +/* 128 */ if (pilot.getRoom() != o.getRoom()) { +/* 129 */ if ((this.gravityEnd) && ((pilot instanceof HoloPilot))) { +/* 130 */ HoloPilot hp = (HoloPilot)pilot; +/* 131 */ hp.returnSmoothDriver(); +/* */ } +/* 133 */ return null; +/* */ } +/* */ +/* 136 */ if (this.gravityEnd) { +/* 137 */ startGravity(); +/* 138 */ if ((pilot instanceof HoloPilot)) { +/* 139 */ HoloPilot hp = (HoloPilot)pilot; +/* 140 */ hp.removeSmoothDriver(); +/* */ +/* 142 */ this.initialPoint = new Point3(pilot.getPosition()); +/* 143 */ this.initialDistance = distance(this.initialPoint.x, this.initialPoint.y, +/* 144 */ this.initialPoint.z, o.getX(), o.getY(), o.getZ()); +/* */ } +/* */ } +/* */ +/* */ +/* 149 */ doGravity(pilot, o); +/* */ +/* 151 */ if (this.gravityEnd) { +/* 152 */ if ((pilot instanceof HoloPilot)) { +/* 153 */ HoloPilot hp = (HoloPilot)pilot; +/* 154 */ hp.returnSmoothDriver(); +/* */ } +/* 156 */ return null; +/* */ } +/* */ +/* 159 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 168 */ Object ret = null; +/* 169 */ switch (index - offset) { +/* */ case 0: +/* 171 */ if (mode == 0) { +/* 172 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 173 */ "Force")); +/* 174 */ } else if (mode == 1) { +/* 175 */ ret = new Integer(this.force); +/* 176 */ } else if (mode == 2) +/* 177 */ this.force = ((Integer)value).intValue(); +/* 178 */ break; +/* */ default: +/* 180 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 182 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 187 */ return super.toString() + "[Force " + this.force + "]"; +/* */ } +/* */ +/* 190 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 194 */ s.saveVersion(4, classCookie); +/* 195 */ super.saveState(s); +/* 196 */ s.saveInt(this.force); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 201 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 203 */ super.restoreState(r); +/* 204 */ r.restore(); +/* 205 */ this.cycleTime = r.restoreFloat(); +/* 206 */ this.force = r.restoreInt(); +/* 207 */ break; +/* */ case 1: +/* 209 */ super.restoreState(r); +/* 210 */ this.cycleTime = r.restoreFloat(); +/* 211 */ this.force = r.restoreInt(); +/* 212 */ break; +/* */ case 2: +/* 214 */ super.restoreState(r); +/* 215 */ this.cycleTime = r.restoreFloat(); +/* 216 */ this.force = r.restoreInt(); +/* 217 */ this.xDest = r.restoreFloat(); +/* 218 */ this.yDest = r.restoreFloat(); +/* 219 */ break; +/* */ case 3: +/* 221 */ super.restoreState(r); +/* 222 */ this.force = r.restoreInt(); +/* 223 */ this.xDest = r.restoreFloat(); +/* 224 */ this.yDest = r.restoreFloat(); +/* 225 */ this.zDest = r.restoreFloat(); +/* 226 */ break; +/* */ case 4: +/* 228 */ super.restoreState(r); +/* 229 */ this.force = r.restoreInt(); +/* 230 */ break; +/* */ default: +/* 232 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\GravityAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HTransWidget.java b/NET/worlds/scape/HTransWidget.java new file mode 100644 index 0000000..b23544f --- /dev/null +++ b/NET/worlds/scape/HTransWidget.java @@ -0,0 +1,44 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.SnapTool; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class HTransWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public HTransWidget(ToolBar toolbar) +/* */ { +/* 25 */ super(toolbar, "htrans.gif", Console.message("Move-horiz")); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 30 */ Transform t = Transform.make(); +/* 31 */ applyWorldTransform(initialDrag, +/* 32 */ t.moveBy(SnapTool.snapTool().snapTo( +/* 33 */ getWorldAxis(1, 0, 0).times(deltax).plus( +/* 34 */ getWorldAxis(0, 1, 0).times(deltay))))); +/* 35 */ t.recycle(); +/* 36 */ return getWObject().getPosition(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HTransWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Handler.java b/NET/worlds/scape/Handler.java new file mode 100644 index 0000000..fb214cd --- /dev/null +++ b/NET/worlds/scape/Handler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface Handler +{ + public abstract boolean handle(Event paramEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Handler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HandsOffDriver.java b/NET/worlds/scape/HandsOffDriver.java new file mode 100644 index 0000000..4fba3f2 --- /dev/null +++ b/NET/worlds/scape/HandsOffDriver.java @@ -0,0 +1,251 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ public class HandsOffDriver +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, AnimatedActionHandler, KeyDownHandler, KeyUpHandler +/* */ { +/* */ Point2 _destPoint; +/* */ float _destYaw; +/* */ float _velocity; +/* 15 */ int _lastFrameTime = 0; +/* */ AnimatedActionHandlerImp handler; +/* 17 */ int _state = 0; +/* 18 */ Transform target = null; +/* 19 */ float cameraPan = 0.0F; +/* 20 */ float cameraZoom = 0.0F; +/* 21 */ int cameraPanning = 0; +/* 22 */ int cameraZooming = 0; +/* */ +/* */ static final float cameraPanRate = 45.0F; +/* */ +/* */ static final float cameraZoomRate = 100.0F; +/* */ +/* */ static final int noState = 0; +/* */ static final int turnToDestination = 1; +/* */ static final int moveToDestination = 2; +/* */ static final int faceDestination = 3; +/* */ +/* */ public HandsOffDriver() +/* */ { +/* 35 */ this.handler = new AnimatedActionHandlerImp(); +/* */ } +/* */ +/* 38 */ public float getCameraPan() { return this.cameraPan; } +/* 39 */ public float getCameraZoom() { return this.cameraZoom; } +/* */ +/* */ +/* */ public void setTarget(Transform t) +/* */ { +/* 44 */ this.target = t; +/* */ } +/* */ +/* */ public void addCallback(AnimatedActionCallback c) +/* */ { +/* 49 */ this.handler.addCallback(c); +/* */ } +/* */ +/* */ public void removeCallback(AnimatedActionCallback c) +/* */ { +/* 54 */ this.handler.removeCallback(c); +/* */ } +/* */ +/* */ public void notifyCallbacks(int completionCode) +/* */ { +/* 59 */ this.handler.notifyCallbacks(completionCode); +/* */ } +/* */ +/* */ +/* */ public void setDestPos(Point2 point, float yaw, float velocity) +/* */ { +/* 65 */ if (point == null) { +/* 66 */ System.out.println("Point is null"); +/* */ } +/* 68 */ this._destPoint = point; +/* 69 */ this._destYaw = yaw; +/* 70 */ this._velocity = velocity; +/* 71 */ this._state = 1; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 80 */ int now = e.time; +/* 81 */ float dt = (now - this._lastFrameTime) / 1000.0F; +/* 82 */ this._lastFrameTime = now; +/* */ +/* 84 */ this.cameraZoom += dt * 100.0F * this.cameraZooming; +/* 85 */ this.cameraPan += dt * 45.0F * this.cameraPanning; +/* */ +/* */ Transform tgt; +/* */ Transform tgt; +/* 89 */ if (this.target == null) +/* */ { +/* 91 */ if (!(e.receiver instanceof Pilot)) +/* */ { +/* 93 */ System.out.println("Receiver not pilot..."); +/* 94 */ return true; +/* */ } +/* */ +/* 97 */ Pilot pilot = (Pilot)e.receiver; +/* 98 */ if (!pilot.isActive()) +/* */ { +/* 100 */ System.out.println("Pilot not active..."); +/* 101 */ return true; +/* */ } +/* 103 */ tgt = pilot; +/* */ } +/* */ else +/* */ { +/* 107 */ tgt = this.target; +/* */ } +/* */ +/* 110 */ if (dt <= 0.0F) +/* */ { +/* 112 */ System.out.println("Negative dt"); +/* 113 */ return true; +/* */ } +/* */ +/* 116 */ if (dt > 0.33F) { dt = 0.33F; +/* */ } +/* 118 */ moveObject(tgt, dt); +/* */ +/* 120 */ return true; +/* */ } +/* */ +/* */ private void yawLevel(Transform pilot, float theta) +/* */ { +/* 125 */ float currentYaw = pilot.getYaw(); +/* 126 */ Point3Temp currentSpinAxis = Point3Temp.make(); +/* 127 */ float currentSpin = pilot.getSpin(currentSpinAxis); +/* 128 */ Point3Temp currentPosition = pilot.getPosition(); +/* */ +/* 130 */ pilot.makeIdentity() +/* 131 */ .moveTo(currentPosition) +/* 132 */ .yaw(-theta); +/* */ +/* 134 */ pilot.yaw(currentYaw); +/* 135 */ pilot.spin(currentSpinAxis, currentSpin); +/* */ } +/* */ +/* */ private void moveObject(Transform pilot, float dt) +/* */ { +/* 140 */ if ((pilot == null) || (this._destPoint == null)) +/* */ { +/* */ +/* 143 */ return; +/* */ } +/* */ +/* 146 */ switch (this._state) +/* */ { +/* */ +/* */ case 1: +/* 150 */ Point3Temp dest = Point3Temp.make(this._destPoint.x, +/* 151 */ this._destPoint.y, pilot.getZ()); +/* 152 */ Point3Temp src = pilot.getPosition(); +/* */ +/* 154 */ double destYaw = Math.atan2(dest.y - src.y, dest.x - src.x); +/* */ +/* */ +/* */ +/* 158 */ destYaw = 1.5707963267948966D - destYaw; +/* */ +/* 160 */ destYaw *= 57.29577951308232D; +/* */ +/* 162 */ yawLevel(pilot, (float)destYaw); +/* */ +/* 164 */ this._state = 2; +/* */ +/* 166 */ break; +/* */ +/* */ +/* */ +/* */ case 2: +/* 171 */ Point3Temp dest = Point3Temp.make(this._destPoint.x, +/* 172 */ this._destPoint.y, pilot.getZ()); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 178 */ float cm = dt * this._velocity; +/* */ +/* 180 */ Point3Temp dP = Point3Temp.make(dest); +/* 181 */ dP.minus(pilot.getPosition()); +/* */ +/* 183 */ if (dP.length() <= cm) +/* */ { +/* */ +/* 186 */ pilot.moveTo(dest); +/* 187 */ this._state = 3; +/* */ } +/* */ else +/* */ { +/* 191 */ dP.normalize(); +/* */ +/* 193 */ pilot.moveBy(dP.times(cm)); +/* */ } +/* 195 */ break; +/* */ +/* */ +/* */ +/* */ case 3: +/* 200 */ yawLevel(pilot, this._destYaw); +/* 201 */ this._state = 0; +/* 202 */ notifyCallbacks(0); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ public boolean handle(KeyDownEvent e) +/* */ { +/* 210 */ if (e.key == 58150) +/* */ { +/* 212 */ this.cameraZooming = -1; +/* */ } +/* 214 */ else if (e.key == 58152) +/* */ { +/* 216 */ this.cameraZooming = 1; +/* */ } +/* 218 */ else if (e.key == 58149) +/* */ { +/* 220 */ this.cameraPanning = -1; +/* */ } +/* 222 */ else if (e.key == 58151) +/* */ { +/* 224 */ this.cameraPanning = 1; +/* */ } +/* 226 */ return true; +/* */ } +/* */ +/* */ public boolean handle(KeyUpEvent e) +/* */ { +/* 231 */ if ((e.key == 58150) || (e.key == 58152)) +/* */ { +/* 233 */ this.cameraZooming = 0; +/* */ } +/* 235 */ else if ((e.key == 58149) || (e.key == 58151)) +/* */ { +/* 237 */ this.cameraPanning = 0; +/* */ } +/* 239 */ else if (e.key == 58139) +/* */ { +/* 241 */ notifyCallbacks(0); +/* */ } +/* 243 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HandsOffDriver.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HighJump.java b/NET/worlds/scape/HighJump.java new file mode 100644 index 0000000..3e81b76 --- /dev/null +++ b/NET/worlds/scape/HighJump.java @@ -0,0 +1,97 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.core.Std; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HighJump +/* */ extends InventoryAction +/* */ implements MainCallback +/* */ { +/* */ int start; +/* */ SmoothDriver sd; +/* */ +/* */ public HighJump(String id, String name) +/* */ { +/* 25 */ super(id, name); +/* */ } +/* */ +/* */ public HighJump(String id, String name, int qty) +/* */ { +/* 30 */ super(id, name, qty); +/* */ } +/* */ +/* */ public HighJump(HighJump in) +/* */ { +/* 35 */ super(in); +/* */ } +/* */ +/* */ public InventoryItem cloneItem() +/* */ { +/* 40 */ return new HighJump(this); +/* */ } +/* */ +/* */ private SmoothDriver findSD(Pilot p) +/* */ { +/* 45 */ for (Enumeration e = p.getHandlers(); e.hasMoreElements();) +/* */ { +/* 47 */ Object o = e.nextElement(); +/* 48 */ if ((o instanceof SmoothDriver)) { +/* 49 */ return (SmoothDriver)o; +/* */ } +/* */ } +/* 52 */ return null; +/* */ } +/* */ +/* */ public boolean doAction() +/* */ { +/* 57 */ if (this.itemQuantity_ > 0) +/* */ { +/* 59 */ Pilot p = Pilot.getActive(); +/* 60 */ if (p == null) { +/* 61 */ return false; +/* */ } +/* */ +/* 64 */ this.sd = findSD(p); +/* 65 */ if (this.sd == null) +/* 66 */ return false; +/* 67 */ if (this.sd != null) { +/* 68 */ Main.register(this); +/* 69 */ this.start = Std.getRealTime(); +/* 70 */ this.itemQuantity_ -= 1; +/* */ } +/* 72 */ return true; +/* */ } +/* 74 */ return false; +/* */ } +/* */ +/* */ public void mainCallback() +/* */ { +/* 79 */ int now = Std.getFastTime(); +/* 80 */ if (now > this.start + 6000) +/* */ { +/* 82 */ Main.unregister(this); +/* 83 */ this.sd.setEyeHeight(150.0F); +/* */ } +/* */ else +/* */ { +/* 87 */ float t = 1.0F - (float)Math.pow(1.0F - (now - this.start) / 3000.0F, 4.0D); +/* 88 */ this.sd.setEyeHeight(150.0F + 150.0F * t); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HighJump.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HoloCallback.java b/NET/worlds/scape/HoloCallback.java new file mode 100644 index 0000000..161e5ea --- /dev/null +++ b/NET/worlds/scape/HoloCallback.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface HoloCallback +{ + public abstract void holoCallback(Hologram paramHologram, boolean paramBoolean); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HoloCallback.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HoloDrone.java b/NET/worlds/scape/HoloDrone.java new file mode 100644 index 0000000..6c9acdc --- /dev/null +++ b/NET/worlds/scape/HoloDrone.java @@ -0,0 +1,444 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.core.ServerTableManager; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HoloDrone +/* */ extends Drone +/* */ implements HoloCallback +/* */ { +/* */ private WObject _avatar; +/* 59 */ private WObject _realAvatar = null; +/* */ +/* */ +/* 62 */ private boolean _isConstructing = false; +/* */ +/* */ +/* */ +/* */ +/* 67 */ private Hologram _proxyHCnewImage = null; +/* 68 */ private boolean _proxyHCok = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static int _debugLevel; +/* */ +/* */ +/* */ +/* */ +/* 79 */ private boolean permitAnyAvatar = IniFile.gamma().getIniInt( +/* 80 */ "permitAnyAvatar", 0) != 0; +/* */ +/* */ +/* */ private static String[] permittedList; +/* */ +/* */ +/* */ private static String[] humanList; +/* */ +/* */ private static Hashtable permittedHash; +/* */ +/* */ private static Hashtable humanHash; +/* */ +/* */ +/* */ public HoloDrone(ObjID objID, WorldServer serv) +/* */ { +/* 95 */ super(objID, serv); +/* */ +/* 97 */ assert (Main.isMainThread()); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 105 */ if (this._proxyHCnewImage != null) { +/* 106 */ holoCallback(this._proxyHCnewImage, this._proxyHCok); +/* 107 */ this._proxyHCnewImage = null; +/* */ } +/* */ } +/* */ +/* */ static +/* */ { +/* 73 */ _debugLevel = IniFile.gamma().getIniInt("dronedebug", 0); +/* 74 */ if (_debugLevel > 0) { +/* 75 */ System.out.println("DRONE DEBUGGING LEVEL = " + _debugLevel); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 116 */ permittedList = +/* 117 */ ServerTableManager.instance().getTable("permittedHoloList"); +/* */ +/* 119 */ humanList = +/* 120 */ ServerTableManager.instance().getTable("humanHoloList"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 128 */ permittedHash = new Hashtable(); +/* 129 */ humanHash = new Hashtable(); +/* */ +/* */ +/* 132 */ for (int i = 0; i < permittedList.length; i += 2) { +/* 133 */ if (permittedList[(i + 1)] != null) { +/* 134 */ permittedHash.put(permittedList[i], permittedList[(i + 1)]); +/* */ } else { +/* 136 */ permittedHash.put(permittedList[i], permittedList); +/* */ } +/* */ } +/* 139 */ for (int i = 0; i < humanList.length; i++) +/* 140 */ humanHash.put(humanList[i], humanList[i]); +/* */ } +/* */ +/* */ public static String[] getPermittedList() { +/* 144 */ String[] result = new String[permittedList.length / 2]; +/* */ +/* 146 */ for (int i = 0; i < result.length; i++) { +/* 147 */ result[i] = permittedList[(2 * i)]; +/* */ } +/* 149 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ static URL permission(URL url) +/* */ { +/* 157 */ String name = url.getAbsolute().toLowerCase(); +/* 158 */ if ((!name.startsWith("avatar:")) || (!name.endsWith(".mov"))) { +/* 159 */ return null; +/* */ } +/* 161 */ name = name.substring(7, name.length() - 4); +/* 162 */ Object newName = permittedHash.get(name); +/* 163 */ if (newName == null) { +/* 164 */ return null; +/* */ } +/* 166 */ if ((newName instanceof String)) { +/* 167 */ return URL.make((String)newName); +/* */ } +/* 169 */ return url; +/* */ } +/* */ +/* */ +/* */ public static URL getHuman(URL url) +/* */ { +/* 175 */ if (!url.endsWith(".mov")) { +/* 176 */ return PosableShape.getHuman(url); +/* */ } +/* 178 */ if (permission(url) == null) { +/* 179 */ return URL.make("avatar:holden.mov"); +/* */ } +/* */ +/* */ +/* 183 */ String s = url.getAbsolute().toLowerCase(); +/* 184 */ int len = s.length(); +/* 185 */ for (int i = 7; i < len; i++) { +/* 186 */ if ("0123456789.".indexOf(s.charAt(i)) >= 0) { +/* 187 */ if (humanHash.get(s.substring(7, i)) != null) +/* 188 */ return url; +/* 189 */ return URL.make(IniFile.override().getIniString( +/* 190 */ "defaultHumanAv", "avatar:holden.mov")); +/* */ } +/* */ } +/* 193 */ return url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Drone setAvatarNow(URL url) +/* */ { +/* 202 */ if ((!shouldBeMuted()) && (url.endsWith(".mov"))) +/* */ { +/* */ +/* 205 */ if (shouldBeForcedHuman()) { +/* 206 */ url = getHuman(url); +/* */ } +/* 208 */ url = PosableShape.getPermitted(url, getWorld()); +/* */ +/* 210 */ if (url.equals(getSourceURL())) +/* 211 */ return this; +/* 212 */ setSourceURL(url); +/* */ +/* 214 */ URL replacementURL = permission(url); +/* 215 */ if (replacementURL != null) { +/* 216 */ url = replacementURL; +/* 217 */ } else if (!this.permitAnyAvatar) { +/* 218 */ url = Console.getDefaultURL(); +/* */ } +/* */ +/* */ +/* 222 */ this._realAvatar = makeAvatar(url); +/* */ +/* */ +/* 225 */ if (this._proxyHCnewImage != null) +/* */ { +/* 227 */ if ((_debugLevel & 0x1) > 0) { +/* 228 */ System.out.println("Holo.stAvNow(" + url + +/* 229 */ "): doing proxy"); +/* */ } +/* 231 */ holoCallback(this._proxyHCnewImage, this._proxyHCok); +/* 232 */ this._proxyHCnewImage = null; +/* */ } +/* */ +/* 235 */ return this; +/* */ } +/* 237 */ return super.setAvatarNow(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject makeAvatar(URL url) +/* */ { +/* 247 */ if ((_debugLevel & 0x1) > 0) { +/* 248 */ System.out.println("HoloDrone.makeAvatar(" + url + ")"); +/* */ } +/* 250 */ this._isConstructing = true; +/* 251 */ WObject bgAvatar = new Hologram(url, this); +/* 252 */ this._isConstructing = false; +/* 253 */ bgAvatar.setVisible(true); +/* 254 */ bgAvatar.setBumpable(false); +/* 255 */ return bgAvatar; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void holoCallback(Hologram newImage, boolean ok) +/* */ { +/* 266 */ if ((_debugLevel & 0x1) > 0) { +/* 267 */ System.out.println("HoloDrone.holoCallback(" + +/* 268 */ newImage + "," + ok + ")"); +/* */ } +/* */ +/* 271 */ if (this._isConstructing) +/* */ { +/* 273 */ assert (this._proxyHCnewImage == null); +/* 274 */ this._proxyHCnewImage = newImage; +/* 275 */ this._proxyHCok = ok; +/* */ +/* 277 */ if ((_debugLevel & 0x1) > 0) { +/* 278 */ System.out.println("holoCallback: requesting proxy"); +/* */ } +/* 280 */ return; +/* */ } +/* */ +/* 283 */ if (this._realAvatar == this._avatar) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 293 */ if ((_debugLevel & 0x1) > 0) { +/* 294 */ System.out.println("holoCb: real avatar already loaded"); +/* */ } +/* 296 */ return; +/* */ } +/* */ +/* */ +/* 300 */ if (!ok) { +/* 301 */ if (newImage == this._realAvatar) { +/* 302 */ this._realAvatar = null; +/* */ } +/* 304 */ if ((_debugLevel & 0x1) > 0) { +/* 305 */ System.out.println("holoCb: not ok"); +/* */ } +/* 307 */ return; +/* */ } +/* */ +/* */ +/* 311 */ if ((_debugLevel & 0x1) > 0) { +/* 312 */ System.out.println("holoCb: swapping avatars"); +/* */ } +/* */ +/* 315 */ if (this._avatar != null) { +/* 316 */ this._avatar.detach(); +/* */ } +/* */ +/* 319 */ float avatarW = newImage.getW(); +/* 320 */ float avatarH = newImage.getH(); +/* */ float factor; +/* 322 */ float factor; if (avatarH < avatarW) { +/* 323 */ factor = (float)Math.sqrt(25600.0F / (avatarW * avatarH)); +/* */ } else { +/* 325 */ factor = 160.0F / avatarH; +/* */ } +/* 327 */ avatarH *= factor; +/* 328 */ avatarW *= factor; +/* 329 */ float heightAdj = 0.0F; +/* 330 */ if (newImage == this._avatar) +/* 331 */ heightAdj = -this._avatar.getZ(); +/* 332 */ this._avatar = +/* 333 */ ((WObject)newImage.scale(factor).raise(avatarH / 2.0F + heightAdj)); +/* 334 */ add(this._avatar); +/* */ +/* 336 */ avatarHeightChangedTo(avatarH); +/* */ } +/* */ +/* */ +/* */ +/* */ public float getMinXYExtent() +/* */ { +/* 343 */ if (this._avatar == null) { +/* 344 */ return 0.0F; +/* */ } +/* 346 */ return this._avatar.getMinXYExtent(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 355 */ Object ret = null; +/* 356 */ (index - offset); +/* */ +/* 358 */ ret = super.properties(index, offset + 0, mode, value); +/* */ +/* 360 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 366 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 370 */ s.saveVersion(0, classCookie); +/* 371 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 376 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 378 */ super.restoreState(r); +/* 379 */ break; +/* */ +/* */ default: +/* 382 */ throw new TooNewException(); +/* */ } +/* */ +/* */ +/* 386 */ for (Enumeration e = getContents(); e.hasMoreElements();) { +/* 387 */ WObject w = (WObject)e.nextElement(); +/* 388 */ if ((w instanceof Hologram)) { +/* 389 */ Hologram h = (Hologram)w; +/* 390 */ if (h.getMovieName() != null) { +/* 391 */ this._avatar = h; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ public HoloDrone() {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HoloDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HoloPilot.java b/NET/worlds/scape/HoloPilot.java new file mode 100644 index 0000000..a96a64c --- /dev/null +++ b/NET/worlds/scape/HoloPilot.java @@ -0,0 +1,956 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HoloPilot +/* */ extends Pilot +/* */ implements AnimatedActionHandler, AnimatedActionCallback +/* */ { +/* */ private Camera cam; +/* */ private SmoothDriver smoothDriver; +/* */ +/* */ public HoloPilot(URL movURL) +/* */ { +/* 69 */ setSourceURL(movURL); +/* */ +/* 71 */ loadInit(); +/* */ } +/* */ +/* */ public void setSleepMode(String mode) +/* */ { +/* 76 */ Drone d = getInternalDrone(); +/* 77 */ if (d != null) { +/* 78 */ d.setSleepMode(mode); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float animate(String action) +/* */ { +/* 87 */ super.animate(action); +/* */ +/* 89 */ Drone d = getInternalDrone(); +/* 90 */ if (d != null) { +/* 91 */ return d.animate(action); +/* */ } +/* 93 */ return 0.0F; +/* */ } +/* */ +/* */ public Vector getAnimationList() +/* */ { +/* 98 */ Vector v = super.getAnimationList(); +/* */ +/* 100 */ Drone d = getInternalDrone(); +/* 101 */ if (d == null) { +/* 102 */ return v; +/* */ } +/* */ +/* */ +/* 106 */ Vector clone = (Vector)d.getAnimationList().clone(); +/* 107 */ Vector v2 = clone; +/* 108 */ for (int i = 0; i < v.size(); i++) { +/* 109 */ v2.addElement((String)v.elementAt(i)); +/* */ } +/* 111 */ return v2; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 122 */ private boolean cameraIsFree = false; +/* */ private AnimatedActionHandlerImp handler; +/* */ +/* */ public HoloPilot() {} +/* */ +/* 127 */ public void loadInit() { this.smoothDriver = new SmoothDriver(); +/* 128 */ this.smoothDriver.setEyeHeight(0.0F); +/* */ +/* 130 */ this.cam = new Camera(); +/* 131 */ add(this.cam); +/* */ +/* 133 */ Drone selfImage = Drone.make(null, null); +/* 134 */ add(selfImage); +/* */ +/* 136 */ selfImage.setAvatarNow(getSourceURL()); +/* */ +/* 138 */ addHandler(this.smoothDriver); +/* 139 */ addHandler(new PitchDriver()); +/* */ +/* 141 */ this.handler = new AnimatedActionHandlerImp(); +/* */ +/* 143 */ setEyeHeight(150.0F); +/* */ } +/* */ +/* */ +/* */ private HandsOffDriver hod; +/* */ String lastName; +/* */ Transform lastInverse; +/* */ public void addCallback(AnimatedActionCallback c) +/* */ { +/* 152 */ assert (this.handler != null); +/* 153 */ this.handler.addCallback(c); +/* */ } +/* */ +/* */ public void removeCallback(AnimatedActionCallback c) +/* */ { +/* 158 */ assert (this.handler != null); +/* 159 */ this.handler.removeCallback(c); +/* */ } +/* */ +/* */ public void notifyCallbacks(int completionCode) +/* */ { +/* 164 */ assert (this.handler != null); +/* 165 */ this.handler.notifyCallbacks(completionCode); +/* */ } +/* */ +/* */ public void walkTo(Point2 destPoint, float destYaw) +/* */ { +/* 170 */ walkTo(destPoint, destYaw, 80.0F); +/* */ } +/* */ +/* */ public void walkTo(Point2 destPoint, float yaw, float velocity) +/* */ { +/* 175 */ removeHandler(this.smoothDriver); +/* 176 */ this.hod = new HandsOffDriver(); +/* 177 */ this.hod.setDestPos(destPoint, yaw, velocity); +/* 178 */ this.hod.addCallback(this); +/* 179 */ addHandler(this.hod); +/* */ } +/* */ +/* */ public void removeSmoothDriver() +/* */ { +/* 184 */ removeHandler(this.smoothDriver); +/* */ } +/* */ +/* */ public void returnSmoothDriver() +/* */ { +/* 189 */ addHandler(this.smoothDriver); +/* */ } +/* */ +/* */ public SmoothDriver getSmoothDriver() +/* */ { +/* 194 */ return this.smoothDriver; +/* */ } +/* */ +/* */ public void removeHandsOffDriver() +/* */ { +/* 199 */ if (this.hod != null) +/* */ { +/* 201 */ removeHandler(this.hod); +/* 202 */ this.hod = null; +/* */ } +/* */ } +/* */ +/* */ public void returnHandsOffDriver() +/* */ { +/* 208 */ if (this.hod == null) +/* */ { +/* 210 */ this.hod = new HandsOffDriver(); +/* 211 */ addHandler(this.hod); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void motionComplete(int completionCode) +/* */ { +/* 218 */ removeHandler(this.hod); +/* 219 */ this.hod = null; +/* 220 */ addHandler(this.smoothDriver); +/* */ +/* 222 */ notifyCallbacks(completionCode); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateName() +/* */ { +/* 231 */ String name = getLongID(); +/* 232 */ if (name == null) +/* 233 */ return; +/* 234 */ if ((this.lastName != null) && (this.lastName.equals(name))) +/* 235 */ return; +/* 236 */ this.lastName = name; +/* */ +/* */ +/* 239 */ Drone d = getInternalDrone(); +/* 240 */ if (d != null) { +/* 241 */ d.setName(name); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public Drone getInternalDrone() +/* */ { +/* 249 */ for (Enumeration e = getContents(); e.hasMoreElements();) +/* */ { +/* 251 */ Object o = e.nextElement(); +/* 252 */ if ((o instanceof Drone)) +/* 253 */ return (Drone)o; +/* */ } +/* 255 */ return null; +/* */ } +/* */ +/* */ +/* */ Point3 lastCamWorldPos; +/* */ float lastCamRadius; +/* */ float lastCamYaw; +/* */ int lastDrawTime; +/* 263 */ int framesSinceMoved = 0; +/* */ Room lastCamRoom; +/* */ +/* */ private void setLastInverse(Transform t) +/* */ { +/* 268 */ if (this.lastInverse != null) +/* 269 */ this.lastInverse.recycle(); +/* 270 */ this.lastInverse = t; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void transferFrom(Pilot old) +/* */ { +/* 280 */ if ((old == null) || (!(old instanceof HoloPilot))) +/* */ { +/* 282 */ super.transferFrom(old); +/* 283 */ return; +/* */ } +/* */ +/* 286 */ HoloPilot o = (HoloPilot)old; +/* */ +/* */ +/* 289 */ setOutsideCameraMode(o.getOutsideCameraMode(), +/* 290 */ o.getOutsideCameraSpeed()); +/* */ +/* 292 */ super.transferFrom(old); +/* */ +/* */ +/* 295 */ if (o.lastCamWorldPos != null) { +/* 296 */ setLastInverse(o.lastInverse.getTransform()); +/* 297 */ this.lastCamWorldPos = new Point3(o.lastCamWorldPos); +/* */ } +/* */ +/* 300 */ this.lastCamRoom = o.lastCamRoom; +/* 301 */ this.lastCamRadius = o.lastCamRadius; +/* 302 */ this.lastCamYaw = o.lastCamYaw; +/* 303 */ this.lastDrawTime = o.lastDrawTime; +/* 304 */ this.framesSinceMoved = o.framesSinceMoved; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void aboutToDraw() +/* */ { +/* 338 */ if ((this.cameraMode == 1) || +/* 339 */ (this.cameraMode == 2)) +/* */ { +/* 341 */ this.lastCamWorldPos = null; +/* 342 */ this.cam.makeIdentity(); +/* 343 */ return; +/* */ } +/* */ +/* 346 */ if (this.cameraIsFree) +/* */ { +/* 348 */ return; +/* */ } +/* */ +/* 351 */ Transform world = getObjectToWorldMatrix(); +/* 352 */ int thisDrawTime = Std.getRealTime(); +/* */ +/* */ +/* */ +/* */ +/* 357 */ Room thisCamRoom = getRoom(); +/* */ +/* 359 */ Transform inv = world.getTransform().invert(); +/* */ float radius; +/* 361 */ float yaw; if ((this.lastCamWorldPos != null) && +/* 362 */ (this.cameraSpeed != 4) && +/* 363 */ (this.cameraMode != 99)) { +/* */ float radius; +/* 365 */ if (thisCamRoom != this.lastCamRoom) +/* */ { +/* */ +/* */ +/* 369 */ float yaw = this.lastCamYaw; +/* 370 */ radius = this.lastCamRadius; +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 376 */ Point3 p = this.lastCamWorldPos; +/* 377 */ p.times(inv); +/* */ +/* 379 */ float radius = (float)Math.sqrt(p.x * p.x + p.y * p.y); +/* */ +/* 381 */ if (radius > this.defaultCameraRadius + 10.0F) { +/* 382 */ radius = this.defaultCameraRadius + 10.0F; +/* */ } +/* 384 */ if (this.cameraSpeed == 3) { +/* 385 */ radius = this.defaultCameraRadius; +/* */ } +/* 387 */ float yaw = (float)(Math.atan2(p.y, p.x) * 180.0D / 3.141592653589793D); +/* */ +/* */ +/* 390 */ this.lastInverse.post(world); +/* 391 */ float yawMove = this.lastInverse.getYaw(); +/* 392 */ if (yawMove > 180.0F) +/* 393 */ yawMove -= 360.0F; +/* 394 */ Point3Temp lip = this.lastInverse.getPosition(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 401 */ if ((this.cameraSpeed != 1) || ( +/* 402 */ (Math.abs(yawMove) < 1.0F) && +/* 403 */ (lip.x * lip.x + lip.y * lip.y < 1.0F))) +/* */ { +/* 405 */ if (++this.framesSinceMoved > 2) +/* */ { +/* 407 */ float dyaw = this.defaultCameraYaw - yaw; +/* 408 */ if (dyaw < -180.0F) { +/* 409 */ dyaw += 360.0F; +/* 410 */ } else if (dyaw > 180.0F) +/* 411 */ dyaw -= 360.0F; +/* 412 */ float drad = this.defaultCameraRadius - radius; +/* 413 */ float dtime = thisDrawTime - this.lastDrawTime; +/* */ +/* */ +/* */ +/* */ +/* 418 */ float maxYawCorrection = 0.04F; +/* 419 */ float maxRadCorrection = 0.03F; +/* */ +/* 421 */ if (Math.abs(dyaw) > 1500.0F * maxYawCorrection) { +/* 422 */ maxYawCorrection *= 1.5F; +/* */ } +/* 424 */ maxYawCorrection *= dtime; +/* 425 */ if (dyaw < -maxYawCorrection) { +/* 426 */ dyaw = -maxYawCorrection; +/* 427 */ } else if (dyaw > maxYawCorrection) { +/* 428 */ dyaw = maxYawCorrection; +/* */ } +/* 430 */ maxRadCorrection *= dtime; +/* 431 */ if (drad < -maxRadCorrection) { +/* 432 */ drad = -maxRadCorrection; +/* 433 */ } else if (drad > maxRadCorrection) { +/* 434 */ drad = maxRadCorrection; +/* */ } +/* 436 */ yaw += dyaw; +/* 437 */ radius += drad; +/* */ +/* 439 */ if (this.cameraSpeed == 3) +/* */ { +/* 441 */ if (yaw > this.defaultCameraYaw + 40.0F) { +/* 442 */ yaw = this.defaultCameraYaw + 40.0F; +/* 443 */ } else if (yaw < this.defaultCameraYaw - 40.0F) +/* 444 */ yaw = this.defaultCameraYaw - 40.0F; +/* */ } +/* */ } +/* */ } else { +/* 448 */ this.framesSinceMoved = 0; +/* */ } +/* */ } +/* */ } +/* */ else { +/* 453 */ this.lastCamWorldPos = new Point3(); +/* 454 */ radius = this.defaultCameraRadius; +/* 455 */ yaw = this.defaultCameraYaw; +/* */ } +/* */ +/* 458 */ setLastInverse(inv); +/* */ +/* 460 */ float hackedZ = this.aimPoint.z; +/* 461 */ float hackedYaw = yaw; +/* 462 */ float hackedRadius = radius; +/* */ +/* */ +/* 465 */ if (this.hod != null) +/* */ { +/* 467 */ hackedYaw += this.hod.getCameraPan(); +/* 468 */ hackedRadius += this.hod.getCameraZoom(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 474 */ if (hackedRadius < this.defaultCameraRadius) +/* */ { +/* 476 */ hackedZ -= (this.defaultCameraRadius - hackedRadius) * this.smoothDriver.getEyeHeight() / this.defaultCameraRadius; +/* */ } +/* */ } +/* */ +/* */ +/* 481 */ this.cam.makeIdentity().post(this.defaultTransform); +/* 482 */ this.cam.moveBy(hackedRadius, 0.0F, 0.0F); +/* 483 */ this.cam.postspin(0.0F, 0.0F, 1.0F, hackedYaw); +/* 484 */ this.cam.moveBy(this.aimPoint.x, this.aimPoint.y, hackedZ); +/* 485 */ this.lastCamRadius = radius; +/* 486 */ this.lastCamYaw = yaw; +/* */ +/* 488 */ double angle = yaw * 3.141592653589793D / 180.0D; +/* 489 */ this.lastCamWorldPos.x = ((float)(radius * Math.cos(angle))); +/* 490 */ this.lastCamWorldPos.y = ((float)(radius * Math.sin(angle))); +/* 491 */ this.lastCamWorldPos.z = 0.0F; +/* */ +/* 493 */ this.lastCamWorldPos.times(world); +/* 494 */ this.lastCamWorldPos.z = 0.0F; +/* 495 */ this.lastDrawTime = thisDrawTime; +/* 496 */ this.lastCamRoom = thisCamRoom; +/* */ +/* 498 */ world.recycle(); +/* */ } +/* */ +/* 501 */ Transform defaultTransform = Transform.make(); +/* 502 */ Point3 aimPoint = new Point3(0.0F, 0.0F, 0.0F); +/* 503 */ float defaultCameraYaw = 0.0F; +/* */ +/* */ +/* 506 */ float defaultCameraRadius = 0.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_VEHICLE = 99; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_FIRST_PERSON = 1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_LOW_FIRST_PERSON = 2; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_WAIST = 3; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_SHOULDER = 4; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_HEAD = 5; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_OVERHEAD = 6; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_BEHIND = 7; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_WIDESHOT = 8; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_MODE_ORTHOGRAPHIC = 9; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_SPEED_SLOW = 1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_SPEED_MEDIUM = 2; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_SPEED_FAST = 3; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int CAM_SPEED_LOCKED = 4; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setOutsideCameraMode(int camMode, int camSpeed) +/* */ { +/* 630 */ this.defaultTransform.makeIdentity(); +/* 631 */ this.aimPoint.x = 0.0F; +/* 632 */ this.aimPoint.y = 0.0F; +/* 633 */ this.aimPoint.z = 0.0F; +/* 634 */ setEyeHeight(150.0F); +/* */ +/* */ +/* 637 */ if ((getInternalDrone() != null) && +/* 638 */ ((getInternalDrone() instanceof PosableDrone))) +/* */ { +/* 640 */ PosableShape ps = ((PosableDrone)getInternalDrone()) +/* 641 */ .getInternalPosableShape(); +/* 642 */ if ((ps != null) && ((ps instanceof VehicleShape))) +/* */ { +/* 644 */ VehicleShape vs = (VehicleShape)ps; +/* 645 */ if (vs.fixedCamera) +/* */ { +/* */ +/* */ +/* */ +/* 650 */ this.defaultTransform.moveTo(vs.camX, vs.camY, vs.camZ).postspin(1.0F, 0.0F, 0.0F, vs.camRoll).postspin(0.0F, 1.0F, 0.0F, vs.camYaw).postspin(0.0F, 0.0F, 1.0F, vs.camPitch); +/* 651 */ this.aimPoint.x = vs.camAimX; +/* 652 */ this.aimPoint.y = vs.camAimY; +/* 653 */ this.aimPoint.z = vs.camAimZ; +/* 654 */ setEyeHeight(vs.eyeHeight); +/* 655 */ camMode = 99; +/* */ } +/* */ } +/* */ } +/* */ +/* 660 */ this.cam.setAlwaysClearBackground(false); +/* 661 */ this.cam.setBumpable(true); +/* */ +/* */ +/* 664 */ switch (camMode) +/* */ { +/* */ +/* */ case 3: +/* 668 */ this.defaultTransform.moveTo(0.0F, -120.0F, -60.0F).postspin(1.0F, 0.0F, 0.0F, -10.0F).postspin(0.0F, 0.0F, 1.0F, 30.0F); +/* 669 */ this.aimPoint.x = 15.0F; +/* 670 */ this.aimPoint.z = -10.0F; +/* 671 */ break; +/* */ +/* */ case 4: +/* 674 */ this.defaultTransform.moveTo(0.0F, -140.0F, -40.0F).postspin(1.0F, 0.0F, 0.0F, -10.0F).postspin(0.0F, 0.0F, 1.0F, 15.0F); +/* 675 */ this.aimPoint.x = 15.0F; +/* 676 */ this.aimPoint.z = 10.0F; +/* 677 */ break; +/* */ +/* */ case 5: +/* 680 */ this.defaultTransform.moveTo(0.0F, -140.0F, 0.0F).postspin(1.0F, 0.0F, 0.0F, -10.0F).postspin(0.0F, 0.0F, 1.0F, 15.0F); +/* 681 */ this.aimPoint.x = 15.0F; +/* 682 */ this.aimPoint.z = 10.0F; +/* 683 */ break; +/* */ +/* */ case 6: +/* 686 */ this.defaultTransform.moveTo(0.0F, -100.0F, 0.0F).postspin(1.0F, 0.0F, 0.0F, -30.0F).postspin(0.0F, 0.0F, 1.0F, 30.0F); +/* 687 */ this.aimPoint.x = 15.0F; +/* 688 */ this.aimPoint.z = 10.0F; +/* 689 */ break; +/* */ case 7: +/* 691 */ this.defaultTransform.moveTo(0.0F, -140.0F, 0.0F).postspin(1.0F, 0.0F, 0.0F, -10.0F); +/* 692 */ break; +/* */ +/* */ case 8: +/* 695 */ this.defaultTransform.moveTo(0.0F, -220.0F, -40.0F).postspin(1.0F, 0.0F, 0.0F, -30.0F).postspin(0.0F, 0.0F, 1.0F, 30.0F); +/* 696 */ this.aimPoint.x = 15.0F; +/* 697 */ this.aimPoint.z = 10.0F; +/* 698 */ break; +/* */ case 9: +/* 700 */ this.defaultTransform.moveTo(0.0F, -140.0F, 300.0F).postspin(1.0F, 0.0F, 0.0F, -10.0F); +/* 701 */ this.aimPoint.x = 0.0F; +/* 702 */ this.aimPoint.z = 300.0F; +/* 703 */ this.cam.setAlwaysClearBackground(true); +/* 704 */ this.cam.setBumpable(false); +/* 705 */ camSpeed = 4; +/* 706 */ break; +/* */ case 99: +/* */ break; +/* */ default: +/* 710 */ camMode = 1; +/* 711 */ camSpeed = 3; +/* 712 */ this.defaultCameraRadius = 0.0F; +/* 713 */ this.defaultCameraYaw = 0.0F; +/* 714 */ break; +/* */ case 1: +/* */ break; +/* */ case 2: +/* 718 */ setEyeHeight(100.0F); +/* */ } +/* */ +/* */ +/* */ +/* 723 */ if ((camMode != 1) && +/* 724 */ (camMode != 2)) +/* */ { +/* 726 */ float x = this.defaultTransform.getX(); +/* 727 */ float y = this.defaultTransform.getY(); +/* 728 */ this.aimPoint.z += this.defaultTransform.getZ(); +/* */ +/* 730 */ this.defaultCameraRadius = ((float)Math.sqrt(x * x + y * y)); +/* 731 */ this.defaultCameraYaw = ((float)(Math.atan2(y, x) * 180.0D / 3.141592653589793D)); +/* */ +/* */ +/* 734 */ this.defaultTransform.moveTo(0.0F, 0.0F, 0.0F); +/* 735 */ this.defaultTransform.postspin(0.0F, 0.0F, 1.0F, -this.defaultCameraYaw); +/* */ } +/* */ +/* 738 */ super.setOutsideCameraMode(camMode, camSpeed); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 744 */ private boolean substWarned = false; +/* */ +/* */ +/* */ +/* */ public void resetAvatarNow() +/* */ { +/* 750 */ URL to = getSourceURL(); +/* 751 */ Drone d = getInternalDrone(); +/* */ +/* 753 */ d.setAvatarNow(to); +/* */ +/* */ +/* 756 */ if ((!d.shouldBeForcedHuman()) || (PosableShape.getHuman(to).equals(to))) { +/* 757 */ this.substWarned = false; +/* */ } +/* 759 */ else if (!this.substWarned) { +/* 760 */ this.substWarned = true; +/* 761 */ Console.println(Console.message("Sub-human")); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void setEyeHeight(float h) +/* */ { +/* 768 */ float hOld = this.smoothDriver.getEyeHeight(); +/* 769 */ if (h != hOld) +/* */ { +/* 771 */ this.smoothDriver.setEyeHeight(h); +/* 772 */ getInternalDrone().moveBy(0.0F, 0.0F, hOld - h); +/* 773 */ setLocalBoundBox(Point3Temp.make(-30.0F, -30.0F, -h), +/* 774 */ Point3Temp.make(30.0F, 50.0F, 20.0F)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 781 */ protected Point3 boxLo = new Point3(); +/* 782 */ protected Point3 boxHi = new Point3(); +/* */ +/* */ public BoundBoxTemp getLocalBoundBox() +/* */ { +/* 786 */ return BoundBoxTemp.make(this.boxLo, this.boxHi); +/* */ } +/* */ +/* */ public void setLocalBoundBox(BoundBoxTemp b) +/* */ { +/* 791 */ this.boxLo = new Point3(b.lo); +/* 792 */ this.boxHi = new Point3(b.hi); +/* */ } +/* */ +/* */ public void setLocalBoundBox(Point3Temp lo, Point3Temp hi) +/* */ { +/* 797 */ setLocalBoundBox(BoundBoxTemp.make(lo, hi)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 811 */ Point3Temp lo = Point3Temp.make(this.boxLo); +/* 812 */ lo.z += this.stepHeight; +/* 813 */ Point3Temp hi = this.boxHi; +/* */ +/* 815 */ Transform xfrm = getObjectToWorldMatrix(); +/* 816 */ Point3Temp p = Point3Temp.make(lo).times(xfrm); +/* 817 */ BoundBoxTemp w = BoundBoxTemp.make(p, p); +/* 818 */ w.encompass(Point3Temp.make(hi).times(xfrm)); +/* 819 */ w.encompass(Point3Temp.make(lo.x, lo.y, hi.z).times(xfrm)); +/* 820 */ w.encompass(Point3Temp.make(lo.x, hi.y, lo.z).times(xfrm)); +/* 821 */ w.encompass(Point3Temp.make(lo.x, hi.y, hi.z).times(xfrm)); +/* 822 */ w.encompass(Point3Temp.make(hi.x, lo.y, lo.z).times(xfrm)); +/* 823 */ w.encompass(Point3Temp.make(hi.x, lo.y, hi.z).times(xfrm)); +/* 824 */ w.encompass(Point3Temp.make(hi.x, hi.y, lo.z).times(xfrm)); +/* 825 */ xfrm.recycle(); +/* */ +/* 827 */ return w; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float getFootHeight() +/* */ { +/* 836 */ if (isActive()) +/* */ { +/* 838 */ Transform t = getObjectToWorldMatrix(); +/* */ +/* */ +/* */ +/* 842 */ float pitch = t.getPitch(); +/* 843 */ t.pitch(-pitch); +/* 844 */ float ret = Point3Temp.make(this.boxLo).times(t).z; +/* 845 */ t.recycle(); +/* 846 */ return ret; +/* */ } +/* */ +/* 849 */ return 0.0F; +/* */ } +/* */ +/* */ +/* 853 */ protected float stepHeight = 30.0F; +/* */ +/* */ public float getStepHeight() +/* */ { +/* 857 */ return this.stepHeight; +/* */ } +/* */ +/* */ public void setStepHeight(float h) +/* */ { +/* 862 */ this.stepHeight = h; +/* */ } +/* */ +/* */ public void releaseCamera() +/* */ { +/* 867 */ this.cameraIsFree = true; +/* */ } +/* */ +/* */ public void reclaimCamera() +/* */ { +/* 872 */ this.cameraIsFree = false; +/* */ } +/* */ +/* */ public Camera getCamera() +/* */ { +/* 877 */ return this.cam; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 886 */ Object ret = null; +/* 887 */ switch (index - offset) { +/* */ case 0: +/* 889 */ if (mode == 0) { +/* 890 */ ret = Point3PropertyEditor.make( +/* 891 */ new Property(this, index, "Bump Box Start")); +/* 892 */ } else if (mode == 1) { +/* 893 */ ret = new Point3(this.boxLo); +/* 894 */ } else if (mode == 2) +/* 895 */ this.boxLo = new Point3((Point3)value); +/* 896 */ break; +/* */ +/* */ case 1: +/* 899 */ if (mode == 0) { +/* 900 */ ret = Point3PropertyEditor.make( +/* 901 */ new Property(this, index, "Bump Box End")); +/* 902 */ } else if (mode == 1) { +/* 903 */ ret = new Point3(this.boxHi); +/* 904 */ } else if (mode == 2) +/* 905 */ this.boxHi = new Point3((Point3)value); +/* 906 */ break; +/* */ +/* */ case 2: +/* 909 */ if (mode == 0) { +/* 910 */ ret = FloatPropertyEditor.make( +/* 911 */ new Property(this, index, "Step Height")); +/* 912 */ } else if (mode == 1) { +/* 913 */ ret = new Float(getStepHeight()); +/* 914 */ } else if (mode == 2) +/* 915 */ setStepHeight(((Float)value).floatValue()); +/* 916 */ break; +/* */ +/* */ default: +/* 919 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 921 */ return ret; +/* */ } +/* */ +/* */ +/* 925 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 929 */ s.saveVersion(0, classCookie); +/* 930 */ super.saveState(s); +/* 931 */ s.saveFloat(this.stepHeight); +/* 932 */ s.save(this.boxLo); +/* 933 */ s.save(this.boxHi); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 938 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 940 */ super.restoreState(r); +/* 941 */ this.stepHeight = r.restoreFloat(); +/* 942 */ this.boxLo = ((Point3)r.restore()); +/* 943 */ this.boxHi = ((Point3)r.restore()); +/* 944 */ break; +/* */ +/* */ default: +/* 947 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HoloPilot.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Hologram.java b/NET/worlds/scape/Hologram.java new file mode 100644 index 0000000..31dd028 --- /dev/null +++ b/NET/worlds/scape/Hologram.java @@ -0,0 +1,842 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Hologram +/* */ extends Surface +/* */ implements Prerenderable, BGLoaded, Postrenderable, MainCallback +/* */ { +/* */ private int isLoading; +/* */ ScapePicMovie fromMovie; +/* */ URL movieName; +/* */ protected Texture[] images; +/* */ protected Material[] materials; +/* */ +/* */ public Hologram(float w, float h, Texture[] texs) +/* */ { +/* 120 */ super(null); +/* 121 */ scale(w, 1.0F, h); +/* */ +/* 123 */ this.images = texs; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram() +/* */ { +/* 131 */ super(null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram(Texture[] texs) +/* */ { +/* 141 */ this(texs[0].getW(), texs[0].getH(), texs); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram(ScapePicMovie texs) +/* */ { +/* 154 */ this(texs.getW(), texs.getH(), texs.getTextures()); +/* 155 */ this.fromMovie = texs; +/* */ } +/* */ +/* */ +/* */ +/* */ public Hologram(float w, float h, ScapePicMovie texs) +/* */ { +/* 162 */ this(w, h, texs.getTextures()); +/* 163 */ this.fromMovie = texs; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram(URL movieName, HoloCallback cb) +/* */ { +/* 173 */ super(null); +/* 174 */ setAutosize(true); +/* 175 */ scale(100.0F, 1.0F, 100.0F); +/* 176 */ load(movieName, cb); +/* */ } +/* */ +/* */ +/* */ +/* */ public Hologram(URL movieName) +/* */ { +/* 183 */ this(movieName, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram(float w, float h, URL movieName, HoloCallback cb) +/* */ { +/* 193 */ super(null); +/* 194 */ scale(w, 1.0F, h); +/* 195 */ load(movieName, cb); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Hologram(float w, float h, URL movieName) +/* */ { +/* 203 */ this(w, h, movieName, null); +/* */ } +/* */ +/* */ static { +/* 207 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ private void load(URL movieName, HoloCallback cb) +/* */ { +/* 213 */ assert (getMaterial() != null); +/* */ +/* 215 */ this.callback = cb; +/* */ +/* 217 */ this.movieName = movieName; +/* */ +/* */ +/* */ +/* 221 */ if ((this.callback != null) || (hasClump())) +/* 222 */ forceLoad(); +/* */ } +/* */ +/* */ private void lockMaterials(boolean val) { +/* 226 */ if (this.materials != null) +/* 227 */ for (int i = 0; i < this.materials.length; i++) +/* 228 */ this.materials[i].setKeepLoaded(val); +/* */ } +/* */ +/* */ private void releaseMaterials() { +/* 232 */ lockMaterials(false); +/* 233 */ this.materials = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void loadMultipart(URL url, String base, int numParts, String end) +/* */ { +/* 243 */ this.images = null; +/* 244 */ releaseMaterials(); +/* 245 */ this.materials = new Material[numParts]; +/* */ do { +/* 247 */ this.materials[numParts] = new Material( +/* 248 */ URL.make(url, base + (numParts + 1) + end));numParts--; +/* 246 */ } while (numParts >= 0); +/* */ +/* */ +/* */ +/* */ +/* 251 */ setMaterial(this.materials[0]); +/* 252 */ if (this.callback != null) { +/* 253 */ this.callback.holoCallback(this, true); +/* 254 */ this.callback = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void forceLoad() +/* */ { +/* 269 */ URL url = HoloDrone.permission(this.movieName); +/* 270 */ String name = (url == null ? this.movieName : url).getBase(); +/* */ +/* 272 */ int len = name.length(); +/* */ +/* 274 */ boolean isMov = (len > 5) && (name.regionMatches(true, len - 5, "*.mov", 0, 5)); +/* */ +/* 276 */ int h = 1; +/* 277 */ int v = 1; +/* */ int num; +/* 279 */ for (int nextStarIndex = len - 5; +/* */ +/* 281 */ (nextStarIndex > 2) && (name.charAt(nextStarIndex) == '*') && +/* 282 */ ((num = name.charAt(nextStarIndex - 2) - '0') > 0) && ( +/* 283 */ num <= 9); +/* 284 */ nextStarIndex -= 3) { +/* */ int num; +/* 286 */ char control = Character.toLowerCase( +/* 287 */ name.charAt(nextStarIndex - 1)); +/* 288 */ if (control == 'h') { +/* 289 */ h = num; +/* 290 */ } else if (control == 'v') { +/* 291 */ v = num; +/* 292 */ } else if (control == 's') +/* */ { +/* 294 */ if (getAutosize()) { +/* 295 */ scale(h * 160.0F / v / getScaleX(), 1.0F, 160.0F / getScaleZ()); +/* */ } +/* 297 */ if (isMov) +/* */ { +/* */ +/* */ +/* 301 */ loadMultipart(this.movieName, +/* 302 */ name.substring(0, nextStarIndex - 2), +/* 303 */ num, +/* 304 */ "s*" + h + "h*" + v + "v*.mov"); +/* */ } else +/* 306 */ loadMultipart(this.movieName, +/* 307 */ name.substring(0, nextStarIndex - 2), +/* 308 */ num, +/* 309 */ name.substring(nextStarIndex + 1)); +/* 310 */ return; +/* */ } +/* */ } +/* */ +/* 314 */ this.isLoading += 1; +/* 315 */ BackgroundLoader.get(this, this.movieName); +/* */ } +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteName) +/* */ { +/* 320 */ if (localName != null) { +/* 321 */ if (localName.toLowerCase().endsWith(".mov")) { +/* 322 */ return new ScapePicMovie(localName, remoteName).getTextures(); +/* */ } +/* 324 */ Texture[] texs = new Texture[1]; +/* 325 */ texs[0] = TextureDecoder.decode(remoteName, localName); +/* 326 */ if ((texs[0] != null) && (texs[0].textureID != 0)) { +/* 327 */ return texs; +/* */ } +/* */ } +/* 330 */ return null; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 335 */ releaseMaterials(); +/* 336 */ if (obj != null) { +/* 337 */ this.images = ((Texture[])obj); +/* 338 */ if (getAutosize()) +/* 339 */ scale(this.images[0].getW() / getScaleX(), 1.0F, +/* 340 */ this.images[0].getH() / getScaleZ()); +/* */ } else { +/* 342 */ if (this.movieName != null) +/* 343 */ Console.println( +/* 344 */ Console.message("No-load-hologram") + this.movieName); +/* 345 */ this.images = null; +/* 346 */ setMaterial(null); +/* */ } +/* 348 */ if (this.callback != null) { +/* 349 */ this.callback.holoCallback(this, (this.images != null) || (this.materials != null)); +/* 350 */ this.callback = null; +/* */ } +/* */ +/* 353 */ this.isLoading -= 1; +/* */ +/* 355 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 364 */ return getRoom(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 376 */ Point3Temp center = getWorldPosition(); +/* 377 */ Point3Temp jog = Point3Temp.make(getW() / 2.0F, getW() / 2.0F, getH() / 2.0F); +/* */ +/* 379 */ return BoundBoxTemp.make(Point3Temp.make(center).minus(jog), +/* 380 */ Point3Temp.make(center).plus(jog)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float getMinXYExtent() +/* */ { +/* 389 */ return getW(); +/* */ } +/* */ +/* 392 */ public float getW() { return getScaleX(); } +/* 393 */ public float getH() { return getScaleZ(); } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getNumSides() +/* */ { +/* 401 */ if (this.images == null) { +/* 402 */ return this.materials == null ? 1 : this.materials.length; +/* */ } +/* 404 */ return this.images.length; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void setActiveSide(int side) +/* */ { +/* 413 */ if (side >= getNumSides()) { +/* 414 */ System.out.println( +/* 415 */ "Error at NET.worlds.Hologram.setActiveSide side " + +/* 416 */ side + " of " + getNumSides()); +/* 417 */ side = 0; +/* */ } +/* */ +/* 420 */ if (this.materials == null) { +/* 421 */ Texture t = +/* 422 */ side < this.images.length ? this.images[side] : this.images == null ? null : null; +/* 423 */ if (t != null) +/* 424 */ t.incRef(); +/* 425 */ this.material.setTexture(t); +/* 426 */ } else if (this.materials[side] != this.material) { +/* 427 */ setMaterial(this.materials[side]); +/* */ } +/* */ } +/* */ +/* */ public URL getMovieName() { +/* 432 */ if ((this.movieName == null) && (this.fromMovie != null)) +/* 433 */ return this.fromMovie.getURL(); +/* 434 */ return this.movieName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void addRwChildren(WObject container) +/* */ { +/* 451 */ addNewRwChild(container); +/* */ +/* */ +/* 454 */ if ((this.images == null) && (this.materials == null) && +/* 455 */ (this.movieName != null) && (this.isLoading == 0)) +/* */ { +/* 457 */ forceLoad(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 463 */ addVertex(0.5F, 0.0F, -0.5F, 0.0F, 1.0F); +/* 464 */ addVertex(-0.5F, 0.0F, -0.5F, 1.0F, 1.0F); +/* 465 */ addVertex(-0.5F, 0.0F, 0.5F, 1.0F, 0.0F); +/* 466 */ addVertex(0.5F, 0.0F, 0.5F, 0.0F, 0.0F); +/* */ +/* 468 */ doneWithEditing(); +/* */ +/* 470 */ if (!isReclumping()) { +/* 471 */ lockMaterials(true); +/* 472 */ getRoom().addPrerenderHandler(this); +/* 473 */ getRoom().addPostrenderHandler(this); +/* */ } +/* */ +/* 476 */ if ((this.images == null) && (this.materials == null) && (this.isLoading > 0)) { +/* 477 */ makeTemporarilyInvisible(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 488 */ if (!isReclumping()) { +/* 489 */ lockMaterials(false); +/* 490 */ getRoom().removePrerenderHandler(this); +/* 491 */ getRoom().removePostrenderHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* 496 */ if ((this.movieName != null) && (this.fromMovie == null) && (this.isLoading == 0)) { +/* 497 */ Main.register(this); +/* */ } +/* 499 */ super.markVoid(); +/* */ } +/* */ +/* */ public void mainCallback() { +/* 503 */ if (!hasClump()) { +/* 504 */ if (this.images != null) { +/* 505 */ int i = this.images.length; +/* 506 */ do { if (this.images[i] != null) { +/* 507 */ this.images[i].decRef(); +/* */ } +/* 505 */ i--; } while (i >= 0); +/* */ +/* */ +/* 508 */ this.images = null; +/* */ } +/* 510 */ releaseMaterials(); +/* */ } +/* 512 */ Main.unregister(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 522 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 526 */ s.saveVersion(6, classCookie); +/* 527 */ s.saveFloat(this.scaleDist); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 536 */ Material origMaterial = getMaterial(); +/* 537 */ URL name = getMovieName(); +/* 538 */ if (name != null) +/* 539 */ setMaterial(null); +/* 540 */ super.saveState(s); +/* 541 */ setMaterial(origMaterial); +/* */ +/* 543 */ URL.save(s, name); +/* */ +/* 545 */ if (name == null) { +/* 546 */ if (this.fromMovie != null) { +/* 547 */ s.saveBoolean(true); +/* 548 */ s.save(this.fromMovie); +/* */ } else { +/* 550 */ s.saveBoolean(false); +/* 551 */ if (this.images != null) { +/* 552 */ s.saveBoolean(true); +/* 553 */ s.saveArray(this.images); +/* */ } +/* */ else +/* */ { +/* 557 */ assert (this.materials == null); +/* */ +/* 559 */ s.saveBoolean(false); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static Texture[] extractTextureArray(Material[] mats) +/* */ { +/* 573 */ Texture[] texs = new Texture[mats.length]; +/* 574 */ for (int i = 0; i < mats.length; i++) { +/* 575 */ texs[i] = mats[i].extractTexture(0); +/* */ } +/* 577 */ return texs; +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 582 */ int vers = r.restoreVersion(classCookie); +/* */ +/* 584 */ switch (vers) { +/* */ case 5: +/* */ case 6: +/* 587 */ this.scaleDist = r.restoreFloat(); +/* */ +/* */ case 4: +/* 590 */ super.restoreState(r); +/* 591 */ if ((this.movieName = URL.restore(r)) != null) { +/* 592 */ load(this.movieName, null); +/* */ } +/* 594 */ else if (r.restoreBoolean()) { +/* 595 */ this.fromMovie = ((ScapePicMovie)r.restore()); +/* 596 */ this.images = this.fromMovie.getTextures(); +/* */ } else { +/* 598 */ if (vers < 6) +/* 599 */ setAutosize(true); +/* 600 */ if (r.restoreBoolean()) { +/* 601 */ this.images = ((Texture[])r.restoreArray()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 607 */ break; +/* */ case 3: +/* 609 */ super.restoreState(r); +/* 610 */ if ((this.movieName = URL.restore(r)) != null) { +/* 611 */ load(this.movieName, null); +/* */ } +/* 613 */ else if (r.restoreBoolean()) { +/* 614 */ this.fromMovie = ((ScapePicMovie)r.restore()); +/* 615 */ this.images = this.fromMovie.getTextures(); +/* */ } else { +/* 617 */ setAutosize(true); +/* 618 */ if (r.restoreBoolean()) { +/* 619 */ this.images = extractTextureArray( +/* 620 */ (Material[])r.restoreArray()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 626 */ break; +/* */ case 2: +/* 628 */ super.restoreState(r); +/* 629 */ if ((this.movieName = URL.restore(r)) != null) { +/* 630 */ load(this.movieName, null); +/* */ } +/* 632 */ else if (r.restoreBoolean()) { +/* 633 */ this.fromMovie = ((ScapePicMovie)r.restore()); +/* 634 */ this.images = this.fromMovie.getTextures(); +/* */ } else { +/* 636 */ setAutosize(true); +/* */ } +/* 638 */ break; +/* */ case 1: +/* 640 */ super.restoreState(r); +/* 641 */ float w = r.restoreFloat(); +/* 642 */ if (w == 0.0F) +/* 643 */ w = 100.0F; +/* 644 */ float h = r.restoreFloat(); +/* 645 */ if (h == 0.0F) +/* 646 */ h = 100.0F; +/* 647 */ scale(w, 1.0F, h); +/* 648 */ if ((this.movieName = URL.restore(r)) != null) { +/* 649 */ load(this.movieName, null); +/* */ } +/* 651 */ else if (r.restoreBoolean()) { +/* 652 */ this.fromMovie = ((ScapePicMovie)r.restore()); +/* 653 */ this.images = this.fromMovie.getTextures(); +/* */ } else { +/* 655 */ setAutosize(true); +/* */ } +/* 657 */ break; +/* */ case 0: +/* 659 */ super.restoreState(r); +/* 660 */ float w = r.restoreFloat(); +/* 661 */ if (w == 0.0F) +/* 662 */ w = 100.0F; +/* 663 */ float h = r.restoreFloat(); +/* 664 */ if (h == 0.0F) +/* 665 */ h = 100.0F; +/* 666 */ scale(w, 1.0F, h); +/* */ +/* 668 */ if (r.restoreBoolean()) { +/* 669 */ this.fromMovie = ((ScapePicMovie)r.restore()); +/* 670 */ this.images = this.fromMovie.getTextures(); +/* */ } else { +/* 672 */ setAutosize(true); } +/* 673 */ break; +/* */ default: +/* 675 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public Hologram setRoughCut(boolean b) +/* */ { +/* 681 */ if (b) { +/* 682 */ this.flags |= 0x4; +/* */ } else +/* 684 */ this.flags &= 0xFFFFFFFB; +/* 685 */ return this; +/* */ } +/* */ +/* */ public final boolean getRoughCut() { +/* 689 */ return (this.flags & 0x4) != 0; +/* */ } +/* */ +/* */ public void setAutosize(boolean b) +/* */ { +/* 694 */ if (b) { +/* 695 */ this.flags |= 0x400000; +/* */ } else +/* 697 */ this.flags &= 0xFFBFFFFF; +/* */ } +/* */ +/* */ public final boolean getAutosize() { +/* 701 */ return (this.flags & 0x400000) != 0; +/* */ } +/* */ +/* */ public Hologram setViewplaneAligned(boolean b) +/* */ { +/* 706 */ if (b) { +/* 707 */ this.flags |= 0x40000; +/* */ } else +/* 709 */ this.flags &= 0xFFFBFFFF; +/* 710 */ return this; +/* */ } +/* */ +/* */ public final boolean getViewplaneAligned() { +/* 714 */ return (this.flags & 0x40000) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 723 */ Object ret = null; +/* 724 */ switch (index - offset) { +/* */ case 0: +/* 726 */ if (mode == 0) { +/* 727 */ ret = URLPropertyEditor.make( +/* 728 */ new Property(this, index, "File"), +/* 729 */ TextureDecoder.getAllExts()); +/* 730 */ } else if (mode == 1) { +/* 731 */ ret = getMovieName(); +/* 732 */ } else if (mode == 2) +/* 733 */ load((URL)value, null); +/* 734 */ break; +/* */ case 1: +/* 736 */ if (mode == 0) { +/* 737 */ ret = BooleanPropertyEditor.make( +/* 738 */ new Property(this, index, "Viewplane Aligned"), +/* 739 */ "No", "Yes"); +/* 740 */ } else if (mode == 1) { +/* 741 */ ret = new Boolean(getViewplaneAligned()); +/* 742 */ } else if (mode == 2) +/* 743 */ setViewplaneAligned(((Boolean)value).booleanValue()); +/* 744 */ break; +/* */ case 2: +/* 746 */ if (mode == 0) { +/* 747 */ ret = BooleanPropertyEditor.make( +/* 748 */ new Property(this, index, "Rough Cut Alignment"), +/* 749 */ "No", "Yes"); +/* 750 */ } else if (mode == 1) { +/* 751 */ ret = new Boolean(getRoughCut()); +/* 752 */ } else if (mode == 2) +/* 753 */ setRoughCut(((Boolean)value).booleanValue()); +/* 754 */ break; +/* */ case 3: +/* 756 */ if (mode == 0) { +/* 757 */ ret = FloatPropertyEditor.make( +/* 758 */ new Property(this, index, "Scale Distance")); +/* 759 */ } else if (mode == 1) { +/* 760 */ ret = new Float(getScaleDist()); +/* 761 */ } else if (mode == 2) +/* 762 */ setScaleDist(((Float)value).floatValue()); +/* 763 */ break; +/* */ case 4: +/* 765 */ if (mode == 0) { +/* 766 */ ret = Point2PropertyEditor.make( +/* 767 */ new Property(this, index, "Extent")); +/* 768 */ } else if (mode == 1) { +/* 769 */ ret = new Point2(getScaleX(), getScaleZ()); +/* 770 */ } else if (mode == 2) { +/* 771 */ setAutosize(false); +/* 772 */ scale(((Point2)value).x / getScaleX(), 1.0F, +/* 773 */ ((Point2)value).y / getScaleZ()); +/* */ } +/* 775 */ break; +/* */ case 5: +/* 777 */ if (mode == 0) { +/* 778 */ ret = BooleanPropertyEditor.make( +/* 779 */ new Property(this, index, "Autosize"), +/* 780 */ "No", "Yes"); +/* 781 */ } else if (mode == 1) { +/* 782 */ ret = new Boolean(getAutosize()); +/* 783 */ } else if (mode == 2) +/* 784 */ setAutosize(((Boolean)value).booleanValue()); +/* 785 */ break; +/* */ default: +/* 787 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 789 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 794 */ URL name = getMovieName(); +/* 795 */ return super.toString() + "[" + ( +/* 796 */ name != null ? name.toString() : "") + "]"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 802 */ private int origTransformID = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private HoloCallback callback; +/* */ +/* */ +/* */ +/* */ +/* */ private float scaleDist; +/* */ +/* */ +/* */ +/* */ +/* 818 */ public void setScaleDist(float dist) { this.scaleDist = dist; } +/* */ +/* 820 */ public final float getScaleDist() { return this.scaleDist; } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ public native void makeTemporarilyInvisible(); +/* */ +/* */ public native void prerender(Camera paramCamera); +/* */ +/* */ public native void postrender(Camera paramCamera); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Hologram.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/HorizontalRect.java b/NET/worlds/scape/HorizontalRect.java new file mode 100644 index 0000000..2e90d55 --- /dev/null +++ b/NET/worlds/scape/HorizontalRect.java @@ -0,0 +1,86 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class HorizontalRect +/* */ extends Surface +/* */ { +/* 29 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 33 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 38 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 40 */ super.restoreState(r); +/* 41 */ float x = r.restoreFloat(); +/* 42 */ float y = r.restoreFloat(); +/* 43 */ float u = r.restoreFloat(); +/* 44 */ float v = r.restoreFloat(); +/* 45 */ boolean faceUp = r.restoreBoolean(); +/* */ +/* */ +/* */ +/* 49 */ Rect rect = new Rect(1.0F, 1.0F, getMaterial()); +/* 50 */ rect.setTransform(this); +/* */ +/* */ +/* */ +/* */ +/* 55 */ if (faceUp) { +/* 56 */ rect.pitch(-90.0F).scale(x, 1.0F, y); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 70 */ rect.yaw(90.0F).pitch(90.0F).scale(y, 1.0F, x); +/* */ } +/* */ +/* 73 */ rect.setUV(u, v); +/* 74 */ r.replace(this, rect); +/* 75 */ break; +/* */ default: +/* 77 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\HorizontalRect.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Iconic.java b/NET/worlds/scape/Iconic.java new file mode 100644 index 0000000..f30596e --- /dev/null +++ b/NET/worlds/scape/Iconic.java @@ -0,0 +1,16 @@ +package NET.worlds.scape; + +import NET.worlds.network.URL; + +public abstract interface Iconic +{ + public abstract URL getIconURL(); + + public abstract String getIconCaption(); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Iconic.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ImageConverter.java b/NET/worlds/scape/ImageConverter.java new file mode 100644 index 0000000..9848a08 --- /dev/null +++ b/NET/worlds/scape/ImageConverter.java @@ -0,0 +1,186 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Image; +/* */ import java.awt.Toolkit; +/* */ import java.awt.image.ColorModel; +/* */ import java.awt.image.DirectColorModel; +/* */ import java.awt.image.ImageConsumer; +/* */ import java.awt.image.ImageProducer; +/* */ import java.awt.image.IndexColorModel; +/* */ import java.io.PrintStream; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ImageConverter +/* */ implements ImageConsumer +/* */ { +/* */ private String urlName; +/* */ private String filename; +/* */ private int width; +/* */ private int height; +/* */ private Image image; +/* */ private boolean done; +/* */ private boolean ok; +/* 29 */ private boolean debug = false; +/* */ private ColorModel model; +/* 31 */ private int transparentColor = -1; +/* */ private int hDIB; +/* */ private int pixelPtr; +/* */ +/* */ public ImageConverter(String urlName, String filename) +/* */ { +/* 37 */ this.urlName = urlName; +/* 38 */ this.filename = filename; +/* */ } +/* */ +/* */ +/* */ static +/* */ { +/* 44 */ nativeInit(); +/* */ } +/* */ +/* */ public synchronized int convert() +/* */ { +/* 49 */ this.image = Toolkit.getDefaultToolkit().getImage(this.filename); +/* 50 */ this.image.getSource().startProduction(this); +/* */ +/* 52 */ while (!this.done) { +/* */ try { +/* 54 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* 58 */ int textureID = 0; +/* 59 */ if (this.ok) +/* 60 */ textureID = convertDIBToTexture(); +/* 61 */ cleanup(); +/* 62 */ return textureID; +/* */ } +/* */ +/* */ public void setDimensions(int width, int height) +/* */ { +/* 67 */ if (this.debug) +/* 68 */ System.out.println("Set dimensions: w " + width + " h " + height); +/* 69 */ this.width = width; +/* 70 */ this.height = height; +/* */ } +/* */ +/* */ public void setProperties(Hashtable props) +/* */ { +/* 75 */ if (this.debug) { +/* 76 */ System.out.println("Set properties"); +/* */ } +/* */ } +/* */ +/* */ public void setColorModel(ColorModel model) { +/* 81 */ if (this.debug) { +/* 82 */ System.out.println("Set color model: " + model); +/* */ } +/* 84 */ this.model = model; +/* 85 */ assert ((this.width != 0) && (this.height != 0)); +/* 86 */ int[] palette = null; +/* 87 */ int colors = 0; +/* 88 */ if ((model instanceof IndexColorModel)) { +/* 89 */ IndexColorModel im = (IndexColorModel)model; +/* 90 */ colors = im.getMapSize(); +/* 91 */ this.transparentColor = im.getTransparentPixel(); +/* 92 */ palette = new int[colors * 3]; +/* 93 */ for (int i = 0; i < colors; i++) +/* 94 */ palette[i] = im.getRGB(i); +/* */ } else { +/* 96 */ DirectColorModel dm = (DirectColorModel)model; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 102 */ assert (dm.getBlueMask() == 255); +/* 103 */ assert (dm.getGreenMask() == 65280); +/* 104 */ assert (dm.getRedMask() == 16711680); +/* */ } +/* 106 */ prepareDIB(this.width, this.height, colors, palette); +/* */ } +/* */ +/* */ public void setHints(int hintflags) +/* */ { +/* 111 */ if (this.debug) { +/* 112 */ System.out.println("Set hints: " + ( +/* 113 */ (hintflags & 0x1) != 0 ? " RANDOM " : "") + ( +/* 114 */ (hintflags & 0x2) != 0 ? " TOPDOWNLEFTRIGHT " : "") + ( +/* 115 */ (hintflags & 0x4) != 0 ? " COMPLETESCANS " : "") + ( +/* 116 */ (hintflags & 0x8) != 0 ? " SINGLEPASS " : "") + ( +/* 117 */ (hintflags & 0x10) != 0 ? " SINGLEFRAME " : "")); +/* */ } +/* */ } +/* */ +/* */ public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize) +/* */ { +/* 123 */ if (this.debug) +/* 124 */ System.out.println("setPixels(byte): x " + x + " y " + y + " w " + +/* 125 */ w + " h " + h + " model " + model + " off " + +/* 126 */ off + " scansize " + scansize); +/* 127 */ assert (model == this.model); +/* 128 */ setDIBPixelBytes(x, y, w, h, pixels, off, scansize); +/* */ } +/* */ +/* */ +/* */ public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) +/* */ { +/* 134 */ if (this.debug) +/* 135 */ System.out.println("setPixels(int): x " + x + " y " + y + " w " + +/* 136 */ w + " h " + h + " model " + model + " off " + +/* 137 */ off + " scansize " + scansize); +/* 138 */ assert (model == this.model); +/* 139 */ setDIBPixelInts(x, y, w, h, pixels, off, scansize); +/* */ } +/* */ +/* */ public synchronized void imageComplete(int status) +/* */ { +/* 144 */ if (this.debug) { +/* 145 */ String state = null; +/* 146 */ switch (status) { +/* */ case 1: +/* 148 */ state = "ERROR"; +/* 149 */ break; +/* */ case 2: +/* 151 */ state = "SINGLEDONE"; +/* 152 */ break; +/* */ case 3: +/* 154 */ state = "STATICDONE"; +/* 155 */ break; +/* */ case 4: +/* 157 */ state = "ABORTED"; +/* */ } +/* */ +/* 160 */ System.out.println("Image complete: " + state); +/* */ } +/* 162 */ this.image.getSource().removeConsumer(this); +/* 163 */ this.image.flush(); +/* 164 */ this.ok = ((status != 1) && (status != 4)); +/* 165 */ this.done = true; +/* 166 */ notify(); +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ private native void prepareDIB(int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt); +/* */ +/* */ private native void setDIBPixelBytes(int paramInt1, int paramInt2, int paramInt3, int paramInt4, byte[] paramArrayOfByte, int paramInt5, int paramInt6); +/* */ +/* */ private native void setDIBPixelInts(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt, int paramInt5, int paramInt6); +/* */ +/* */ private native int convertDIBToTexture(); +/* */ +/* */ private native void cleanup(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ImageConverter.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/IncrementalRestorer.java b/NET/worlds/scape/IncrementalRestorer.java new file mode 100644 index 0000000..ee02426 --- /dev/null +++ b/NET/worlds/scape/IncrementalRestorer.java @@ -0,0 +1,13 @@ +package NET.worlds.scape; + +public abstract interface IncrementalRestorer +{ + public abstract int incRestore(int paramInt, Restorer paramRestorer, URLSelfLoader paramURLSelfLoader) + throws Exception; +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\IncrementalRestorer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/IndentStream.java b/NET/worlds/scape/IndentStream.java new file mode 100644 index 0000000..2795c91 --- /dev/null +++ b/NET/worlds/scape/IndentStream.java @@ -0,0 +1,138 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.OutputStream; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class IndentStream +/* */ extends PrintStream +/* */ { +/* 19 */ private boolean _atstart = true; +/* 20 */ private int _indent = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public IndentStream(OutputStream os) +/* */ { +/* 28 */ super(os); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public IndentStream(OutputStream os, boolean flush) +/* */ { +/* 39 */ super(os, flush); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void indent(int step) +/* */ { +/* 48 */ this._indent += step; +/* */ } +/* */ +/* */ +/* */ public void indent() +/* */ { +/* 54 */ indent(2); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void undent(int step) +/* */ { +/* 64 */ if (this._indent >= step) { +/* 65 */ this._indent -= step; +/* */ } else { +/* 67 */ this._indent = 0; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 73 */ public void undent() { undent(2); } +/* */ +/* 75 */ public int curIndent() { return this._indent; } +/* */ +/* */ +/* */ +/* */ +/* */ private void startLine() +/* */ { +/* 82 */ for (int i = 0; i < this._indent; i++) +/* 83 */ super.write(32); +/* 84 */ this._atstart = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void write(int b) +/* */ { +/* 92 */ if (b == 10) { +/* 93 */ this._atstart = true; +/* */ } +/* 95 */ else if (this._atstart) +/* 96 */ startLine(); +/* 97 */ super.write(b); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void write(byte[] b, int off, int len) +/* */ { +/* 105 */ while (len > 0) { +/* 106 */ int firstlen = 0; +/* */ +/* 108 */ while ((firstlen < len) && (b[(off + firstlen)] != 10)) { +/* 109 */ firstlen++; +/* */ } +/* 111 */ if (firstlen > 0) { +/* 112 */ if (this._atstart) +/* 113 */ startLine(); +/* 114 */ super.write(b, off, firstlen); +/* 115 */ off += firstlen; +/* 116 */ len -= firstlen; +/* 117 */ this._atstart = false; +/* 118 */ firstlen = 0; +/* */ } +/* */ +/* 121 */ while ((firstlen < len) && (b[(off + firstlen)] == 10)) { +/* 122 */ firstlen++; +/* */ } +/* 124 */ if (firstlen > 0) { +/* 125 */ super.write(b, off, firstlen); +/* 126 */ off += firstlen; +/* 127 */ len -= firstlen; +/* 128 */ this._atstart = true; +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\IndentStream.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/IntegerFieldEditorDialog.java b/NET/worlds/scape/IntegerFieldEditorDialog.java new file mode 100644 index 0000000..aac747e --- /dev/null +++ b/NET/worlds/scape/IntegerFieldEditorDialog.java @@ -0,0 +1,60 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class IntegerFieldEditorDialog +/* */ extends FieldEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ Property property; +/* */ +/* */ +/* */ +/* */ +/* */ IntegerPropertyEditor limits; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ IntegerFieldEditorDialog(EditTile parent, String title, Property property, IntegerPropertyEditor limits) +/* */ { +/* 29 */ super(parent, title); +/* 30 */ this.property = property; +/* 31 */ this.limits = limits; +/* 32 */ ready(); +/* */ } +/* */ +/* */ protected String getValue() +/* */ { +/* 37 */ return (String)this.property.get(); +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 42 */ if (text.length() != 0) { +/* */ try { +/* 44 */ int val = Integer.parseInt(text); +/* 45 */ if ((!this.limits.rangeLimits) || ( +/* 46 */ (val >= this.limits.minVal) && (val <= this.limits.maxVal))) { +/* 47 */ this.parent.addUndoableSet(this.property, new Integer(val)); +/* 48 */ return true; +/* */ } +/* */ } catch (NumberFormatException localNumberFormatException) {} +/* */ } +/* 52 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\IntegerFieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/IntegerPropertyEditor.java b/NET/worlds/scape/IntegerPropertyEditor.java new file mode 100644 index 0000000..6ce30cc --- /dev/null +++ b/NET/worlds/scape/IntegerPropertyEditor.java @@ -0,0 +1,97 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class IntegerPropertyEditor +/* */ extends PropEditor +/* */ { +/* 57 */ boolean rangeLimits = false; +/* */ int minVal; +/* */ int maxVal; +/* */ +/* */ private IntegerPropertyEditor(Property property) +/* */ { +/* 63 */ super(property); +/* */ } +/* */ +/* */ private IntegerPropertyEditor(Property property, int minVal, int maxVal) +/* */ { +/* 68 */ super(property); +/* 69 */ this.rangeLimits = true; +/* 70 */ this.minVal = minVal; +/* 71 */ this.maxVal = maxVal; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 76 */ return new IntegerFieldEditorDialog(parent, title, this.property, this); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 81 */ property.setPropertyType(1); +/* 82 */ return property.setEditor(new IntegerPropertyEditor(property)); +/* */ } +/* */ +/* */ public static Property make(Property property, int minVal, int maxVal) +/* */ { +/* 87 */ property.setPropertyType(1); +/* 88 */ return property.setEditor(new IntegerPropertyEditor(property, minVal, +/* 89 */ maxVal)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\IntegerPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InterpolatedDrone.java b/NET/worlds/scape/InterpolatedDrone.java new file mode 100644 index 0000000..efae497 --- /dev/null +++ b/NET/worlds/scape/InterpolatedDrone.java @@ -0,0 +1,298 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BBAppearDroneCommand; +/* */ import NET.worlds.console.BBDisappearDroneCommand; +/* */ import NET.worlds.console.BBDroneDeltaPosCommand; +/* */ import NET.worlds.console.BBMoveDroneCommand; +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InterpolatedDrone +/* */ extends Drone +/* */ implements FrameHandler +/* */ { +/* */ private int _last_FrameTime; +/* */ private int _last_PosTime; +/* */ private int _vel_x; +/* */ private int _vel_y; +/* */ private int _vel_z; +/* */ private int _vel_yaw; +/* */ private int _last_x; +/* */ private int _last_y; +/* */ private int _last_z; +/* */ private int _last_yaw; +/* */ private int _x; +/* */ private int _y; +/* */ private int _z; +/* */ private int _yaw; +/* */ +/* */ public InterpolatedDrone(ObjID objID, WorldServer serv) +/* */ { +/* 41 */ super(objID, serv); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 53 */ private boolean inited = false; +/* */ +/* */ public InterpolatedDrone() {} +/* */ +/* 57 */ public Point3Temp getVelocity() { return Point3Temp.make(this._vel_x, this._vel_y, this._vel_z); } +/* */ +/* */ +/* */ public int getYawRate() +/* */ { +/* 62 */ return this._vel_yaw; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent fe) +/* */ { +/* 67 */ if (this._server == null) { +/* 68 */ return true; +/* */ } +/* 70 */ int timeNow = fe.time; +/* */ +/* 72 */ interpolate(timeNow, this._server.getUpdateTime(), this); +/* */ +/* 74 */ return true; +/* */ } +/* */ +/* */ public void interpolate(int timeNow, int updateTime, Transform target) +/* */ { +/* 79 */ if (!this.inited) { return; +/* */ } +/* 81 */ if (timeNow - this._last_PosTime > updateTime) +/* */ { +/* */ +/* 84 */ this._last_PosTime = timeNow; +/* 85 */ this._vel_x = (this._last_x - this._x); +/* 86 */ this._vel_y = (this._last_y - this._y); +/* 87 */ this._vel_z = (this._last_z - this._z); +/* 88 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* 89 */ assert (this._vel_yaw >= 0); +/* 90 */ if (this._vel_yaw > 180) +/* 91 */ this._vel_yaw -= 360; +/* */ } +/* 93 */ double timeDiff = (timeNow - this._last_FrameTime) / +/* 94 */ updateTime; +/* 95 */ if (timeNow - this._last_FrameTime > updateTime) +/* 96 */ timeDiff = 0.0D; +/* 97 */ this._x += (int)(timeDiff * this._vel_x); +/* 98 */ this._y += (int)(timeDiff * this._vel_y); +/* 99 */ this._z += (int)(timeDiff * this._vel_z); +/* 100 */ this._yaw += (int)(timeDiff * this._vel_yaw) % 360; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 106 */ target.makeIdentity().moveBy(this._x, this._y, this._z).yaw(this._yaw); +/* */ +/* 108 */ this._last_FrameTime = timeNow; +/* */ } +/* */ +/* */ public void reset(short x, short y, short z, short yaw) +/* */ { +/* 113 */ this._x = x; +/* 114 */ this._y = y; +/* 115 */ this._z = z; +/* 116 */ this._yaw = yaw; +/* */ +/* 118 */ this._vel_x = (this._vel_y = this._vel_z = 0); +/* 119 */ this._vel_yaw = 0; +/* 120 */ this._last_x = this._x; +/* 121 */ this._last_y = this._y; +/* 122 */ this._last_z = this._z; +/* 123 */ this._last_yaw = this._yaw; +/* */ +/* 125 */ this._last_PosTime = (this._last_FrameTime = Std.getRealTime()); +/* */ +/* 127 */ this.inited = true; +/* */ } +/* */ +/* */ +/* */ +/* */ public void appear(Room rm, short x, short y, short z, short yaw) +/* */ { +/* 134 */ assert (rm != null); +/* */ +/* 136 */ BlackBox.getInstance().submitEvent(new BBAppearDroneCommand(rm.toString(), +/* 137 */ getName(), x, y, z, yaw)); +/* */ +/* 139 */ if (getRoom() != rm) { +/* 140 */ detach(); +/* 141 */ rm.add(this); +/* */ } +/* */ +/* 144 */ makeIdentity().moveBy(x, y, z).yaw(yaw); +/* */ +/* */ +/* 147 */ this._x = x; +/* 148 */ this._y = y; +/* 149 */ this._z = z; +/* 150 */ this._yaw = yaw; +/* 151 */ this._vel_x = (this._vel_y = this._vel_z = 0); +/* 152 */ this._vel_yaw = 0; +/* 153 */ this._last_x = x; +/* 154 */ this._last_y = y; +/* 155 */ this._last_z = z; +/* 156 */ this._last_yaw = yaw; +/* */ +/* 158 */ this._last_PosTime = (this._last_FrameTime = Std.getRealTime()); +/* */ +/* 160 */ URL u = getCurrentURL(); +/* 161 */ if (u != null) { +/* 162 */ setAvatarNow(u); +/* */ } +/* 164 */ this.inited = true; +/* */ } +/* */ +/* */ public void disappear() +/* */ { +/* 169 */ BlackBox.getInstance().submitEvent(new BBDisappearDroneCommand(getName())); +/* 170 */ detachFromServer(true); +/* 171 */ detach(); +/* */ } +/* */ +/* */ public void longLoc(short x, short y, short z, short yaw) +/* */ { +/* 176 */ if (!(getOwner() instanceof Pilot)) { +/* 177 */ BlackBox.getInstance().submitEvent( +/* 178 */ new BBMoveDroneCommand(getName(), x, y, z, yaw)); +/* */ } +/* 180 */ this._last_x = x; +/* 181 */ this._last_y = y; +/* 182 */ this._last_z = z; +/* 183 */ this._last_yaw = yaw; +/* 184 */ this._vel_x = (this._last_x - this._x); +/* 185 */ this._vel_y = (this._last_y - this._y); +/* 186 */ this._vel_z = (this._last_z - this._z); +/* 187 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* 188 */ assert (this._vel_yaw >= 0); +/* 189 */ if (this._vel_yaw > 180) +/* 190 */ this._vel_yaw -= 360; +/* 191 */ this._last_PosTime = Std.getRealTime(); +/* 192 */ this.inited = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void transferFrom(Drone d) +/* */ { +/* 200 */ super.transferFrom(d); +/* */ +/* 202 */ if ((d instanceof InterpolatedDrone)) +/* */ { +/* 204 */ InterpolatedDrone i = (InterpolatedDrone)d; +/* 205 */ this._x = i._x; +/* 206 */ this._y = i._y; +/* 207 */ this._z = i._z; +/* 208 */ this._yaw = i._yaw; +/* 209 */ this._vel_x = i._vel_x; +/* 210 */ this._vel_y = i._vel_y; +/* 211 */ this._vel_z = i._vel_z; +/* 212 */ this._vel_yaw = i._vel_yaw; +/* 213 */ this._last_x = i._last_x; +/* 214 */ this._last_y = i._last_y; +/* 215 */ this._last_z = i._last_z; +/* 216 */ this._last_yaw = i._last_yaw; +/* 217 */ this._last_PosTime = i._last_PosTime; +/* 218 */ this._last_FrameTime = i._last_FrameTime; +/* 219 */ this.inited = true; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void roomChange(Room newRoom, short x, short y, short z, short yaw) +/* */ { +/* 228 */ detach(); +/* 229 */ if (newRoom != null) { +/* 230 */ appear(newRoom, x, y, z, yaw); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void shortLoc(byte dx, byte dy, byte dyaw) +/* */ { +/* 238 */ if (!(getOwner() instanceof Pilot)) { +/* 239 */ BlackBox.getInstance().submitEvent( +/* 240 */ new BBDroneDeltaPosCommand(getName(), dx, dy, dyaw)); +/* */ } +/* 242 */ this._last_x += dx; +/* 243 */ this._last_y += dy; +/* */ +/* 245 */ this._last_yaw += dyaw; +/* 246 */ this._last_yaw %= 360; +/* */ +/* 248 */ this._vel_x = (this._last_x - this._x); +/* 249 */ this._vel_y = (this._last_y - this._y); +/* */ +/* 251 */ this._vel_z = 0; +/* 252 */ this._vel_yaw = (((this._last_yaw - this._yaw) % 360 + 360) % 360); +/* 253 */ assert (this._vel_yaw >= 0); +/* 254 */ if (this._vel_yaw > 180) { +/* 255 */ this._vel_yaw -= 360; +/* */ } +/* 257 */ this._last_PosTime = Std.getRealTime(); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 265 */ Object ret = null; +/* 266 */ (index - offset); +/* */ +/* 268 */ ret = super.properties(index, offset + 0, mode, value); +/* */ +/* 270 */ return ret; +/* */ } +/* */ +/* 273 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 277 */ s.saveVersion(0, classCookie); +/* 278 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 283 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 285 */ super.restoreState(r); +/* 286 */ break; +/* */ +/* */ default: +/* 289 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InterpolatedDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryAction.java b/NET/worlds/scape/InventoryAction.java new file mode 100644 index 0000000..a00aa7a --- /dev/null +++ b/NET/worlds/scape/InventoryAction.java @@ -0,0 +1,49 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ public class InventoryAction +/* */ extends InventoryItem +/* */ { +/* */ public InventoryAction(String id, String name) +/* */ { +/* 9 */ super(id, name); +/* */ } +/* */ +/* */ public InventoryAction(String id, String name, int qty) +/* */ { +/* 14 */ super(id, name, qty); +/* */ } +/* */ +/* */ public InventoryAction(InventoryAction in) +/* */ { +/* 19 */ super(in); +/* */ } +/* */ +/* */ public InventoryItem cloneItem() +/* */ { +/* 24 */ return new InventoryAction(this); +/* */ } +/* */ +/* */ public static InventoryAction createAction(String id, String name, int qty) +/* */ { +/* 29 */ if (id.equals("H")) +/* */ { +/* 31 */ return new HighJump(id, name, qty); +/* */ } +/* */ +/* */ +/* 35 */ return new InventoryAction(id, name, qty); +/* */ } +/* */ +/* */ +/* */ public boolean doAction() +/* */ { +/* 41 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryAvatar.java b/NET/worlds/scape/InventoryAvatar.java new file mode 100644 index 0000000..edffcfb --- /dev/null +++ b/NET/worlds/scape/InventoryAvatar.java @@ -0,0 +1,32 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ public class InventoryAvatar +/* */ extends InventoryItem +/* */ { +/* */ public InventoryAvatar(String id, String name) +/* */ { +/* 9 */ super(id, name); +/* */ } +/* */ +/* */ public InventoryAvatar(String id, String name, int qty) +/* */ { +/* 14 */ super(id, name, qty); +/* */ } +/* */ +/* */ public InventoryAvatar(InventoryAvatar in) +/* */ { +/* 19 */ super(in); +/* */ } +/* */ +/* */ public InventoryItem cloneItem() +/* */ { +/* 24 */ return new InventoryAvatar(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryAvatar.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryCallback.java b/NET/worlds/scape/InventoryCallback.java new file mode 100644 index 0000000..23354ba --- /dev/null +++ b/NET/worlds/scape/InventoryCallback.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface InventoryCallback +{ + public abstract void droppedInventoryItem(Object paramObject); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryCallback.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryDialog.java b/NET/worlds/scape/InventoryDialog.java new file mode 100644 index 0000000..bd9f134 --- /dev/null +++ b/NET/worlds/scape/InventoryDialog.java @@ -0,0 +1,434 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.ImageCanvas; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Button; +/* */ import java.awt.Color; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.Frame; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InventoryDialog +/* */ extends PolledDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private InventoryList rightWristItems_; +/* */ private ImageCanvas rightWristIcon_; +/* */ private InventoryList leftWristItems_; +/* */ private ImageCanvas leftWristIcon_; +/* */ private InventoryList headItems_; +/* */ private ImageCanvas headIcon_; +/* */ private InventoryList rightAnkleItems_; +/* */ private ImageCanvas rightAnkleIcon_; +/* */ private InventoryList leftAnkleItems_; +/* */ private ImageCanvas leftAnkleIcon_; +/* */ private Button okButton_; +/* */ private Button cancelButton_; +/* */ private Frame parent_; +/* 58 */ private static final URL defaultImageURL = URL.make("home:..\\default.gif"); +/* */ private static Object lastPosAndSize; +/* */ +/* */ public InventoryDialog(Frame frame) { +/* 62 */ super(frame, null, Console.message("Inventory"), true); +/* */ +/* 64 */ InventoryManager im = InventoryManager.getInventoryManager(); +/* 65 */ Vector equippableItems = im.getEquippableItems(); +/* 66 */ Vector equippedItems = im.getEquippedItems(); +/* 67 */ this.parent_ = frame; +/* */ +/* 69 */ this.rightWristItems_ = new InventoryList(); +/* 70 */ this.leftWristItems_ = new InventoryList(); +/* 71 */ this.headItems_ = new InventoryList(); +/* 72 */ this.rightAnkleItems_ = new InventoryList(); +/* 73 */ this.leftAnkleItems_ = new InventoryList(); +/* */ +/* 75 */ this.rightWristIcon_ = new ImageCanvas(defaultImageURL); +/* 76 */ this.leftWristIcon_ = new ImageCanvas(defaultImageURL); +/* 77 */ this.headIcon_ = new ImageCanvas(defaultImageURL); +/* 78 */ this.leftAnkleIcon_ = new ImageCanvas(defaultImageURL); +/* 79 */ this.rightAnkleIcon_ = new ImageCanvas(defaultImageURL); +/* */ +/* 81 */ this.okButton_ = new Button("Ok"); +/* 82 */ this.cancelButton_ = new Button("Cancel"); +/* */ +/* */ +/* 85 */ for (int i = 0; i < equippableItems.size(); i++) +/* */ { +/* 87 */ EquippableItem item = (EquippableItem)equippableItems.elementAt(i); +/* */ +/* 89 */ switch (item.getBodyLocation()) +/* */ { +/* */ case 8: +/* 92 */ this.rightWristItems_.add(item); +/* 93 */ break; +/* */ case 13: +/* 95 */ this.leftWristItems_.add(item); +/* 96 */ break; +/* */ case 4: +/* 98 */ this.headItems_.add(item); +/* 99 */ break; +/* */ case 17: +/* 101 */ this.rightAnkleItems_.add(item); +/* 102 */ break; +/* */ case 21: +/* 104 */ this.leftAnkleItems_.add(item); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 112 */ for (int i = 0; i < equippedItems.size(); i++) +/* */ { +/* 114 */ EquippableItem item = (EquippableItem)equippedItems.elementAt(i); +/* */ +/* 116 */ switch (item.getBodyLocation()) +/* */ { +/* */ case 8: +/* 119 */ this.rightWristItems_.selectItem(item); +/* 120 */ break; +/* */ case 13: +/* 122 */ this.leftWristItems_.selectItem(item); +/* 123 */ break; +/* */ case 4: +/* 125 */ this.headItems_.selectItem(item); +/* 126 */ break; +/* */ case 17: +/* 128 */ this.rightAnkleItems_.selectItem(item); +/* 129 */ break; +/* */ case 21: +/* 131 */ this.leftAnkleItems_.selectItem(item); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 139 */ ready(); +/* */ } +/* */ +/* */ +/* */ protected void build() +/* */ { +/* 145 */ setBackground(Color.cyan); +/* 146 */ setForeground(Color.black); +/* 147 */ GridBagLayout gbag = new GridBagLayout(); +/* 148 */ setLayout(gbag); +/* 149 */ GridBagConstraints c = new GridBagConstraints(); +/* */ +/* 151 */ Font f1 = +/* 152 */ new Font(Console.message("ConsoleFont"), 1, 18); +/* 153 */ Font f2 = +/* 154 */ new Font(Console.message("ConsoleFont"), 0, 12); +/* */ +/* 156 */ Label invLabel = new Label("Inventory"); +/* 157 */ c.gridx = 2; +/* 158 */ c.gridy = 0; +/* 159 */ c.weightx = 3.0D; +/* 160 */ invLabel.setFont(f1); +/* 161 */ add(gbag, invLabel, c); +/* */ +/* 163 */ Label rwLabel = new Label("Right Hand"); +/* 164 */ c.gridx = 4; +/* 165 */ c.gridy = 4; +/* 166 */ c.weightx = 1.0D; +/* 167 */ rwLabel.setFont(f2); +/* */ +/* 169 */ add(gbag, rwLabel, c); +/* 170 */ c.gridy = 5; +/* 171 */ c.weighty = 1.0D; +/* 172 */ this.rightWristItems_.setFont(f2); +/* 173 */ add(gbag, this.rightWristItems_, c); +/* */ +/* 175 */ c.gridx = 3; +/* 176 */ c.gridy = 5; +/* 177 */ c.weighty = 1.0D; +/* 178 */ c.weightx = 1.0D; +/* 179 */ add(gbag, this.rightWristIcon_, c); +/* */ +/* 181 */ Label lwLabel = new Label("Left Hand"); +/* 182 */ c.gridx = 0; +/* 183 */ c.gridy = 4; +/* 184 */ c.weighty = 1.0D; +/* 185 */ lwLabel.setFont(f2); +/* 186 */ add(gbag, lwLabel, c); +/* */ +/* 188 */ c.gridy = 5; +/* 189 */ c.weighty = 1.0D; +/* 190 */ this.leftWristItems_.setFont(f2); +/* 191 */ add(gbag, this.leftWristItems_, c); +/* */ +/* 193 */ c.gridx = 1; +/* 194 */ c.gridy = 5; +/* 195 */ c.weighty = 1.0D; +/* 196 */ c.weightx = 1.0D; +/* 197 */ add(gbag, this.leftWristIcon_, c); +/* */ +/* 199 */ Label headLabel = new Label("Head"); +/* 200 */ c.gridx = 2; +/* 201 */ c.gridy = 2; +/* 202 */ c.weighty = 1.0D; +/* 203 */ headLabel.setFont(f2); +/* 204 */ add(gbag, headLabel, c); +/* */ +/* 206 */ c.gridy = 3; +/* 207 */ c.weighty = 1.0D; +/* 208 */ this.headItems_.setFont(f2); +/* 209 */ add(gbag, this.headItems_, c); +/* */ +/* 211 */ c.gridx = 2; +/* 212 */ c.gridy = 4; +/* 213 */ c.weighty = 1.0D; +/* 214 */ c.weightx = 1.0D; +/* 215 */ add(gbag, this.headIcon_, c); +/* */ +/* 217 */ Label raLabel = new Label("Right Foot"); +/* 218 */ c.gridx = 4; +/* 219 */ c.gridy = 6; +/* 220 */ c.weightx = 1.0D; +/* 221 */ raLabel.setFont(f2); +/* 222 */ add(gbag, raLabel, c); +/* */ +/* 224 */ c.gridy = 7; +/* 225 */ c.weighty = 0.0D; +/* 226 */ this.rightAnkleItems_.setFont(f2); +/* 227 */ add(gbag, this.rightAnkleItems_, c); +/* */ +/* 229 */ c.gridx = 3; +/* 230 */ c.gridy = 7; +/* 231 */ c.weighty = 1.0D; +/* 232 */ c.weightx = 1.0D; +/* 233 */ add(gbag, this.rightAnkleIcon_, c); +/* */ +/* 235 */ Label laLabel = new Label("Left Foot"); +/* 236 */ c.gridx = 0; +/* 237 */ c.gridy = 6; +/* 238 */ c.weighty = 1.0D; +/* 239 */ laLabel.setFont(f2); +/* 240 */ add(gbag, laLabel, c); +/* */ +/* 242 */ c.gridy = 7; +/* 243 */ c.weighty = 0.0D; +/* 244 */ this.leftAnkleItems_.setFont(f2); +/* 245 */ add(gbag, this.leftAnkleItems_, c); +/* */ +/* 247 */ c.gridx = 1; +/* 248 */ c.gridy = 7; +/* 249 */ c.weighty = 1.0D; +/* 250 */ c.weightx = 1.0D; +/* 251 */ add(gbag, this.leftAnkleIcon_, c); +/* */ +/* 253 */ c.gridx = 0; +/* 254 */ c.gridy = 10; +/* 255 */ c.weightx = 2.0D; +/* 256 */ c.weighty = 1.0D; +/* 257 */ this.okButton_.setFont(f2); +/* 258 */ add(gbag, this.okButton_, c); +/* */ +/* 260 */ c.gridx = 4; +/* 261 */ c.gridy = 10; +/* 262 */ this.cancelButton_.setFont(f2); +/* 263 */ add(gbag, this.cancelButton_, c); +/* */ +/* 265 */ setSize(360, 300); +/* */ } +/* */ +/* */ public synchronized boolean done(boolean confirmed) +/* */ { +/* 270 */ Vector equippedItems = new Vector(); +/* */ +/* */ EquippableItem eItem; +/* */ +/* 274 */ if ((eItem = this.rightWristItems_.getSelected()) != null) +/* */ { +/* 276 */ equippedItems.add(eItem); +/* */ } +/* */ +/* 279 */ if ((eItem = this.leftWristItems_.getSelected()) != null) +/* */ { +/* 281 */ equippedItems.add(eItem); +/* */ } +/* */ +/* 284 */ if ((eItem = this.headItems_.getSelected()) != null) +/* */ { +/* 286 */ equippedItems.add(eItem); +/* */ } +/* */ +/* 289 */ if ((eItem = this.leftAnkleItems_.getSelected()) != null) +/* */ { +/* 291 */ equippedItems.add(eItem); +/* */ } +/* */ +/* 294 */ if ((eItem = this.rightAnkleItems_.getSelected()) != null) +/* */ { +/* 296 */ equippedItems.add(eItem); +/* */ } +/* */ +/* 299 */ if (confirmed) +/* */ { +/* 301 */ InventoryManager im = InventoryManager.getInventoryManager(); +/* */ +/* 303 */ im.setEquippedItems(equippedItems); +/* */ } +/* */ +/* 306 */ return super.done(confirmed); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) +/* */ { +/* 312 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) +/* */ { +/* 318 */ Object target = event.target; +/* */ +/* */ +/* */ +/* 322 */ URL imageURL = defaultImageURL; +/* 323 */ if (target == this.leftWristItems_) +/* */ { +/* 325 */ InventoryItem item = this.leftWristItems_.getSelected(); +/* */ +/* 327 */ if (item != null) +/* */ { +/* 329 */ imageURL = item.getItemGraphicLocation(); +/* */ } +/* */ +/* 332 */ setIcon(this.leftWristIcon_, imageURL); +/* */ +/* 334 */ return true; +/* */ } +/* 336 */ if (target == this.rightWristItems_) +/* */ { +/* 338 */ InventoryItem item = this.rightWristItems_.getSelected(); +/* */ +/* 340 */ if (item != null) +/* */ { +/* 342 */ imageURL = item.getItemGraphicLocation(); +/* */ } +/* */ +/* 345 */ setIcon(this.rightWristIcon_, imageURL); +/* */ +/* 347 */ return true; +/* */ } +/* 349 */ if (target == this.headItems_) +/* */ { +/* 351 */ InventoryItem item = this.headItems_.getSelected(); +/* */ +/* 353 */ if (item != null) +/* */ { +/* 355 */ imageURL = item.getItemGraphicLocation(); +/* */ } +/* */ +/* 358 */ setIcon(this.headIcon_, imageURL); +/* */ +/* 360 */ return true; +/* */ } +/* 362 */ if (target == this.leftAnkleItems_) +/* */ { +/* 364 */ InventoryItem item = this.leftAnkleItems_.getSelected(); +/* */ +/* 366 */ if (item != null) +/* */ { +/* 368 */ imageURL = item.getItemGraphicLocation(); +/* */ } +/* */ +/* 371 */ setIcon(this.leftAnkleIcon_, imageURL); +/* */ +/* 373 */ return true; +/* */ } +/* 375 */ if (target == this.rightAnkleItems_) +/* */ { +/* 377 */ InventoryItem item = this.rightAnkleItems_.getSelected(); +/* */ +/* 379 */ if (item != null) +/* */ { +/* 381 */ imageURL = item.getItemGraphicLocation(); +/* */ } +/* */ +/* 384 */ setIcon(this.rightAnkleIcon_, imageURL); +/* */ +/* 386 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 391 */ if (target == this.okButton_) +/* */ { +/* 393 */ return done(true); +/* */ } +/* 395 */ if (target == this.cancelButton_) +/* */ { +/* 397 */ return done(false); +/* */ } +/* */ +/* */ +/* 401 */ return false; +/* */ } +/* */ +/* */ private void setIcon(ImageCanvas ic, URL newLoc) +/* */ { +/* 406 */ ic.setNewImage(newLoc, getGraphics()); +/* 407 */ repaint(); +/* */ } +/* */ +/* */ +/* 411 */ public void savePosAndSize(Object state) { lastPosAndSize = state; } +/* 412 */ public Object restorePosAndSize() { return lastPosAndSize; } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 417 */ if (key == 27) +/* 418 */ return done(false); +/* 419 */ return super.keyDown(event, key); +/* */ } +/* */ +/* */ +/* */ +/* */ protected synchronized void activeCallback() +/* */ { +/* 426 */ notify(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryItem.java b/NET/worlds/scape/InventoryItem.java new file mode 100644 index 0000000..dfb088e --- /dev/null +++ b/NET/worlds/scape/InventoryItem.java @@ -0,0 +1,89 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ public class InventoryItem +/* */ { +/* */ protected String itemId_; +/* */ protected String itemName_; +/* */ protected int itemQuantity_; +/* */ protected URL itemGraphicLocation_; +/* */ +/* */ public InventoryItem(String id, String name) +/* */ { +/* 16 */ this.itemId_ = id; +/* 17 */ this.itemName_ = name; +/* 18 */ this.itemQuantity_ = 1; +/* */ } +/* */ +/* */ +/* */ public InventoryItem(String id, String name, int qty) +/* */ { +/* 24 */ this.itemId_ = id; +/* 25 */ this.itemName_ = name; +/* 26 */ this.itemQuantity_ = qty; +/* */ } +/* */ +/* */ public InventoryItem(InventoryItem in) +/* */ { +/* 31 */ this.itemId_ = in.itemId_; +/* 32 */ this.itemName_ = in.itemName_; +/* 33 */ this.itemQuantity_ = in.itemQuantity_; +/* 34 */ this.itemGraphicLocation_ = in.itemGraphicLocation_; +/* */ } +/* */ +/* */ +/* */ +/* */ public String getItemId() +/* */ { +/* 41 */ return this.itemId_; +/* */ } +/* */ +/* */ public void setItemId(String id) +/* */ { +/* 46 */ this.itemId_ = id; +/* */ } +/* */ +/* */ public String getItemName() +/* */ { +/* 51 */ return this.itemName_; +/* */ } +/* */ +/* */ public void setItemName(String name) +/* */ { +/* 56 */ this.itemName_ = name; +/* */ } +/* */ +/* */ public int getItemQuantity() +/* */ { +/* 61 */ return this.itemQuantity_; +/* */ } +/* */ +/* */ public void setQuantity(int qty) +/* */ { +/* 66 */ this.itemQuantity_ = qty; +/* */ } +/* */ +/* */ public URL getItemGraphicLocation() +/* */ { +/* 71 */ return this.itemGraphicLocation_; +/* */ } +/* */ +/* */ public void setItemGraphicLocation(URL newLoc) +/* */ { +/* 76 */ this.itemGraphicLocation_ = newLoc; +/* */ } +/* */ +/* */ public InventoryItem cloneItem() +/* */ { +/* 81 */ return new InventoryItem(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryItem.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryList.java b/NET/worlds/scape/InventoryList.java new file mode 100644 index 0000000..fe8c6ea --- /dev/null +++ b/NET/worlds/scape/InventoryList.java @@ -0,0 +1,474 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Choice; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class InventoryList +/* */ extends Choice +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Vector invItems_; +/* */ +/* */ public InventoryList() +/* */ { +/* 441 */ this.invItems_ = new Vector(); +/* 442 */ super.add("None"); +/* */ } +/* */ +/* */ public EquippableItem getSelected() +/* */ { +/* 447 */ int selectedIndex = super.getSelectedIndex(); +/* 448 */ if (selectedIndex > 0) +/* */ { +/* 450 */ return (EquippableItem)this.invItems_.elementAt(selectedIndex - 1); +/* */ } +/* */ +/* */ +/* 454 */ return null; +/* */ } +/* */ +/* */ +/* */ public void add(EquippableItem item) +/* */ { +/* 460 */ super.add(item.getItemName()); +/* 461 */ this.invItems_.add(item); +/* */ } +/* */ +/* */ public void selectItem(EquippableItem item) +/* */ { +/* 466 */ super.select(item.getItemName()); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryList.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/InventoryManager.java b/NET/worlds/scape/InventoryManager.java new file mode 100644 index 0000000..f4e0abe --- /dev/null +++ b/NET/worlds/scape/InventoryManager.java @@ -0,0 +1,435 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.ActionsPart; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.TradeDialog; +/* */ import NET.worlds.console.WhisperManager; +/* */ import NET.worlds.core.ServerTableManager; +/* */ import NET.worlds.network.URL; +/* */ import java.io.PrintStream; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class InventoryManager +/* */ { +/* */ private static InventoryManager manager_; +/* */ private Hashtable masterList_; +/* */ private Hashtable inventory_; +/* */ private boolean initialized_; +/* */ private Vector equipped_; +/* */ +/* */ public synchronized void setEquippedItems(Vector equippedItems) +/* */ { +/* 29 */ removeEquippedItems(); +/* 30 */ this.equipped_ = equippedItems; +/* 31 */ equipItems(); +/* */ } +/* */ +/* */ public synchronized Vector getEquippedItems() { +/* 35 */ return this.equipped_; +/* */ } +/* */ +/* */ private synchronized void removeEquippedItems() { +/* 39 */ for (int i = 0; i < this.equipped_.size(); i++) { +/* 40 */ EquippableItem itemToEquip = +/* 41 */ (EquippableItem)this.equipped_.elementAt(i); +/* 42 */ Shape ownedShape = itemToEquip.getOwnedShape(); +/* 43 */ if (ownedShape != null) { +/* 44 */ ownedShape.detach(); +/* */ } +/* 46 */ itemToEquip.setOwnedShape(null); +/* */ } +/* */ } +/* */ +/* */ private synchronized void equipItems() { +/* 51 */ System.out.println("Equipped Items Size: " + this.equipped_.size()); +/* 52 */ for (int i = 0; i < this.equipped_.size(); i++) { +/* 53 */ Shape itemShape = new Shape(); +/* */ +/* */ +/* */ +/* 57 */ EquippableItem itemToEquip = +/* 58 */ (EquippableItem)this.equipped_.elementAt(i); +/* */ +/* 60 */ if (itemToEquip != null) { +/* */ try { +/* 62 */ itemShape.setURL(new URL(itemToEquip.getModelLocation())); +/* */ } catch (MalformedURLException url) { +/* 64 */ System.out.println("Badly formed URL for " + +/* 65 */ itemToEquip.getItemName()); +/* 66 */ continue; +/* */ } +/* */ +/* 69 */ float s = itemToEquip.getScale(); +/* 70 */ itemShape.scale(s, s, s); +/* 71 */ itemShape.pitch(itemToEquip.getPitch()); +/* 72 */ itemShape.roll(itemToEquip.getRoll()); +/* 73 */ itemShape.yaw(itemToEquip.getYaw()); +/* 74 */ itemShape.moveBy(itemToEquip.getXPos(), itemToEquip.getYPos(), +/* 75 */ itemToEquip.getZPos()); +/* 76 */ int properLoc = itemToEquip.getBodyLocation(); +/* */ +/* */ +/* 79 */ DeepEnumeration de = new DeepEnumeration(); +/* 80 */ Pilot.getActive().getChildren(de); +/* */ +/* 82 */ while (de.hasMoreElements()) { +/* 83 */ Object obj = de.nextElement(); +/* 84 */ if ((obj instanceof Shape)) { +/* 85 */ Shape objShape = (Shape)obj; +/* 86 */ int partType = objShape.getBodPartNum(); +/* 87 */ if (partType == properLoc) { +/* 88 */ objShape.add(itemShape); +/* 89 */ itemToEquip.setOwnedShape(itemShape); +/* 90 */ break; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Vector getEquippableItems() +/* */ { +/* 104 */ Vector retVal = new Vector(); +/* 105 */ Enumeration invEnum = this.inventory_.elements(); +/* */ +/* */ +/* */ +/* 109 */ while (invEnum.hasMoreElements()) { +/* 110 */ InventoryItem obj = (InventoryItem)invEnum.nextElement(); +/* 111 */ if ((obj instanceof EquippableItem)) { +/* 112 */ retVal.addElement(obj); +/* */ } +/* */ } +/* */ +/* */ +/* 117 */ return retVal; +/* */ } +/* */ +/* */ public Vector getInventoryAvatars() { +/* 121 */ Vector retVal = new Vector(); +/* 122 */ Enumeration invEnum = this.inventory_.elements(); +/* */ +/* */ +/* */ +/* 126 */ while (invEnum.hasMoreElements()) { +/* 127 */ InventoryItem obj = (InventoryItem)invEnum.nextElement(); +/* 128 */ if ((obj instanceof InventoryAvatar)) { +/* 129 */ retVal.addElement(obj); +/* */ } +/* */ } +/* */ +/* */ +/* 134 */ return retVal; +/* */ } +/* */ +/* */ public Hashtable getInventoryItems() { +/* 138 */ return this.inventory_; +/* */ } +/* */ +/* */ public int checkInventoryFor(String nm) { +/* 142 */ InventoryItem it = (InventoryItem)this.inventory_.get(nm); +/* 143 */ if (it != null) { +/* 144 */ return it.getItemQuantity(); +/* */ } +/* 146 */ return 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Vector getInventoryActionList() +/* */ { +/* 173 */ Vector retVal = new Vector(); +/* 174 */ Enumeration invEnum = this.inventory_.elements(); +/* */ +/* */ +/* */ +/* 178 */ while (invEnum.hasMoreElements()) { +/* 179 */ InventoryItem obj = (InventoryItem)invEnum.nextElement(); +/* 180 */ if ((obj instanceof InventoryAction)) { +/* 181 */ retVal.addElement(obj); +/* */ } +/* */ } +/* */ +/* */ +/* 186 */ return retVal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void doInventoryAction(String act) +/* */ { +/* 195 */ Vector actVector = getInventoryActionList(); +/* 196 */ for (int i = 0; i < actVector.size(); i++) { +/* 197 */ InventoryAction invAct = (InventoryAction)actVector.elementAt(i); +/* */ +/* 199 */ if (invAct.getItemName().equalsIgnoreCase(act)) { +/* 200 */ invAct.doAction(); +/* 201 */ String msg = "&|+deal>trade " + invAct.getItemId() + ","; +/* 202 */ TradeDialog.sendTradeMessage(msg); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void setInventory(String invString) { +/* 208 */ this.initialized_ = true; +/* 209 */ Hashtable newInv = parseInventoryString(invString); +/* 210 */ this.inventory_ = newInv; +/* */ +/* 212 */ Enumeration e = WhisperManager.whisperManager().tradeDialogs() +/* 213 */ .elements(); while (e.hasMoreElements()) { +/* 214 */ TradeDialog wd = (TradeDialog)e.nextElement(); +/* 215 */ wd.setTrading(true); +/* */ } +/* */ +/* */ +/* 219 */ if (Console.getActive() != null) { +/* 220 */ Console a = Console.getActive(); +/* */ +/* 222 */ a.inventoryChanged(); +/* */ +/* */ +/* 225 */ if (a.targetValid != a.isValidAv()) { +/* 226 */ a.resetAvatar(); +/* */ } +/* */ } +/* */ +/* 230 */ ActionsPart.updateActionDialog(); +/* */ } +/* */ +/* */ +/* */ +/* */ public Hashtable parseInventoryString(String invString) +/* */ { +/* 237 */ Hashtable newInventory = new Hashtable(); +/* */ +/* 239 */ if (invString == null) { +/* 240 */ return newInventory; +/* */ } +/* */ +/* 243 */ int len = invString.length(); +/* */ +/* 245 */ for (int itemStart = 0; itemStart < len;) { +/* 246 */ char ch = invString.charAt(itemStart); +/* 247 */ if ((ch < 'A') || (ch > 'Z')) { +/* 248 */ System.out.println("Bad inventory: " + invString); +/* 249 */ return newInventory; +/* */ } +/* */ +/* 252 */ for (int descLen = 1; +/* */ +/* 254 */ itemStart + descLen < len; descLen++) { +/* 255 */ ch = invString.charAt(itemStart + descLen); +/* 256 */ if ((ch < 'a') || (ch > 'z')) { +/* */ break; +/* */ } +/* */ } +/* 260 */ String shortName = invString.substring(itemStart, itemStart + +/* 261 */ descLen); +/* */ +/* 263 */ int countStart = itemStart + descLen; +/* 264 */ for (int countLen = 0; +/* */ +/* 266 */ countLen + countStart < len; countLen++) { +/* 267 */ ch = invString.charAt(countStart + countLen); +/* 268 */ if ((ch < '0') || (ch > '9')) { +/* */ break; +/* */ } +/* */ } +/* 272 */ int count = 1; +/* 273 */ if (countLen > 0) { +/* 274 */ count = Integer.parseInt(invString.substring(countStart, +/* 275 */ countStart + countLen)); +/* */ } +/* */ +/* 278 */ InventoryItem foundItem = +/* 279 */ (InventoryItem)this.masterList_.get(shortName); +/* 280 */ if (foundItem != null) { +/* 281 */ InventoryItem newItem = foundItem.cloneItem(); +/* */ +/* 283 */ newItem.setQuantity(count); +/* 284 */ newInventory.put(shortName, newItem); +/* */ } +/* */ +/* 287 */ itemStart = countStart + countLen; +/* */ } +/* */ +/* */ +/* 291 */ return newInventory; +/* */ } +/* */ +/* */ +/* */ public String properCase(String s) +/* */ { +/* 297 */ if (s.equals("")) { +/* 298 */ return s; +/* */ } +/* 300 */ return s.substring(0, 1).toUpperCase() + s.substring(1); +/* */ } +/* */ +/* */ public String getSingular(String sn) { +/* 304 */ InventoryItem item = (InventoryItem)this.masterList_.get(sn); +/* */ +/* 306 */ if (item != null) { +/* 307 */ return item.getItemName(); +/* */ } +/* 309 */ return "unknown" + sn; +/* */ } +/* */ +/* */ public String getPlural(String sn) +/* */ { +/* 314 */ return getSingular(sn) + "s"; +/* */ } +/* */ +/* */ public String itemName(String sn, int num) { +/* 318 */ if (num == 1) { +/* 319 */ return "a " + getSingular(sn); +/* */ } +/* 321 */ String retVal = num + " " + getPlural(sn); +/* 322 */ return retVal; +/* */ } +/* */ +/* */ public String itemName(InventoryItem item) +/* */ { +/* 327 */ return itemName(item.getItemId(), item.getItemQuantity()); +/* */ } +/* */ +/* */ +/* */ private InventoryManager() +/* */ { +/* 333 */ this.inventory_ = new Hashtable(); +/* 334 */ this.masterList_ = new Hashtable(); +/* 335 */ this.initialized_ = false; +/* 336 */ this.equipped_ = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* 341 */ ServerTableManager stm = ServerTableManager.instance(); +/* */ +/* 343 */ int invVersion = stm.getFileVersion(); +/* */ +/* 345 */ String[] invStrings = stm.getTable("invList"); +/* 346 */ String[] graphicStrings = new String[0]; +/* 347 */ if (invVersion > 1) { +/* 348 */ graphicStrings = stm.getTable("graphicList"); +/* */ } +/* */ +/* 351 */ URL defaultImageURL = URL.make("home:..\\default.gif"); +/* */ +/* 353 */ if (invStrings != null) { +/* 354 */ int numStringsPerItem = 12; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 361 */ for (int i = 0; i < invStrings.length; i += numStringsPerItem) { +/* 362 */ String id = invStrings[i]; +/* 363 */ String name = invStrings[(i + 2)]; +/* 364 */ String model = invStrings[(i + 3)]; +/* 365 */ int loc = Double.valueOf(invStrings[(i + 4)]).intValue(); +/* 366 */ float scale = Double.valueOf(invStrings[(i + 5)]).floatValue(); +/* 367 */ int pitch = Double.valueOf(invStrings[(i + 6)]).intValue(); +/* 368 */ int roll = Double.valueOf(invStrings[(i + 7)]).intValue(); +/* 369 */ int yaw = Double.valueOf(invStrings[(i + 8)]).intValue(); +/* 370 */ float xPos = Double.valueOf(invStrings[(i + 9)]).floatValue(); +/* 371 */ float yPos = Double.valueOf(invStrings[(i + 10)]).floatValue(); +/* 372 */ float zPos = Double.valueOf(invStrings[(i + 11)]).floatValue(); +/* */ +/* 374 */ URL graphic = null; +/* */ +/* 376 */ if ((invVersion > 1) && (graphicStrings.length > i / 6 + 1)) { +/* 377 */ String gString = graphicStrings[(i / 6 + 1)]; +/* 378 */ if (gString != "default") { +/* 379 */ graphic = URL.make(gString); +/* */ } +/* */ } +/* */ +/* 383 */ if (graphic == null) { +/* 384 */ graphic = defaultImageURL; +/* */ } +/* */ +/* */ InventoryItem newItem; +/* */ InventoryItem newItem; +/* 389 */ if (id.charAt(0) == 'H') { +/* 390 */ newItem = InventoryAction.createAction(id, name, 1); } else { InventoryItem newItem; +/* 391 */ if (id.charAt(0) == 'W') { +/* 392 */ newItem = new EquippableItem(id, name, 1, model, scale, +/* 393 */ loc, xPos, yPos, zPos, pitch, roll, yaw); } else { InventoryItem newItem; +/* 394 */ if (id.charAt(0) == 'V') { +/* 395 */ newItem = new InventoryAvatar(id, name, 1); +/* */ } else +/* 397 */ newItem = new InventoryItem(id, name, 1); +/* */ } +/* */ } +/* 400 */ newItem.setItemGraphicLocation(graphic); +/* */ +/* 402 */ this.masterList_.put(id, newItem); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public static InventoryManager getInventoryManager() { +/* 408 */ if (manager_ == null) { +/* 409 */ manager_ = new InventoryManager(); +/* */ } +/* */ +/* 412 */ return manager_; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean inventoryInitialized() +/* */ { +/* 427 */ return this.initialized_; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\InventoryManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ItemNotAvailableDialog.java b/NET/worlds/scape/ItemNotAvailableDialog.java new file mode 100644 index 0000000..0a23386 --- /dev/null +++ b/NET/worlds/scape/ItemNotAvailableDialog.java @@ -0,0 +1,62 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.ImageButtons; +/* */ import NET.worlds.console.ImageButtonsCallback; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Rectangle; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ItemNotAvailableDialog +/* */ extends PolledDialog +/* */ implements ImageButtonsCallback +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private ImageButtons ib; +/* */ +/* */ public ItemNotAvailableDialog(Window parent, DialogReceiver receiver) +/* */ { +/* 28 */ super(parent, receiver, Console.message("Not-Available"), false); +/* 29 */ setAlignment(1); +/* 30 */ Rectangle[] rects = new Rectangle[1]; +/* 31 */ rects[0] = new Rectangle(101, 22, 48, 19); +/* 32 */ this.ib = new ImageButtons(Console.message("notavail.gif"), rects, this); +/* 33 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 38 */ add("Center", this.ib); +/* */ } +/* */ +/* */ public Object imageButtonsCallback(Component who, int which) +/* */ { +/* 43 */ done(false); +/* 44 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 50 */ if (key == 27) +/* 51 */ return done(false); +/* 52 */ if (key == 10) +/* 53 */ return done(false); +/* 54 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ItemNotAvailableDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Key.java b/NET/worlds/scape/Key.java new file mode 100644 index 0000000..cb80e79 --- /dev/null +++ b/NET/worlds/scape/Key.java @@ -0,0 +1,60 @@ +package NET.worlds.scape; + +public abstract interface Key +{ + public static final char bkspace = ''; + public static final char tab = ''; + public static final char enter = ''; + public static final char shift = ''; + public static final char ctrl = ''; + public static final char pause = ''; + public static final char capLock = ''; + public static final char esc = ''; + public static final char pgup = ''; + public static final char pgdn = ''; + public static final char end = ''; + public static final char home = ''; + public static final char left = ''; + public static final char up = ''; + public static final char right = ''; + public static final char down = ''; + public static final char insert = ''; + public static final char del = ''; + public static final char starPad = ''; + public static final char plusPad = ''; + public static final char minusPad = ''; + public static final char slashPad = ''; + public static final char f1 = ''; + public static final char f2 = ''; + public static final char f3 = ''; + public static final char f4 = ''; + public static final char f5 = ''; + public static final char f6 = ''; + public static final char f7 = ''; + public static final char f8 = ''; + public static final char f9 = ''; + public static final char f11 = ''; + public static final char f12 = ''; + public static final char numLock = ''; + public static final char scrollLock = ''; + public static final char semicolon = ''; + public static final char equals = ''; + public static final char comma = ''; + public static final char minusKbd = ''; + public static final char period = ''; + public static final char slashKbd = ''; + public static final char backQuote = ''; + public static final char openBrkt = ''; + public static final char backslash = ''; + public static final char closeBrkt = ''; + public static final char quote = ''; + public static final char leftMouse = ''; + public static final char rightMouse = ''; + public static final char centerMouse = ''; +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Key.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyCharEvent.java b/NET/worlds/scape/KeyCharEvent.java new file mode 100644 index 0000000..63e5b75 --- /dev/null +++ b/NET/worlds/scape/KeyCharEvent.java @@ -0,0 +1,44 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KeyCharEvent +/* */ extends KeyEvent +/* */ { +/* */ public KeyCharEvent(int time, WObject target, char key) +/* */ { +/* 20 */ super(time, null, target, key); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 32 */ if (((o instanceof KeyCharHandler)) && +/* 33 */ (((KeyCharHandler)o).handle(this))) { +/* 34 */ return true; +/* */ } +/* 36 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyCharEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyCharHandler.java b/NET/worlds/scape/KeyCharHandler.java new file mode 100644 index 0000000..c1c6de3 --- /dev/null +++ b/NET/worlds/scape/KeyCharHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface KeyCharHandler +{ + public abstract boolean handle(KeyCharEvent paramKeyCharEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyCharHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyDownEvent.java b/NET/worlds/scape/KeyDownEvent.java new file mode 100644 index 0000000..8788cc5 --- /dev/null +++ b/NET/worlds/scape/KeyDownEvent.java @@ -0,0 +1,43 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KeyDownEvent +/* */ extends KeyEvent +/* */ { +/* */ public KeyDownEvent(int time, WObject target, char key) +/* */ { +/* 20 */ super(time, null, target, key); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 32 */ if (((o instanceof KeyDownHandler)) && +/* 33 */ (((KeyDownHandler)o).handle(this))) +/* 34 */ return true; +/* 35 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyDownEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyDownHandler.java b/NET/worlds/scape/KeyDownHandler.java new file mode 100644 index 0000000..dcaf12e --- /dev/null +++ b/NET/worlds/scape/KeyDownHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface KeyDownHandler +{ + public abstract boolean handle(KeyDownEvent paramKeyDownEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyDownHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyEvent.java b/NET/worlds/scape/KeyEvent.java new file mode 100644 index 0000000..e62d1f3 --- /dev/null +++ b/NET/worlds/scape/KeyEvent.java @@ -0,0 +1,60 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KeyEvent +/* */ extends UserEvent +/* */ { +/* */ char key; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public KeyEvent(int time, Object source, WObject target, char key) +/* */ { +/* 21 */ super(time, source, target); +/* */ +/* 23 */ this.key = key; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 40 */ if (((o instanceof KeyHandler)) && +/* 41 */ (((KeyHandler)o).handle(this))) { +/* 42 */ return true; +/* */ } +/* 44 */ return super.deliver(o); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public char getKey() +/* */ { +/* 52 */ return this.key; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyHandler.java b/NET/worlds/scape/KeyHandler.java new file mode 100644 index 0000000..fa0bf6d --- /dev/null +++ b/NET/worlds/scape/KeyHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface KeyHandler +{ + public abstract boolean handle(KeyEvent paramKeyEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyUpEvent.java b/NET/worlds/scape/KeyUpEvent.java new file mode 100644 index 0000000..e6a9781 --- /dev/null +++ b/NET/worlds/scape/KeyUpEvent.java @@ -0,0 +1,43 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class KeyUpEvent +/* */ extends KeyEvent +/* */ { +/* */ public KeyUpEvent(int time, WObject target, char key) +/* */ { +/* 20 */ super(time, null, target, key); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 32 */ if (((o instanceof KeyUpHandler)) && +/* 33 */ (((KeyUpHandler)o).handle(this))) +/* 34 */ return true; +/* 35 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyUpEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/KeyUpHandler.java b/NET/worlds/scape/KeyUpHandler.java new file mode 100644 index 0000000..c6678b2 --- /dev/null +++ b/NET/worlds/scape/KeyUpHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface KeyUpHandler +{ + public abstract boolean handle(KeyUpEvent paramKeyUpEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\KeyUpHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibEntContentEditorDialog.java b/NET/worlds/scape/LibEntContentEditorDialog.java new file mode 100644 index 0000000..7b3949a --- /dev/null +++ b/NET/worlds/scape/LibEntContentEditorDialog.java @@ -0,0 +1,170 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.Choice; +/* */ import java.awt.Event; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.List; +/* */ import java.awt.TextField; +/* */ import java.util.Enumeration; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class LibEntContentEditorDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Property property; +/* 32 */ private TextField strField = new TextField(40); +/* 33 */ private List list = new List(); +/* 34 */ private Choice choice = new Choice(); +/* */ +/* */ private EditTile parent; +/* 37 */ private static String[] choices = { +/* 38 */ "WObject files", +/* 39 */ "Behavior/Action files", +/* 40 */ "Texture files" }; +/* */ +/* */ +/* 43 */ private static String[] dirs = { +/* 44 */ LibrariesTile.getLibSubdir(), +/* 45 */ LibrariesTile.getLibSubdir(), +/* 46 */ LibrariesTile.getLibSubdir() }; +/* */ +/* */ +/* 49 */ private static String[] exts = { +/* 50 */ WObject.getSaveExtension(), +/* 51 */ "class", +/* 52 */ TextureDecoder.getAllExts() }; +/* */ +/* */ +/* */ +/* */ LibEntContentEditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 58 */ super(Console.getFrame(), parent, title); +/* 59 */ this.property = property; +/* 60 */ this.parent = parent; +/* 61 */ ready(); +/* */ } +/* */ +/* */ private void matchExt(String name) +/* */ { +/* 66 */ int lastDot = name.lastIndexOf('.'); +/* 67 */ if (lastDot != -1) { +/* 68 */ String ext = name.substring(lastDot + 1).toLowerCase(); +/* 69 */ for (int i = 0; i < exts.length; i++) { +/* 70 */ StringTokenizer t = new StringTokenizer(exts[i], ";"); +/* 71 */ while (t.hasMoreTokens()) { +/* 72 */ if (ext.equals(t.nextToken())) { +/* 73 */ this.choice.select(i); +/* 74 */ return; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ protected void build() { +/* 82 */ for (int i = 0; i < choices.length; i++) { +/* 83 */ this.choice.addItem(choices[i]); +/* */ } +/* 85 */ String name = (String)this.property.get(); +/* 86 */ if (name == null) { +/* 87 */ name = ""; +/* */ } +/* 89 */ this.strField.setText(name); +/* */ +/* 91 */ matchExt(name); +/* */ +/* 93 */ setListContents(); +/* */ +/* 95 */ GridBagConstraints c = new GridBagConstraints(); +/* 96 */ c.fill = 2; +/* 97 */ c.weightx = 1.0D; +/* 98 */ c.weighty = 1.0D; +/* 99 */ c.gridwidth = 0; +/* 100 */ add(this.gbag, this.strField, c); +/* 101 */ c.gridheight = 6; +/* 102 */ add(this.gbag, this.list, c); +/* 103 */ c.gridheight = 1; +/* 104 */ add(this.gbag, this.choice, c); +/* 105 */ super.build(); +/* */ } +/* */ +/* */ private void setListContents() +/* */ { +/* 110 */ int count = this.list.getItemCount(); +/* 111 */ if (count != 0) +/* */ { +/* 113 */ this.list.removeAll(); +/* */ } +/* 115 */ int chosen = this.choice.getSelectedIndex(); +/* 116 */ Enumeration files = new FileList(dirs[chosen], exts[chosen]) +/* 117 */ .getList().elements(); +/* 118 */ while (files.hasMoreElements()) { +/* 119 */ this.list.add((String)files.nextElement()); +/* */ } +/* 121 */ String s = (String)this.property.get(); +/* 122 */ this.strField.setText(s != null ? s : ""); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) { +/* 127 */ if (event.id == 701) { +/* 128 */ this.strField.setText(this.list.getSelectedItem()); +/* 129 */ this.strField.selectAll(); +/* */ } +/* 131 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean action(Event event, Object what) +/* */ { +/* 137 */ if (event.target == this.list) +/* 138 */ event.target = this.okButton; +/* 139 */ if (event.target == this.choice) +/* 140 */ setListContents(); +/* 141 */ return super.action(event, what); +/* */ } +/* */ +/* */ protected boolean setValue() +/* */ { +/* 146 */ String text = this.strField.getText().trim(); +/* 147 */ if (text.length() != 0) { +/* 148 */ this.parent.addUndoableSet(this.property, text); +/* 149 */ return true; +/* */ } +/* 151 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 158 */ super.setVisible(visible); +/* 159 */ if (visible) { +/* 160 */ this.strField.requestFocus(); +/* 161 */ this.strField.selectAll(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibEntContentEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibEntContentPropertyEditor.java b/NET/worlds/scape/LibEntContentPropertyEditor.java new file mode 100644 index 0000000..f8df8ea --- /dev/null +++ b/NET/worlds/scape/LibEntContentPropertyEditor.java @@ -0,0 +1,188 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class LibEntContentPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private LibEntContentPropertyEditor(Property property) +/* */ { +/* 170 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 175 */ return new LibEntContentEditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 180 */ return property.setEditor(new LibEntContentPropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibEntContentPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibEventHandler.java b/NET/worlds/scape/LibEventHandler.java new file mode 100644 index 0000000..106d66c --- /dev/null +++ b/NET/worlds/scape/LibEventHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface LibEventHandler +{ + public abstract void libraryChanged(Library paramLibrary); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibEventHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibrariesTile.java b/NET/worlds/scape/LibrariesTile.java new file mode 100644 index 0000000..1048bb5 --- /dev/null +++ b/NET/worlds/scape/LibrariesTile.java @@ -0,0 +1,406 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Cursor; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Color; +/* */ import java.awt.Component; +/* */ import java.awt.Point; +/* */ import java.io.File; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class LibrariesTile +/* */ extends TabbedPanel +/* */ implements LibEventHandler, Properties, MainCallback, LibraryDropTarget +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private static final int NOTHING = 0; +/* */ private static final int ADD_LIBRARY = 1; +/* */ private static final int ADD_ELEMENT = 2; +/* */ private static URL libURL; +/* */ private static String libSubdir; +/* */ +/* */ static +/* */ { +/* 58 */ libURL = URL.make("home:libraries/"); +/* */ +/* */ +/* */ +/* */ +/* 63 */ String s = libURL.unalias(); +/* 64 */ libSubdir = s.substring(0, s.length() - 1); +/* */ } +/* */ +/* */ +/* 68 */ public static String getLibSubdir() { return libSubdir; } +/* */ +/* 70 */ private Vector libraries = new Vector(); +/* 71 */ private int queue = 0; +/* */ +/* 73 */ private boolean iconsVisible = false; +/* */ private Cursor dragCursor; +/* */ private Cursor cantCursor; +/* */ private LibraryEntry leftClickedOn; +/* */ +/* 78 */ public LibrariesTile() { setBackground(Color.lightGray); +/* */ +/* */ +/* 81 */ Vector libNames = new FileList(libSubdir, "library").getList(); +/* */ +/* */ +/* 84 */ Enumeration e = libNames.elements(); +/* 85 */ while (e.hasMoreElements()) { +/* 86 */ Library lib = Library.load( +/* 87 */ URL.make(libURL, (String)e.nextElement())); +/* 88 */ if (lib != null) +/* 89 */ addLibrary(lib); +/* */ } +/* 91 */ if (this.libraries.size() != 0) +/* 92 */ select(0); +/* 93 */ Main.register(this); +/* */ } +/* */ +/* */ public synchronized void addLibrary() +/* */ { +/* 98 */ if (this.queue == 0) { +/* 99 */ this.queue = 1; +/* */ } +/* */ } +/* */ +/* */ public synchronized void addElement() { +/* 104 */ if (this.queue == 0) { +/* 105 */ this.queue = 2; +/* */ } +/* */ } +/* */ +/* */ public synchronized void mainCallback() { +/* 110 */ switch (this.queue) { +/* */ case 1: +/* 112 */ syncAddLibrary(new Library()); +/* 113 */ break; +/* */ case 2: +/* 115 */ syncAddElement(new LibraryEntry()); +/* */ } +/* */ +/* 118 */ this.queue = 0; +/* */ } +/* */ +/* */ +/* */ private boolean isUniqueLibraryURL(URL name) +/* */ { +/* 124 */ if (name != null) { +/* 125 */ Enumeration e = this.libraries.elements(); +/* 126 */ while (e.hasMoreElements()) { +/* 127 */ Library lib = (Library)e.nextElement(); +/* 128 */ if (lib.getSourceURL().equals(name)) +/* 129 */ return false; +/* */ } +/* 131 */ return true; +/* */ } +/* 133 */ return false; +/* */ } +/* */ +/* */ private boolean isUniqueLibraryName(String name) +/* */ { +/* 138 */ if (name != null) { +/* 139 */ Enumeration e = this.libraries.elements(); +/* 140 */ while (e.hasMoreElements()) { +/* 141 */ Library lib = (Library)e.nextElement(); +/* 142 */ if (lib.getName().equals(name)) +/* 143 */ return false; +/* */ } +/* 145 */ return true; +/* */ } +/* 147 */ return false; +/* */ } +/* */ +/* */ private void syncAddLibrary(Library lib) +/* */ { +/* 152 */ boolean newEntry = lib.getNameMaybeNull() == null; +/* */ +/* */ +/* 155 */ if (!isUniqueLibraryURL(lib.getSourceURL())) +/* */ { +/* 157 */ int i = 1; +/* */ URL url; +/* 159 */ do { url = URL.make(libURL, "lib" + i++ + ".library"); +/* 160 */ } while (!isUniqueLibraryURL(url)); +/* 161 */ lib.setSourceURL(url); +/* */ } +/* */ +/* */ +/* 165 */ if (this.libraries.size() == 0) { +/* 166 */ File f = new File(libSubdir); +/* 167 */ f.mkdir(); +/* */ } +/* */ +/* */ +/* 171 */ if (!isUniqueLibraryName(lib.getNameMaybeNull())) +/* */ { +/* 173 */ int num = 1; +/* */ String libName; +/* 175 */ do { libName = "Category" + num++; +/* 176 */ } while (!isUniqueLibraryName(libName)); +/* 177 */ lib.setName(libName); +/* */ } +/* 179 */ if (saveAllowed()) { +/* 180 */ lib.save(); +/* */ } else +/* 182 */ Console.println(Console.message("AllowChangeLibrary")); +/* 183 */ addLibrary(lib); +/* */ +/* 185 */ if (newEntry) { +/* 186 */ select(this.libraries.indexOf(lib)); +/* */ } +/* */ } +/* */ +/* */ private void syncDeleteLibrary(Library lib) { +/* 191 */ if (saveAllowed()) { +/* 192 */ lib.delete(); +/* */ } else +/* 194 */ Console.println(Console.message("AllowChangeLibrary")); +/* 195 */ int index = this.libraries.indexOf(lib); +/* 196 */ this.libraries.removeElementAt(index); +/* 197 */ removeItem(index); +/* */ } +/* */ +/* */ private void syncAddElement(LibraryEntry ent) +/* */ { +/* 202 */ if (this.libraries.size() != 0) { +/* 203 */ int selected = selected(); +/* 204 */ Library lib = (Library)this.libraries.elementAt(selected); +/* 205 */ lib.add(ent); +/* */ } +/* */ } +/* */ +/* */ private void addLibrary(Library lib) +/* */ { +/* 211 */ int count = this.libraries.size(); +/* 212 */ String name = lib.getName(); +/* */ +/* 214 */ for (int i = 0; i < count; i++) { +/* 215 */ if (name.compareTo(((Library)this.libraries.elementAt(i)).getName()) < 0) +/* */ break; +/* */ } +/* 218 */ this.libraries.insertElementAt(lib, i); +/* 219 */ insertItem(i, lib.getName(), +/* 220 */ new ScrollingImagePanel(this, lib.getContents(), +/* 221 */ this.iconsVisible)); +/* 222 */ lib.setEventHandler(this); +/* 223 */ lib.setOwningDialog(this); +/* */ } +/* */ +/* 226 */ public boolean isIconsVisible() { return this.iconsVisible; } +/* */ +/* */ public void setIconsVisible(boolean showIcons) { +/* 229 */ this.iconsVisible = showIcons; +/* 230 */ int count = this.libraries.size(); +/* */ +/* 232 */ for (int i = 0; i < count; i++) { +/* 233 */ ScrollingImagePanel c = (ScrollingImagePanel)getComponent(i); +/* 234 */ c.setIconsVisible(showIcons); +/* */ } +/* */ } +/* */ +/* */ public void libraryChanged(Library lib) +/* */ { +/* 240 */ Library selected = (Library)this.libraries.elementAt(selected()); +/* 241 */ int index = this.libraries.indexOf(lib); +/* 242 */ this.libraries.removeElementAt(index); +/* 243 */ removeItem(index); +/* 244 */ addLibrary(lib); +/* 245 */ select(this.libraries.indexOf(selected)); +/* 246 */ if (saveAllowed()) { +/* 247 */ lib.save(); +/* */ } else { +/* 249 */ Console.println(Console.message("AllowChangeLibrary")); +/* */ } +/* */ } +/* */ +/* */ private boolean saveAllowed() { +/* 254 */ return IniFile.gamma().getIniInt("AllowChangeLibrary", 0) == 1; +/* */ } +/* */ +/* */ private Library getLibrary(ScrollingImagePanel panel) +/* */ { +/* 259 */ int count = this.libraries.size(); +/* 260 */ for (int i = 0; i < count; i++) +/* 261 */ if (getComponent(i) == panel) +/* 262 */ return (Library)this.libraries.elementAt(i); +/* 263 */ return null; +/* */ } +/* */ +/* */ private LibraryEntry getLibraryEntry(Component comp, Point location) +/* */ { +/* 268 */ if ((comp instanceof ScrollingImagePanel)) { +/* 269 */ ScrollingImagePanel panel = (ScrollingImagePanel)comp; +/* 270 */ Library lib = getLibrary(panel); +/* 271 */ if (lib != null) { +/* 272 */ int item = panel.itemAt(location); +/* 273 */ if (item >= 0) +/* 274 */ return lib.getEntry(item); +/* */ } +/* */ } +/* 277 */ return null; +/* */ } +/* */ +/* */ +/* */ private boolean maybeMoveEntry(LibraryEntry src, Component comp, Point loc) +/* */ { +/* 283 */ LibraryEntry dst = getLibraryEntry(comp, loc); +/* 284 */ if ((dst != null) && (dst != src)) { +/* 285 */ Library srcOwner = (Library)src.getOwner(); +/* 286 */ Library dstOwner = (Library)dst.getOwner(); +/* 287 */ assert (srcOwner == dstOwner); +/* 288 */ srcOwner.move(src, dst); +/* 289 */ return true; +/* */ } +/* 291 */ if (comp == this) { +/* 292 */ Library newLib = (Library)this.libraries.elementAt(itemAt(loc)); +/* 293 */ Library oldLib = (Library)src.getOwner(); +/* 294 */ if (newLib != oldLib) { +/* 295 */ oldLib.delete(src); +/* 296 */ newLib.add(src); +/* 297 */ return true; +/* */ } +/* */ } +/* 300 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void clickEvent(Component who, Point location, int flags) +/* */ { +/* 309 */ if ((flags & 0x1) != 0) +/* */ { +/* 311 */ if (((flags & 0x4) != 0) && (who == this)) { +/* 312 */ Console.getFrame().getEditTile().viewProperties( +/* 313 */ this.libraries.elementAt(itemAt(location))); } else { LibraryEntry ent; +/* 314 */ if ((ent = getLibraryEntry(who, location)) != null) { +/* 315 */ this.leftClickedOn = null; +/* 316 */ if (ent != null) { +/* 317 */ if ((flags & 0x4) != 0) { +/* 318 */ Console.getFrame().getEditTile().viewProperties(ent); +/* */ } else { +/* 320 */ this.leftClickedOn = ent; +/* 321 */ Console console = Console.getActive(); +/* 322 */ if (this.dragCursor == null) { +/* 323 */ this.dragCursor = new Cursor( +/* 324 */ URL.make("home:drag.cur")); +/* */ } else { +/* 326 */ this.dragCursor.detach(); +/* 327 */ console.addCursor(this.dragCursor); +/* 328 */ this.dragCursor.activate(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* 334 */ } else if ((flags & 0x2) != 0) { +/* 335 */ Cursor active = Cursor.getActive(); +/* 336 */ if ((active != null) && ((active == this.dragCursor) || +/* 337 */ (active == this.cantCursor))) +/* 338 */ Console.getActive().getCursor().activate(); +/* 339 */ if (this.leftClickedOn != null) { +/* 340 */ if (!maybeMoveEntry(this.leftClickedOn, who, location)) { +/* 341 */ URL url = this.leftClickedOn.getContentURL(); +/* 342 */ String propName = this.leftClickedOn.getPropertyName(true); +/* 343 */ if (url != null) +/* 344 */ Console.getFrame().getEditTile().libraryDrop( +/* 345 */ url, propName, who, location); +/* */ } +/* 347 */ this.leftClickedOn = null; +/* */ } +/* */ } +/* */ else { +/* 351 */ Cursor active = Cursor.getActive(); +/* 352 */ boolean isDropTarget = who instanceof LibraryDropTarget; +/* 353 */ if (active == this.dragCursor) { +/* 354 */ if (!isDropTarget) { +/* 355 */ Console console = Console.getActive(); +/* 356 */ if (this.cantCursor == null) { +/* 357 */ this.cantCursor = new Cursor( +/* 358 */ URL.make("system:CANNOT_CURSOR")); +/* */ } else { +/* 360 */ this.cantCursor.detach(); +/* 361 */ console.addCursor(this.cantCursor); +/* 362 */ this.cantCursor.activate(); +/* */ } +/* 364 */ this.cantCursor.activate(); +/* */ } +/* 366 */ } else if ((active != null) && (active == this.cantCursor) && +/* 367 */ (isDropTarget)) { +/* 368 */ this.dragCursor.activate(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 376 */ Object ret = null; +/* 377 */ switch (index - offset) { +/* */ case 0: +/* 379 */ if (mode == 0) { +/* 380 */ ret = PropAdder.make( +/* 381 */ new VectorProperty(this, index, "Contents")); +/* 382 */ } else if (mode == 1) { +/* 383 */ ret = this.libraries; +/* 384 */ } else if (mode == 3) { +/* 385 */ syncAddLibrary((Library)value); +/* 386 */ } else if (mode == 4) { +/* 387 */ syncDeleteLibrary((Library)value); +/* 388 */ } else if ((mode == 5) && ((value instanceof Library))) +/* 389 */ ret = value; +/* 390 */ break; +/* */ default: +/* 392 */ throw new NoSuchPropertyException(); +/* */ } +/* 394 */ return ret; +/* */ } +/* */ +/* 397 */ public Object propertyParent() { return null; } +/* */ +/* 399 */ public String toString() { return "Libraries"; } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibrariesTile.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Library.java b/NET/worlds/scape/Library.java new file mode 100644 index 0000000..4d35537 --- /dev/null +++ b/NET/worlds/scape/Library.java @@ -0,0 +1,216 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Library +/* */ extends SuperRoot +/* */ { +/* */ private Object owningDialog; +/* 39 */ private Vector contents = new Vector(); +/* */ private LibEventHandler handler; +/* */ protected String propertyName; +/* */ +/* */ public static Library load(URL url) +/* */ { +/* 45 */ return (Library)SuperRoot.readFile(url); +/* */ } +/* */ +/* */ public Library(URL url, String name) +/* */ { +/* 50 */ setSourceURL(url); +/* 51 */ setName(name); +/* */ } +/* */ +/* */ +/* */ public Library() {} +/* */ +/* */ public void save() +/* */ { +/* */ try +/* */ { +/* 61 */ saveFile(getSourceURL()); +/* */ } +/* */ catch (IOException localIOException) {} +/* */ } +/* */ +/* */ public void delete() { +/* 67 */ new File(getSourceURL().unalias()).delete(); +/* */ } +/* */ +/* */ public void add(LibraryEntry ent) +/* */ { +/* 72 */ assert (ent.getOwner() == null); +/* 73 */ this.contents.addElement(ent); +/* 74 */ super.add(ent); +/* 75 */ changed(); +/* */ } +/* */ +/* */ public void delete(LibraryEntry ent) +/* */ { +/* 80 */ boolean found = this.contents.removeElement(ent); +/* 81 */ assert (found); +/* 82 */ assert (ent.getOwner() == this); +/* 83 */ ent.detach(); +/* 84 */ changed(); +/* */ } +/* */ +/* */ public void move(LibraryEntry src, LibraryEntry dst) +/* */ { +/* 89 */ int oldPos = this.contents.indexOf(src); +/* 90 */ assert (oldPos != -1); +/* 91 */ int newPos = this.contents.indexOf(dst); +/* 92 */ assert (newPos != -1); +/* 93 */ this.contents.removeElement(src); +/* 94 */ this.contents.insertElementAt(src, newPos); +/* 95 */ changed(); +/* */ } +/* */ +/* */ void entryChanged(LibraryEntry which) +/* */ { +/* 100 */ changed(); +/* */ } +/* */ +/* */ private void changed() +/* */ { +/* 105 */ if (this.handler != null) +/* 106 */ this.handler.libraryChanged(this); +/* */ } +/* */ +/* 109 */ public Object getOwningDialog() { return this.owningDialog; } +/* */ +/* 111 */ public Vector getContents() { return (Vector)this.contents.clone(); } +/* 112 */ public String getPropertyName() { return this.propertyName; } +/* */ +/* */ public LibraryEntry getEntry(int index) +/* */ { +/* 116 */ return (LibraryEntry)this.contents.elementAt(index); +/* */ } +/* */ +/* 119 */ public void setOwningDialog(Object o) { this.owningDialog = o; } +/* 120 */ public void setName(String s) { super.setName(s);changed(); } +/* 121 */ public void setPropertyName(String s) { this.propertyName = s;changed(); +/* */ } +/* */ +/* */ public void setEventHandler(LibEventHandler handler) { +/* 125 */ this.handler = handler; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 134 */ Object ret = null; +/* 135 */ switch (index - offset) { +/* */ case 0: +/* 137 */ if (mode == 0) { +/* 138 */ ret = PropAdder.make( +/* 139 */ new VectorProperty(this, index, "Contents")); +/* 140 */ } else if (mode == 1) { +/* 141 */ ret = getContents(); +/* 142 */ } else if (mode == 4) { +/* 143 */ delete((LibraryEntry)value); +/* 144 */ } else if (mode == 3) { +/* 145 */ add((LibraryEntry)value); +/* 146 */ } else if ((mode == 5) && ((value instanceof LibraryEntry))) +/* 147 */ ret = value; +/* 148 */ break; +/* */ case 1: +/* 150 */ if (mode == 0) { +/* 151 */ ret = StringPropertyEditor.make( +/* 152 */ new Property(this, index, "Property Name") +/* 153 */ .allowSetNull()); +/* 154 */ } else if (mode == 1) { +/* 155 */ ret = getPropertyName(); +/* 156 */ } else if (mode == 2) +/* 157 */ setPropertyName((String)value); +/* 158 */ break; +/* */ default: +/* 160 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 162 */ return ret; +/* */ } +/* */ +/* */ public Object propertyParent() +/* */ { +/* 167 */ return getOwningDialog(); +/* */ } +/* */ +/* 170 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 174 */ s.saveVersion(2, classCookie); +/* 175 */ super.saveState(s); +/* 176 */ s.saveVector(this.contents); +/* 177 */ s.saveString(this.propertyName); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 182 */ Vector newContents = null; +/* */ +/* 184 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 186 */ setName(r.restoreString()); +/* 187 */ r.restoreString(); +/* 188 */ r.restoreString(); +/* 189 */ newContents = r.restoreVector(); +/* 190 */ break; +/* */ case 1: +/* 192 */ super.restoreState(r); +/* 193 */ r.restoreString(); +/* 194 */ r.restoreString(); +/* 195 */ newContents = r.restoreVector(); +/* 196 */ break; +/* */ case 2: +/* 198 */ super.restoreState(r); +/* 199 */ newContents = r.restoreVector(); +/* 200 */ this.propertyName = r.restoreString(); +/* 201 */ break; +/* */ default: +/* 203 */ throw new TooNewException(); +/* */ } +/* */ +/* 206 */ for (int i = 0; i < newContents.size(); i++) { +/* 207 */ add((LibraryEntry)newContents.elementAt(i)); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Library.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibraryDrop.java b/NET/worlds/scape/LibraryDrop.java new file mode 100644 index 0000000..faf67ed --- /dev/null +++ b/NET/worlds/scape/LibraryDrop.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface LibraryDrop +{ + public abstract boolean libraryDrop(EditTile paramEditTile, Object paramObject, boolean paramBoolean1, boolean paramBoolean2); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibraryDrop.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibraryDropTarget.java b/NET/worlds/scape/LibraryDropTarget.java new file mode 100644 index 0000000..3834802 --- /dev/null +++ b/NET/worlds/scape/LibraryDropTarget.java @@ -0,0 +1,9 @@ +package NET.worlds.scape; + +public abstract interface LibraryDropTarget {} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibraryDropTarget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LibraryEntry.java b/NET/worlds/scape/LibraryEntry.java new file mode 100644 index 0000000..8002335 --- /dev/null +++ b/NET/worlds/scape/LibraryEntry.java @@ -0,0 +1,151 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class LibraryEntry +/* */ extends SuperRoot +/* */ implements Iconic +/* */ { +/* */ protected URL iconURL; +/* */ protected URL contentURL; +/* */ protected String propertyName; +/* */ +/* */ public LibraryEntry() {} +/* */ +/* */ public LibraryEntry(String name, URL iconURL) +/* */ { +/* 37 */ setName(name); +/* 38 */ this.iconURL = iconURL; +/* */ } +/* */ +/* */ private void changed() +/* */ { +/* 43 */ Library owner = (Library)getOwner(); +/* 44 */ if (owner != null) +/* 45 */ owner.entryChanged(this); +/* */ } +/* */ +/* 48 */ public String getIconCaption() { return getName(); } +/* 49 */ public URL getIconURL() { return this.iconURL; } +/* 50 */ public URL getContentURL() { return this.contentURL; } +/* */ +/* */ public String getPropertyName(boolean checkParent) +/* */ { +/* */ Library owner; +/* 55 */ if ((this.propertyName == null) && (checkParent) && +/* 56 */ ((owner = (Library)getOwner()) != null)) +/* 57 */ return owner.getPropertyName(); +/* 58 */ return this.propertyName; +/* */ } +/* */ +/* 61 */ public void setName(String s) { super.setName(s);changed(); } +/* 62 */ public void setIconURL(URL s) { this.iconURL = s;changed(); } +/* 63 */ public void setContentURL(URL s) { this.contentURL = s;changed(); } +/* 64 */ public void setPropertyName(String s) { this.propertyName = s;changed(); +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException +/* */ { +/* 69 */ Object ret = null; +/* 70 */ switch (index - offset) { +/* */ case 0: +/* 72 */ if (mode == 0) { +/* 73 */ ret = URLPropertyEditor.make( +/* 74 */ new Property(this, index, "Icon").allowSetNull(), +/* 75 */ TextureDecoder.getJavaExts()); +/* 76 */ } else if (mode == 1) { +/* 77 */ ret = getIconURL(); +/* 78 */ } else if (mode == 2) +/* 79 */ setIconURL((URL)value); +/* 80 */ break; +/* */ case 1: +/* 82 */ if (mode == 0) { +/* 83 */ ret = URLPropertyEditor.make( +/* 84 */ new Property(this, index, "Content URL").allowSetNull(), +/* 85 */ "*wob"); +/* 86 */ } else if (mode == 1) { +/* 87 */ ret = this.contentURL; +/* 88 */ } else if (mode == 2) +/* 89 */ setContentURL((URL)value); +/* 90 */ break; +/* */ case 2: +/* 92 */ if (mode == 0) { +/* 93 */ ret = StringPropertyEditor.make( +/* 94 */ new Property(this, index, "Property Name") +/* 95 */ .allowSetNull()); +/* 96 */ } else if (mode == 1) { +/* 97 */ ret = getPropertyName(false); +/* 98 */ } else if (mode == 2) +/* 99 */ setPropertyName((String)value); +/* 100 */ break; +/* */ default: +/* 102 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 104 */ return ret; +/* */ } +/* */ +/* 107 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 111 */ s.saveVersion(3, classCookie); +/* 112 */ super.saveState(s); +/* 113 */ URL.save(s, this.iconURL); +/* 114 */ URL.save(s, this.contentURL); +/* 115 */ s.saveString(this.propertyName); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 120 */ switch (r.restoreVersion(classCookie)) { +/* */ case 3: +/* 122 */ super.restoreState(r); +/* 123 */ this.iconURL = URL.restore(r); +/* 124 */ this.contentURL = URL.restore(r); +/* 125 */ this.propertyName = r.restoreString(); +/* 126 */ break; +/* */ case 2: +/* 128 */ super.restoreState(r); +/* 129 */ setName(r.restoreString()); +/* 130 */ this.iconURL = URL.restore(r); +/* 131 */ this.contentURL = URL.restore(r); +/* 132 */ break; +/* */ case 1: +/* 134 */ super.restoreState(r); +/* */ case 0: +/* 136 */ setName(r.restoreString()); +/* 137 */ this.iconURL = URL.restore(r); +/* 138 */ this.contentURL = URL.restore(r); +/* 139 */ r.restoreMaybeNull(); +/* 140 */ break; +/* */ default: +/* 142 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LibraryEntry.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Light.java b/NET/worlds/scape/Light.java new file mode 100644 index 0000000..27148d7 --- /dev/null +++ b/NET/worlds/scape/Light.java @@ -0,0 +1,100 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Light +/* */ extends WObject +/* */ { +/* */ protected int lightID; +/* */ +/* */ protected void addRwChildren(WObject parent) +/* */ { +/* 29 */ super.addRwChildren(parent); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 44 */ super.markVoid(); +/* */ +/* 46 */ if (this.lightID != 0) +/* 47 */ destroyLight(this.lightID); +/* */ } +/* */ +/* */ protected void noteTransformChange() { +/* 51 */ super.noteTransformChange(); +/* */ +/* 53 */ if (this.lightID != 0) { +/* 54 */ setLightTransform(this.lightID, this.clumpID); +/* */ } +/* */ } +/* */ +/* */ +/* */ private static native void setLightTransform(int paramInt1, int paramInt2); +/* */ +/* */ +/* */ private static native void destroyLight(int paramInt); +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 68 */ Object ret = null; +/* 69 */ (index - offset); +/* */ +/* 71 */ ret = super.properties(index, offset + 0, mode, value); +/* */ +/* 73 */ return ret; +/* */ } +/* */ +/* 76 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 80 */ s.saveVersion(0, classCookie); +/* 81 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 86 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 88 */ super.restoreState(r); +/* 89 */ break; +/* */ default: +/* 91 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Light.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ListAdderDialog.java b/NET/worlds/scape/ListAdderDialog.java new file mode 100644 index 0000000..8889e9c --- /dev/null +++ b/NET/worlds/scape/ListAdderDialog.java @@ -0,0 +1,118 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.Choice; +/* */ import java.awt.GridBagConstraints; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class ListAdderDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 33 */ private Choice list = new Choice(); +/* 34 */ private boolean doSet = false; +/* */ private int choice; +/* */ protected EditTile parent; +/* */ +/* */ public ListAdderDialog(EditTile parent, String title) +/* */ { +/* 40 */ super(Console.getFrame(), parent, title); +/* 41 */ this.parent = parent; +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 46 */ GridBagConstraints c = new GridBagConstraints(); +/* 47 */ c.fill = 1; +/* 48 */ c.weightx = 1.0D; +/* 49 */ c.weighty = 1.0D; +/* 50 */ c.gridwidth = 0; +/* 51 */ add(this.gbag, this.list, c); +/* 52 */ super.build(); +/* */ } +/* */ +/* */ protected void setListContents(String[] options) +/* */ { +/* 57 */ this.list.removeAll(); +/* 58 */ for (int i = 0; i < options.length; i++) { +/* 59 */ this.list.addItem(options[i]); +/* */ } +/* */ } +/* */ +/* */ protected void setListContents(Vector options) { +/* 64 */ this.list.removeAll(); +/* 65 */ Enumeration e = options.elements(); +/* 66 */ while (e.hasMoreElements()) { +/* 67 */ this.list.addItem((String)e.nextElement()); +/* */ } +/* */ } +/* */ +/* */ protected abstract void add(int paramInt); +/* */ +/* */ protected final synchronized void activeCallback() { +/* 74 */ if (this.doSet) { +/* 75 */ add(this.choice); +/* 76 */ this.doSet = false; +/* 77 */ notify(); +/* */ } +/* */ } +/* */ +/* */ protected synchronized boolean setValue() +/* */ { +/* 83 */ if ((this.choice = this.list.getSelectedIndex()) == -1) +/* 84 */ return false; +/* 85 */ this.doSet = true; +/* 86 */ while (this.doSet) +/* */ try { +/* 88 */ wait(); +/* */ } catch (InterruptedException localInterruptedException) {} +/* 90 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 106 */ super.setVisible(visible); +/* 107 */ if (visible) { +/* 108 */ this.list.select(0); +/* 109 */ this.list.requestFocus(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ListAdderDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ListChooserDialog.java b/NET/worlds/scape/ListChooserDialog.java new file mode 100644 index 0000000..9fc74c5 --- /dev/null +++ b/NET/worlds/scape/ListChooserDialog.java @@ -0,0 +1,83 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.List; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class ListChooserDialog +/* */ extends OkCancelDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 18 */ private List _listField = new List(5, false); +/* */ protected EditTile _parent; +/* */ +/* */ protected ListChooserDialog(EditTile parent, String title) { +/* 22 */ super(Console.getFrame(), parent, title); +/* 23 */ this._parent = parent; +/* */ } +/* */ +/* */ protected void build() { +/* 27 */ GridBagConstraints c = new GridBagConstraints(); +/* 28 */ c.weightx = 1.0D; +/* 29 */ c.weighty = 1.0D; +/* 30 */ c.gridwidth = 0; +/* 31 */ c.fill = 1; +/* 32 */ add(this.gbag, this._listField, c); +/* 33 */ super.build(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract String getEntry(int paramInt); +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract int getSelected(); +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract boolean setValue(String paramString, int paramInt); +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean setValue() +/* */ { +/* 56 */ return setValue(this._listField.getSelectedItem(), this._listField.getSelectedIndex()); +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 63 */ super.setVisible(visible); +/* 64 */ if (visible) { +/* 65 */ int index = 0; +/* 66 */ String entry = getEntry(index); +/* 67 */ while (entry != null) { +/* 68 */ this._listField.add(entry, index); +/* 69 */ entry = getEntry(++index); +/* */ } +/* 71 */ index = getSelected(); +/* 72 */ if (index != -1) +/* 73 */ this._listField.select(index); +/* 74 */ this._listField.requestFocus(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ListChooserDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ListEditorDialog.java b/NET/worlds/scape/ListEditorDialog.java new file mode 100644 index 0000000..b511756 --- /dev/null +++ b/NET/worlds/scape/ListEditorDialog.java @@ -0,0 +1,53 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class ListEditorDialog +/* */ extends FieldEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* 24 */ public ListEditorDialog(EditTile parent, String title) { super(parent, title); } +/* */ +/* */ protected abstract int getElementCount(); +/* */ +/* */ protected abstract String getElement(int paramInt); +/* */ +/* */ protected abstract boolean setElements(StringTokenizer paramStringTokenizer); +/* */ +/* */ protected String getValue() { +/* 33 */ String text = ""; +/* 34 */ int count = getElementCount(); +/* 35 */ for (int i = 0; i < count; i++) { +/* 36 */ if (i != 0) +/* 37 */ text = text + ", "; +/* 38 */ text = text + getElement(i); +/* */ } +/* 40 */ return text; +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 45 */ return setElements(new StringTokenizer(text, ", \t", false)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ListEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LoadedAttribute.java b/NET/worlds/scape/LoadedAttribute.java new file mode 100644 index 0000000..4ff7ee2 --- /dev/null +++ b/NET/worlds/scape/LoadedAttribute.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface LoadedAttribute +{ + public abstract void loadedAttribute(Attribute paramAttribute, String paramString); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LoadedAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/LoadedURLSelf.java b/NET/worlds/scape/LoadedURLSelf.java new file mode 100644 index 0000000..4312448 --- /dev/null +++ b/NET/worlds/scape/LoadedURLSelf.java @@ -0,0 +1,14 @@ +package NET.worlds.scape; + +import NET.worlds.network.URL; + +public abstract interface LoadedURLSelf +{ + public abstract void loadedURLSelf(URLSelf paramURLSelf, URL paramURL, String paramString); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\LoadedURLSelf.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MCISoundCommand.java b/NET/worlds/scape/MCISoundCommand.java new file mode 100644 index 0000000..7001dce --- /dev/null +++ b/NET/worlds/scape/MCISoundCommand.java @@ -0,0 +1,212 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ abstract class MCISoundCommand +/* */ { +/* */ boolean isOnQueue; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ float left; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ float right; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ int frameNum; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract void run(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void onQueue(boolean f) +/* */ { +/* 204 */ this.isOnQueue = f; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MCISoundCommand.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MCISoundPlayer.java b/NET/worlds/scape/MCISoundPlayer.java new file mode 100644 index 0000000..cd26226 --- /dev/null +++ b/NET/worlds/scape/MCISoundPlayer.java @@ -0,0 +1,211 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MCISoundPlayer +/* */ extends SoundPlayer +/* */ { +/* */ public MCISoundPlayer(Sound owner) +/* */ { +/* 32 */ super(owner); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 38 */ private static MCIThread mciThread = new MCIThread(); +/* */ float ang; +/* */ float dist; +/* */ float vol; +/* */ int leftToRepeat; +/* */ int running; +/* */ +/* */ public boolean open(float volume, float stopDist, boolean atten, boolean pan) +/* */ { +/* 47 */ return true; +/* */ } +/* */ +/* */ public void close() { +/* 51 */ stop(); +/* */ } +/* */ +/* */ public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up) +/* */ { +/* 56 */ Point3Temp toObj = Point3Temp.make(obj).minus(cam); +/* 57 */ Point3Temp right = Point3Temp.make(out).cross(up); +/* 58 */ float y = toObj.dot(out); +/* 59 */ float x = toObj.dot(right); +/* 60 */ this.ang = ((float)(Math.atan2(y, x) / 3.141592653589793D)); +/* 61 */ this.dist = toObj.length(); +/* */ +/* */ +/* 64 */ return setVolume(this.vol); +/* */ } +/* */ +/* */ public boolean setVolume(float v) { +/* 68 */ this.vol = v; +/* */ +/* 70 */ float leftFrac = 0.5F; +/* 71 */ if ((this.owner != null) && (this.owner.getPanning())) +/* */ { +/* */ +/* 74 */ leftFrac = Math.abs(this.ang); +/* */ +/* */ +/* 77 */ if (this.ang < 0.0F) { +/* 78 */ v = this.vol * (float)(0.5D + Math.abs(0.5D + this.ang)); +/* */ } +/* */ } +/* 81 */ if ((this.owner != null) && (this.owner.getAttenuate())) { +/* 82 */ float stopDist = this.owner.getStopDistance(); +/* 83 */ if (this.dist > stopDist) { +/* 84 */ volume(0.0F, 0.0F); +/* 85 */ return false; +/* */ } +/* */ +/* 88 */ v *= (stopDist - this.dist) / stopDist; +/* */ } +/* */ +/* 91 */ volume(v * leftFrac, v * (1.0F - leftFrac)); +/* 92 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 101 */ MCISoundCommand poll = new MCISoundCommand() { +/* 102 */ public void run() { MCISoundPlayer.this.gotFinished(MCISoundPlayer.this.nativeIsFinished()); } +/* */ }; +/* */ +/* */ private URL url; +/* */ +/* */ private static MCISoundCommand activeStopCmd; +/* */ +/* */ +/* */ public int getState() +/* */ { +/* 112 */ if (!this.poll.isOnQueue) { +/* 113 */ mciThread.pushCommand(this.poll); +/* */ } +/* 115 */ return this.running != 0 ? 0 : 1; +/* */ } +/* */ +/* */ public synchronized void start(int repeatCount) { +/* 119 */ if (repeatCount == 0) { +/* 120 */ this.running = 0; +/* 121 */ return; +/* */ } +/* */ +/* 124 */ this.leftToRepeat = repeatCount; +/* */ +/* 126 */ if (this.leftToRepeat > 0) { +/* 127 */ this.leftToRepeat -= 1; +/* */ } +/* 129 */ this.running = 1; +/* */ +/* 131 */ activeStopCmd = null; +/* 132 */ mciThread.pushCommand(new MCISoundCommand() { +/* 133 */ public void run() { MCISoundPlayer.this.doStart(); } +/* */ }); +/* */ } +/* */ +/* */ +/* */ public synchronized void start(URL u) +/* */ { +/* 140 */ this.url = u; +/* 141 */ start(1); +/* */ } +/* */ +/* */ synchronized void doStart() { +/* 145 */ this.running = 2; +/* 146 */ if (!nativeStart((this.owner == null ? this.url : this.owner.getURL()).unalias())) { +/* 147 */ this.running = 3; +/* */ } +/* */ } +/* */ +/* */ synchronized void gotFinished(boolean f) { +/* 152 */ if ((f) && +/* 153 */ (this.running == 2)) { +/* 154 */ start(this.leftToRepeat); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void stop() +/* */ { +/* 167 */ this.leftToRepeat = 0; +/* 168 */ activeStopCmd = new MCISoundCommand() { +/* */ public void run() { +/* 170 */ if (MCISoundPlayer.activeStopCmd == this) { +/* 171 */ MCISoundPlayer.activeStopCmd = null; +/* 172 */ MCISoundPlayer.this.nativeStop(); +/* */ } +/* */ } +/* 175 */ }; +/* 176 */ mciThread.pushCommand(activeStopCmd); +/* */ } +/* */ +/* 179 */ MCISoundCommand volumeCmd = new MCISoundCommand() { +/* */ public void run() { +/* 181 */ if (!WavSoundPlayer.ignoreVolumeChanges) +/* 182 */ MCISoundPlayer.this.nativeVolume(this.left, this.right); +/* */ } +/* */ }; +/* */ +/* */ public void volume(float left, float right) { +/* 187 */ this.volumeCmd.left = left; +/* 188 */ this.volumeCmd.right = right; +/* 189 */ if (!this.volumeCmd.isOnQueue) { +/* 190 */ mciThread.pushCommand(this.volumeCmd); +/* */ } +/* */ } +/* */ +/* */ private native void nativeVolume(float paramFloat1, float paramFloat2); +/* */ +/* */ private native boolean nativeStart(String paramString); +/* */ +/* */ private native boolean nativeIsFinished(); +/* */ +/* */ private native void nativeStop(); +/* */ +/* */ public static native boolean isActive(); +/* */ +/* */ static native void shutdown(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MCISoundPlayer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MCIThread.java b/NET/worlds/scape/MCIThread.java new file mode 100644 index 0000000..9e3334a --- /dev/null +++ b/NET/worlds/scape/MCIThread.java @@ -0,0 +1,259 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MainTerminalCallback; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MCIThread +/* */ implements MainCallback, MainTerminalCallback +/* */ { +/* */ public MCIThread() +/* */ { +/* 217 */ Main.register(this); +/* */ } +/* */ +/* 220 */ private Vector queue = new Vector(); +/* */ private int frameNum; +/* */ +/* */ public synchronized void pushCommand(MCISoundCommand c) { +/* 224 */ this.queue.addElement(c); +/* 225 */ c.onQueue(true); +/* */ +/* */ +/* */ +/* 229 */ c.frameNum = (this.frameNum + 2); +/* */ } +/* */ +/* */ public synchronized void mainCallback() { +/* 233 */ this.frameNum += 1; +/* */ +/* 235 */ while (this.queue.size() > 0) { +/* 236 */ MCISoundCommand command = (MCISoundCommand)this.queue.elementAt(0); +/* */ +/* 238 */ if (command.frameNum > this.frameNum) { +/* 239 */ return; +/* */ } +/* 241 */ command.onQueue(false); +/* 242 */ this.queue.removeElementAt(0); +/* */ +/* 244 */ command.run(); +/* */ } +/* */ } +/* */ +/* */ public synchronized void terminalCallback() { +/* 249 */ MCISoundPlayer.shutdown(); +/* 250 */ ASFSoundPlayer.shutdown(); +/* 251 */ Main.unregister(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MCIThread.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Manifest.java b/NET/worlds/scape/Manifest.java new file mode 100644 index 0000000..033aac5 --- /dev/null +++ b/NET/worlds/scape/Manifest.java @@ -0,0 +1,126 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Manifest +/* */ { +/* */ private IndentStream _out; +/* */ +/* */ public Manifest(IndentStream out) +/* */ { +/* 28 */ this._out = out; +/* 29 */ this._out.println("MANIFEST Worlds, Inc."); +/* 30 */ this._out.indent(); +/* */ } +/* */ +/* */ public Manifest(String name) throws IOException { +/* 34 */ this(new IndentStream(new FileOutputStream(name))); +/* */ } +/* */ +/* */ public void done() { +/* 38 */ this._out.undent(); +/* 39 */ this._out.println("END MANIFEST"); +/* 40 */ this._out.close(); +/* 41 */ this._out = null; +/* 42 */ this._ht = null; +/* */ } +/* */ +/* */ private void printID(String s) { +/* 46 */ this._out.print(" (#" + s + ")"); +/* */ } +/* */ +/* 49 */ private Hashtable _ht = new Hashtable(); +/* 50 */ private int _lastID = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void printRef(Object obj) +/* */ { +/* 58 */ if ((obj instanceof SuperRoot)) { +/* 59 */ this._out.print(((SuperRoot)obj).getName()); +/* */ } else +/* 61 */ this._out.print(""); +/* 62 */ if (this._ht.containsKey(obj)) { +/* 63 */ printID((String)this._ht.get(obj)); +/* 64 */ this._out.println(" --q.v.--"); +/* */ } else { +/* 66 */ String newID = Integer.toString(this._lastID++); +/* 67 */ this._ht.put(obj, newID); +/* 68 */ printID(newID); +/* 69 */ this._out.println(":" + obj.getClass().getName() + " ["); +/* 70 */ this._out.indent(); +/* 71 */ saveProps((Properties)obj); +/* 72 */ this._out.undent(); +/* 73 */ this._out.println("]"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void saveMaybeProp(Object obj) +/* */ { +/* 84 */ if ((obj instanceof Properties)) +/* */ { +/* 86 */ if (!obj.getClass().getName().equals("NET.worlds.scape.Transform")) { +/* 87 */ printRef(obj); +/* 88 */ return; } } +/* 89 */ this._out.println(obj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void saveProps(Properties obj) +/* */ { +/* 97 */ Enumeration pe = new EnumProperties(obj); +/* 98 */ while (pe.hasMoreElements()) { +/* 99 */ Property prop = (Property)pe.nextElement(); +/* 100 */ this._out.print(prop.getName()); +/* 101 */ this._out.print(" := "); +/* 102 */ if ((prop instanceof VectorProperty)) { +/* 103 */ this._out.println("{"); +/* 104 */ this._out.indent(); +/* */ +/* 106 */ Vector v = (Vector)prop.get(); +/* 107 */ if (v != null) { +/* 108 */ Enumeration ve = v.elements(); +/* 109 */ while (ve.hasMoreElements()) { +/* 110 */ saveMaybeProp(ve.nextElement()); +/* */ } +/* */ } +/* 113 */ this._out.undent(); +/* 114 */ this._out.println("}"); +/* */ } else { +/* 116 */ saveMaybeProp(prop.get()); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Manifest.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Material.java b/NET/worlds/scape/Material.java new file mode 100644 index 0000000..6522e41 --- /dev/null +++ b/NET/worlds/scape/Material.java @@ -0,0 +1,1053 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Material +/* */ extends SuperRoot +/* */ implements BGLoaded, MainCallback +/* */ { +/* */ static +/* */ { +/* 131 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Material(float ambient, float diffuse, float specular, Color color, Texture texture, float opacity, boolean smooth, boolean filter) +/* */ { +/* 157 */ if (botMode) { +/* 158 */ texture = null; +/* */ } +/* 160 */ this.ambient = ambient; +/* 161 */ this.diffuse = diffuse; +/* 162 */ this.specular = specular; +/* 163 */ setColor(color); +/* 164 */ if (texture != null) { +/* 165 */ this.textures = new Texture[1]; +/* 166 */ this.textures[0] = texture; +/* */ } +/* 168 */ this.opacity = opacity; +/* 169 */ this.smooth = smooth; +/* 170 */ this.filter = filter; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Material(Color color) +/* */ { +/* 181 */ this(0.75F, 0.0F, 0.0F, color, null, 1.0F, false, false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Material(Texture texture) +/* */ { +/* 191 */ this(0.75F, 0.0F, 0.0F, Color.black, texture, 1.0F, false, false); +/* */ } +/* */ +/* */ public Material(Color initialColor, URL textureName) { +/* 195 */ this(initialColor != null ? initialColor : new Color(128, 128, 128)); +/* 196 */ if (!botMode) +/* 197 */ loadTexture(textureName); +/* */ } +/* */ +/* 200 */ static int serial = 0; +/* */ +/* */ public Material(URL tileTexture, int x, int y) +/* */ { +/* 204 */ this(0.75F, 0.0F, 0.0F, Color.black, null, 1.0F, false, false); +/* 205 */ this.hRes = x; +/* 206 */ this.vRes = y; +/* 207 */ serial += 1; +/* */ +/* 209 */ int numSubs = getHRes() * getVRes(); +/* 210 */ this.textures = new Texture[numSubs]; +/* */ +/* 212 */ makeMaterials(); +/* */ +/* 214 */ this.subnames = new URL[numSubs]; +/* 215 */ String lowResBaseName = tileTexture.getBase(); +/* */ +/* 217 */ int nextSubname = 0; +/* 218 */ for (int v = this.vRes; v > 0; v--) { +/* 219 */ String vExt = v; +/* 220 */ for (int h = 0; h < this.hRes; nextSubname++) { +/* 221 */ URL subname = URL.make(tileTexture, lowResBaseName + serial + +/* 222 */ vExt + (h + 1) + ".cmp"); +/* 223 */ this.subnames[nextSubname] = subname; +/* 224 */ syncBackgroundLoad(tileTexture.unalias(), subname);h++; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 238 */ public static boolean botMode = false; +/* */ +/* */ public Material(URL textureName) { +/* 241 */ this(null, textureName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Material() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 258 */ if (((WObject)owner).hasClump()) +/* 259 */ addRwChildren(); +/* */ } +/* */ +/* */ public void detach() { +/* 263 */ if (this.ids != null) { +/* 264 */ markVoid(); +/* */ } +/* 266 */ super.detach(); +/* */ } +/* */ +/* */ public Texture[] getTextures() { +/* 270 */ return this.textures; +/* */ } +/* */ +/* 273 */ private boolean keepLoaded = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int[] ids; +/* */ +/* */ +/* */ +/* */ +/* */ private Texture[] textures; +/* */ +/* */ +/* */ +/* */ +/* 289 */ private int vRes = 1; +/* 290 */ private int hRes = 1; +/* 291 */ private int sPos = -1; +/* */ +/* 293 */ private final boolean loResMode = false; +/* */ +/* */ +/* */ +/* */ URL textureName; +/* */ +/* */ +/* */ +/* */ protected URL[] subnames; +/* */ +/* */ +/* */ private boolean doReclump; +/* */ +/* */ +/* */ +/* */ public void addRwChildren() +/* */ { +/* 310 */ if (this.ids == null) { +/* 311 */ if ((this.textures == null) && (this.textureName != null)) { +/* 312 */ loadTextures(); +/* */ } else { +/* 314 */ makeMaterials(); +/* 315 */ if (this.textures != null) +/* 316 */ for (int i = 0; i < this.ids.length; i++) +/* 317 */ nativeSetTexture(i, this.textures[i]); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void markVoid() { +/* 323 */ if (!this.keepLoaded) +/* */ { +/* 325 */ if (this.textureName != null) { +/* 326 */ removeTextures(); +/* */ } +/* 328 */ closeMaterials(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setKeepLoaded(boolean f) +/* */ { +/* 338 */ boolean klWas = this.keepLoaded; +/* 339 */ this.keepLoaded = f; +/* 340 */ if ((!f) && (klWas)) +/* */ { +/* 342 */ SuperRoot o = getOwner(); +/* 343 */ if ((o == null) || (!((WObject)o).hasClump())) { +/* 344 */ markVoid(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Material restore(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 356 */ Material m = (Material)r.restoreMaybeNull(); +/* 357 */ if ((m != null) && +/* 358 */ (r.version() < 6)) +/* */ { +/* 360 */ if (m.getOwner() != null) +/* 361 */ m = (Material)m.clone(); +/* */ } +/* 363 */ return m; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private native void nativeSetTexture(int paramInt, Texture paramTexture); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private synchronized void setTexture(int texNum, Texture texture) +/* */ { +/* 380 */ if (this.textures[texNum] != null) { +/* 381 */ Texture t = extractTexture(texNum); +/* */ +/* 383 */ if (t != null) { +/* 384 */ t.decRef(); +/* */ } +/* */ } +/* */ +/* 388 */ this.textures[texNum] = texture; +/* */ +/* 390 */ nativeSetTexture(texNum, texture); +/* */ +/* 392 */ if (!this.doReclump) { +/* 393 */ this.doReclump = true; +/* 394 */ Main.register(this); +/* */ } +/* */ } +/* */ +/* */ public void mainCallback() { +/* 399 */ Main.unregister(this); +/* */ +/* 401 */ if (this.doReclump) { +/* 402 */ propagateTextureChange(); +/* */ } +/* */ +/* 405 */ this.doReclump = false; +/* */ } +/* */ +/* */ +/* */ +/* */ private void propagateTextureChange() +/* */ { +/* 412 */ if (this.ids != null) { +/* 413 */ Object o = getOwner(); +/* 414 */ if ((o instanceof WObject)) +/* 415 */ if (((o instanceof Surface)) && (((Surface)o).getMaterial() == this)) { +/* 416 */ ((Surface)o).setMaterial(this, true); +/* 417 */ } else if (((o instanceof Shape)) && +/* 418 */ (((Shape)o).getMaterial() == this)) { +/* 419 */ ((Shape)o).setMaterial(this); +/* */ } else +/* 421 */ ((WObject)o).reclump(); +/* */ } +/* 423 */ this.doReclump = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void setTexture(Texture texture) +/* */ { +/* 437 */ this.textureName = null; +/* 438 */ if ((this.textures != null) && (this.textures.length != 1)) { +/* 439 */ removeTextures(); +/* */ +/* 441 */ this.textures = new Texture[1]; +/* 442 */ setTexture(0, texture); +/* */ } +/* */ else { +/* 445 */ if (this.textures == null) { +/* 446 */ this.textures = new Texture[1]; +/* 447 */ } else if (texture == this.textures[0]) { +/* 448 */ return; +/* */ } +/* 450 */ setTexture(0, texture); +/* */ } +/* */ } +/* */ +/* */ +/* */ synchronized native Texture extractTexture(int paramInt); +/* */ +/* */ private void removeTextures() +/* */ { +/* 459 */ if (this.textures != null) { +/* 460 */ for (int i = 0; i < this.textures.length; i++) { +/* 461 */ Texture t = extractTexture(i); +/* 462 */ if (t != null) +/* 463 */ t.decRef(); +/* */ } +/* 465 */ this.textures = null; +/* */ } +/* 467 */ this.hRes = (this.vRes = 1); +/* 468 */ this.sPos = -1; +/* 469 */ closeMaterials(); +/* */ } +/* */ +/* */ protected void finalize() +/* */ { +/* 474 */ removeTextures(); +/* 475 */ super.finalize(); +/* */ } +/* */ +/* */ private native void closeMaterial(int paramInt); +/* */ +/* */ private void closeMaterials() +/* */ { +/* 482 */ if (this.ids != null) { +/* 483 */ for (int i = 0; i < this.ids.length; i++) +/* 484 */ closeMaterial(i); +/* 485 */ this.ids = null; +/* */ } +/* */ } +/* */ +/* 489 */ private static boolean tryBMP = IniFile.gamma().getIniInt("TRYBMP", 0) != 0; +/* */ +/* */ private float ambient; +/* */ +/* */ private float diffuse; +/* */ private float specular; +/* */ private float opacity; +/* */ private boolean smooth; +/* */ +/* */ private int calcRes() +/* */ { +/* 500 */ this.hRes = 1; +/* 501 */ this.vRes = 1; +/* 502 */ this.sPos = -1; +/* */ +/* 504 */ if (this.textureName == null) { +/* 505 */ return -1; +/* */ } +/* 507 */ String name = this.textureName.getInternal(); +/* 508 */ int len = name.length(); +/* */ +/* 510 */ if ((len >= 4) && (name.regionMatches(true, len - 4, ".mov", 0, 4))) { +/* 511 */ this.sPos = 0; +/* */ } +/* */ +/* */ +/* */ +/* 516 */ if ((len > 7) && (name.regionMatches(true, len - 5, "*.", 0, 2))) { +/* */ int num; +/* 518 */ for (int nextStarIndex = len - 5; (nextStarIndex > 2) && +/* 519 */ (name.charAt(nextStarIndex) == '*') && +/* 520 */ ((num = name.charAt(nextStarIndex - 2) - '0') > 0) && ( +/* 521 */ num <= 9); nextStarIndex -= 3) { int num; +/* 522 */ char control = Character.toLowerCase(name +/* 523 */ .charAt(nextStarIndex - 1)); +/* 524 */ if (control == 'h') { +/* 525 */ this.hRes = num; +/* 526 */ } else if (control == 'v') { +/* 527 */ this.vRes = num; +/* 528 */ } else if ((control == 's') && (this.sPos >= 0)) { +/* 529 */ this.sPos = (num - 1); +/* */ } +/* */ } +/* 532 */ return len - (nextStarIndex + 1); +/* */ } +/* 534 */ return -1; +/* */ } +/* */ +/* */ +/* */ private boolean filter; +/* */ private int r; +/* */ private int g; +/* */ private int b; +/* */ private Color color; +/* */ private void loadTextures() +/* */ { +/* 545 */ int endLen = calcRes(); +/* */ +/* 547 */ if (endLen >= 0) { +/* 548 */ String lowResBaseName = this.textureName.getBase(); +/* 549 */ int baseEnd = lowResBaseName.length() - endLen; +/* 550 */ lowResBaseName = lowResBaseName.substring(0, baseEnd); +/* */ +/* 552 */ int numSubs = getHRes() * getVRes(); +/* 553 */ this.textures = new Texture[numSubs]; +/* 554 */ makeMaterials(); +/* */ +/* 556 */ if (this.sPos >= 0) +/* */ { +/* 558 */ this.subnames = new URL[1]; +/* 559 */ this.subnames[0] = URL.make(this.textureName, lowResBaseName + ".mov"); +/* 560 */ BackgroundLoader.get(this, this.subnames[0]); +/* */ } else { +/* 562 */ this.subnames = new URL[numSubs]; +/* */ +/* 564 */ int nextSubname = 0; +/* 565 */ for (int v = this.vRes; v > 0; v--) { +/* 566 */ String vExt = v; +/* 567 */ for (int h = 0; h < this.hRes; nextSubname++) { +/* 568 */ URL subname = URL.make(this.textureName, lowResBaseName + +/* 569 */ vExt + (h + 1) + ".cmp"); +/* 570 */ this.subnames[nextSubname] = subname; +/* 571 */ BackgroundLoader.get(this, subname);h++; +/* */ } +/* */ +/* */ } +/* */ } +/* */ } +/* */ else +/* */ { +/* 576 */ this.subnames = null; +/* 577 */ this.textures = new Texture[1]; +/* 578 */ makeMaterials(); +/* 579 */ BackgroundLoader.get(this, this.textureName); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void loadTexture(URL textureName) +/* */ { +/* 588 */ boolean vis = this.ids != null; +/* */ +/* 590 */ removeTextures(); +/* 591 */ this.textureName = textureName; +/* 592 */ calcRes(); +/* */ +/* 594 */ if (vis) { +/* 595 */ addRwChildren(); +/* */ } +/* */ +/* */ +/* 599 */ Object o = getOwner(); +/* 600 */ if ((o instanceof WObject)) { +/* 601 */ ((WObject)o).reclump(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static native int makeMaterial(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean); +/* */ +/* */ +/* */ +/* */ private void makeMaterials() +/* */ { +/* 614 */ int numSubs = getHRes() * getVRes(); +/* 615 */ this.ids = new int[numSubs]; +/* */ +/* 617 */ for (int i = 0; i < numSubs; i++) { +/* 618 */ this.ids[i] = makeMaterial(this.ambient, this.diffuse, this.specular, this.opacity, +/* 619 */ this.color.getRed(), this.color.getGreen(), this.color.getBlue(), this.smooth); +/* */ } +/* */ } +/* */ +/* */ private void loadError(URL name) { +/* 624 */ SuperRoot owner = getOwner(); +/* 625 */ System.out.println("Unable to load texture " + name + ( +/* 626 */ owner == null ? "" : new StringBuilder(" for ").append(owner.getName()).toString()) + "."); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float getAmbient() +/* */ { +/* 635 */ return this.ambient; +/* */ } +/* */ +/* */ public float getDiffuse() { +/* 639 */ return this.diffuse; +/* */ } +/* */ +/* */ public float getSpecular() { +/* 643 */ return this.specular; +/* */ } +/* */ +/* */ public float getOpacity() { +/* 647 */ return this.opacity; +/* */ } +/* */ +/* */ public boolean getSmooth() { +/* 651 */ return this.smooth; +/* */ } +/* */ +/* */ public boolean getFilter() { +/* 655 */ return this.filter; +/* */ } +/* */ +/* */ public boolean getHiRes() { +/* 659 */ return (this.vRes > 1) || (this.hRes > 1); +/* */ } +/* */ +/* */ public int getVRes() { +/* 663 */ return this.vRes; +/* */ } +/* */ +/* */ public int getHRes() { +/* 667 */ return this.hRes; +/* */ } +/* */ +/* */ public int getRed() { +/* 671 */ return this.r; +/* */ } +/* */ +/* */ public int getGreen() { +/* 675 */ return this.g; +/* */ } +/* */ +/* */ public int getBlue() { +/* 679 */ return this.b; +/* */ } +/* */ +/* */ public Color getColor() { +/* 683 */ return this.color; +/* */ } +/* */ +/* */ public native void paramChange(); +/* */ +/* */ public void setAmbient(float ambient) +/* */ { +/* 690 */ this.ambient = ambient; +/* 691 */ paramChange(); +/* */ } +/* */ +/* */ public void setDiffuse(float diffuse) { +/* 695 */ this.diffuse = diffuse; +/* 696 */ paramChange(); +/* */ } +/* */ +/* */ public void setSpecular(float specular) { +/* 700 */ this.specular = specular; +/* 701 */ paramChange(); +/* */ } +/* */ +/* */ public void setOpacity(float opacity) { +/* 705 */ this.opacity = opacity; +/* 706 */ paramChange(); +/* */ } +/* */ +/* */ public void setSmooth(boolean smooth) { +/* 710 */ this.smooth = smooth; +/* 711 */ paramChange(); +/* */ } +/* */ +/* */ public void setFilter(boolean filter) { +/* 715 */ this.filter = filter; +/* 716 */ paramChange(); +/* */ } +/* */ +/* */ public void setColor(Color color) { +/* 720 */ this.color = color; +/* 721 */ this.r = color.getRed(); +/* 722 */ this.g = color.getGreen(); +/* 723 */ this.b = color.getBlue(); +/* 724 */ paramChange(); +/* */ } +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteURL) { +/* 728 */ return localName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 736 */ int texNum = 0; +/* */ +/* 738 */ if (this.textures == null) { +/* 739 */ return false; +/* */ } +/* */ +/* */ +/* 743 */ String urlString = remoteURL.getAbsolute(); +/* */ +/* 745 */ String avatarDir = IniFile.gamma().getIniString("avatarDir", "avatar/"); +/* 746 */ if (!avatarDir.endsWith("/")) +/* 747 */ avatarDir = avatarDir + "/"; +/* 748 */ String avStart = URL.make(NetUpdate.getUpgradeServerURL() + avatarDir) +/* 749 */ .getAbsolute(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 756 */ String remoteBase = remoteURL == null ? null : remoteURL.getBase(); +/* 757 */ String textureBase = this.textureName == null ? null : this.textureName.getBase(); +/* */ +/* 759 */ if (!remoteBase.equals(textureBase)) +/* */ { +/* 761 */ if ((this.textureName != null) && (this.textureName.endsWith(".mov"))) { +/* 762 */ String rawBase = this.textureName.getBaseWithoutExt(); +/* 763 */ String rawRemote = remoteURL.getBaseWithoutExt(); +/* */ +/* 765 */ if (!rawBase.startsWith(rawRemote)) { +/* 766 */ return false; +/* */ } +/* */ } +/* 769 */ else if (this.subnames != null) { +/* 770 */ for (; texNum < this.subnames.length; texNum++) { +/* 771 */ String subBase = this.subnames[texNum].getBase(); +/* */ +/* 773 */ if (remoteBase.equals(subBase)) +/* */ break; +/* */ } +/* 776 */ if (texNum == this.textures.length) +/* 777 */ return false; +/* */ } else { +/* 779 */ return false; +/* */ } +/* */ } +/* */ +/* 783 */ String localName = (String)obj; +/* */ +/* */ +/* 786 */ if (this.ids == null) { +/* 787 */ return false; +/* */ } +/* 789 */ if (localName != null) { +/* 790 */ if (this.sPos < 0) { +/* 791 */ Texture t = TextureDecoder.decode(remoteURL, localName); +/* */ +/* 793 */ if ((t != null) && (t.textureID != 0)) { +/* 794 */ setTexture(texNum, t); +/* */ } else { +/* 796 */ localName = null; +/* */ } +/* */ } +/* */ else +/* */ { +/* 801 */ Texture[] ts = new ScapePicMovie(localName, remoteURL) +/* 802 */ .getTextures(); +/* 803 */ if ((ts == null) || (this.hRes * this.vRes * (this.sPos + 1) > ts.length)) +/* */ { +/* 805 */ localName = null; +/* */ } else { +/* 807 */ int i = this.hRes * this.vRes * this.sPos; +/* 808 */ for (int v = (this.vRes - 1) * this.hRes; v >= 0; v -= this.hRes) +/* 809 */ for (int h = 0; h < this.hRes; i++) { +/* 810 */ setTexture(v + h, ts[i]);h++; +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 815 */ int len = urlString.length(); +/* 816 */ if ((tryBMP) && (this.sPos == -1) && (len > 4) && +/* 817 */ (urlString.regionMatches(true, len - 4, ".cmp", 0, 4)) && +/* 818 */ (!remoteURL.isRemote())) +/* */ { +/* 820 */ String lName = urlString.substring(0, len - 4) + ".bmp"; +/* 821 */ Texture t = TextureDecoder.decode(URL.make(lName), lName); +/* 822 */ if ((t != null) && (t.textureID != 0)) { +/* 823 */ setTexture(texNum, t); +/* 824 */ localName = lName; +/* */ } +/* */ } +/* */ } +/* */ +/* 829 */ if (localName == null) +/* */ { +/* */ +/* 832 */ if (urlString.startsWith("avatar:")) +/* */ { +/* 834 */ BackgroundLoader.get(this, +/* 835 */ URL.make(avStart + urlString.substring(7))); +/* 836 */ return false; +/* */ } +/* */ +/* 839 */ loadError(remoteURL); +/* */ } +/* */ +/* 842 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 850 */ WObject owner = (WObject)getOwner(); +/* 851 */ if (owner == null) +/* 852 */ return null; +/* 853 */ return owner.getRoom(); +/* */ } +/* */ +/* 856 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 859 */ s.saveVersion(4, classCookie); +/* 860 */ super.saveState(s); +/* 861 */ s.saveFloat(getAmbient()); +/* 862 */ s.saveFloat(getDiffuse()); +/* 863 */ s.saveFloat(getSpecular()); +/* 864 */ s.saveFloat(getOpacity()); +/* 865 */ s.saveBoolean(getSmooth()); +/* 866 */ s.saveBoolean(getFilter()); +/* 867 */ s.saveInt(getRed()); +/* 868 */ s.saveInt(getGreen()); +/* 869 */ s.saveInt(getBlue()); +/* 870 */ URL.save(s, this.textureName); +/* 871 */ s.saveBoolean(this.keepLoaded); +/* 872 */ if (this.textureName == null) { +/* 873 */ if ((this.textures != null) && (this.textures.length != 1)) { +/* 874 */ s.saveMaybeNull(null); +/* */ } else { +/* 876 */ s.saveMaybeNull(this.textures == null ? null : this.textures[0]); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 882 */ Texture texture = null; +/* */ +/* 884 */ int vers = r.restoreVersion(classCookie); +/* 885 */ switch (vers) { +/* */ case 2: +/* */ case 3: +/* */ case 4: +/* 889 */ super.restoreState(r); +/* 890 */ this.ambient = r.restoreFloat(); +/* 891 */ this.diffuse = r.restoreFloat(); +/* 892 */ this.specular = r.restoreFloat(); +/* 893 */ this.opacity = r.restoreFloat(); +/* 894 */ if (vers > 3) { +/* 895 */ this.smooth = r.restoreBoolean(); +/* 896 */ this.filter = r.restoreBoolean(); +/* */ } +/* 898 */ int red = r.restoreInt(); +/* 899 */ int green = r.restoreInt(); +/* 900 */ int blue = r.restoreInt(); +/* 901 */ setColor(new Color(red, green, blue)); +/* 902 */ URL name = URL.restore(r); +/* 903 */ if (vers > 2) +/* 904 */ setKeepLoaded(r.restoreBoolean()); +/* 905 */ if (name == null) { +/* 906 */ texture = (Texture)r.restoreMaybeNull(); +/* */ } else +/* 908 */ loadTexture(name); +/* 909 */ break; +/* */ +/* */ case 1: +/* 912 */ super.restoreState(r); +/* */ case 0: +/* 914 */ this.ambient = r.restoreFloat(); +/* 915 */ this.diffuse = r.restoreFloat(); +/* 916 */ this.specular = r.restoreFloat(); +/* 917 */ this.opacity = r.restoreFloat(); +/* 918 */ int red = r.restoreInt(); +/* 919 */ int green = r.restoreInt(); +/* 920 */ int blue = r.restoreInt(); +/* 921 */ setColor(new Color(red, green, blue)); +/* 922 */ texture = (Texture)r.restoreMaybeNull(); +/* 923 */ break; +/* */ default: +/* 925 */ throw new TooNewException(); +/* */ } +/* */ +/* 928 */ if (texture != null) { +/* 929 */ this.textures = new Texture[1]; +/* 930 */ this.textures[0] = texture; +/* */ } +/* */ +/* 933 */ assert ((r.version() >= 6) || (getOwner() == null)); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 941 */ Object ret = null; +/* 942 */ switch (index - offset) { +/* */ case 0: +/* 944 */ if (mode == 0) { +/* 945 */ ret = new Property(this, index, "Texture").allowSetNull(); +/* 946 */ } else if (mode == 1) { MaterialTexture mt; +/* */ MaterialTexture mt; +/* 948 */ if ((this.textures != null) && ((this.textures[0] instanceof StringTexture))) { +/* 949 */ mt = new MaterialTexture((StringTexture)this.textures[0]); +/* */ } else +/* 951 */ mt = new MaterialTexture(this.textureName); +/* 952 */ add(mt); +/* 953 */ ret = mt; +/* 954 */ } else if (mode == 2) { +/* 955 */ if (value == null) { +/* 956 */ loadTexture(null); +/* */ } else +/* 958 */ Console.println(Console.message("Cant-undo-tex")); +/* */ } +/* 960 */ break; +/* */ case 1: +/* 962 */ if (mode == 0) { +/* 963 */ ret = ColorPropertyEditor.make(new Property(this, index, +/* 964 */ "Color")); +/* 965 */ } else if (mode == 1) { +/* 966 */ ret = getColor(); +/* 967 */ } else if (mode == 2) +/* 968 */ setColor((Color)value); +/* 969 */ break; +/* */ case 2: +/* 971 */ if (mode == 0) { +/* 972 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 973 */ "Ambient Reflection Coefficient"), 0.0F, 1.0F); +/* 974 */ } else if (mode == 1) { +/* 975 */ ret = new Float(getAmbient()); +/* 976 */ } else if (mode == 2) +/* 977 */ setAmbient(((Float)value).floatValue()); +/* 978 */ break; +/* */ case 3: +/* 980 */ if (mode == 0) { +/* 981 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 982 */ "Diffuse Reflection Coefficient"), 0.0F, 1.0F); +/* 983 */ } else if (mode == 1) { +/* 984 */ ret = new Float(getDiffuse()); +/* 985 */ } else if (mode == 2) +/* 986 */ setDiffuse(((Float)value).floatValue()); +/* 987 */ break; +/* */ case 4: +/* 989 */ if (mode == 0) { +/* 990 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 991 */ "Specular Reflection Coefficient"), 0.0F, 1.0F); +/* 992 */ } else if (mode == 1) { +/* 993 */ ret = new Float(getSpecular()); +/* 994 */ } else if (mode == 2) +/* 995 */ setSpecular(((Float)value).floatValue()); +/* 996 */ break; +/* */ case 5: +/* 998 */ if (mode == 0) { +/* 999 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 1000 */ "Opacity"), 0.0F, 1.0F); +/* 1001 */ } else if (mode == 1) { +/* 1002 */ ret = new Float(getOpacity()); +/* 1003 */ } else if (mode == 2) +/* 1004 */ setOpacity(((Float)value).floatValue()); +/* 1005 */ break; +/* */ case 6: +/* 1007 */ if (mode == 0) { +/* 1008 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1009 */ "Smooth"), "No", "Yes"); +/* 1010 */ } else if (mode == 1) { +/* 1011 */ ret = new Boolean(getSmooth()); +/* 1012 */ } else if (mode == 2) +/* 1013 */ setSmooth(((Boolean)value).booleanValue()); +/* 1014 */ break; +/* */ case 7: +/* 1016 */ if (mode == 0) { +/* 1017 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1018 */ "Filter"), "No", "Yes"); +/* 1019 */ } else if (mode == 1) { +/* 1020 */ ret = new Boolean(getFilter()); +/* 1021 */ } else if (mode == 2) +/* 1022 */ setFilter(((Boolean)value).booleanValue()); +/* 1023 */ break; +/* */ default: +/* 1025 */ ret = super.properties(index, offset + 8, mode, value); +/* */ } +/* 1027 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 1031 */ return +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1039 */ getName() + "[" + (this.textures == null ? null : this.textureName != null ? this.textureName.toString() : this.textures.toString()) + ", " + getColor() + ", Ambient " + getAmbient() + ", Diffuse " + getDiffuse() + ", Specular " + getSpecular() + ", Opacity " + getOpacity() + ", Smooth " + getSmooth() + ", Filter " + getFilter() + ", hRes " + this.hRes + ", vRes " + this.vRes + ", loResMode " + false + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Material.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MaterialTexture.java b/NET/worlds/scape/MaterialTexture.java new file mode 100644 index 0000000..750ea90 --- /dev/null +++ b/NET/worlds/scape/MaterialTexture.java @@ -0,0 +1,1238 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Color; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MaterialTexture +/* */ extends SuperRoot +/* */ implements NonPersister +/* */ { +/* */ private URL fileName; +/* */ private StringTexture stexture; +/* 1051 */ private String text = ""; +/* 1052 */ private String font = Console.message("MaterialFont"); +/* */ +/* 1054 */ private int size = 48; +/* 1055 */ private Color foregroundColor = Color.white; +/* 1056 */ private Color backgroundColor = Color.black; +/* */ +/* */ MaterialTexture(URL textureName) { +/* 1059 */ this.fileName = textureName; +/* */ } +/* */ +/* */ MaterialTexture(StringTexture texture) { +/* 1063 */ this.stexture = texture; +/* 1064 */ this.text = this.stexture.getText(); +/* 1065 */ this.font = this.stexture.getFont(); +/* 1066 */ this.size = this.stexture.getSize(); +/* 1067 */ this.foregroundColor = this.stexture.getForegroundColor(); +/* 1068 */ this.backgroundColor = this.stexture.getBackgroundColor(); +/* */ } +/* */ +/* */ private void setFile(URL name, boolean force) { +/* 1072 */ this.fileName = name; +/* 1073 */ if ((this.stexture == null) || (force)) { +/* 1074 */ this.stexture = null; +/* 1075 */ ((Material)getOwner()).loadTexture(name); +/* */ } +/* */ } +/* */ +/* */ private void makeString() { +/* 1080 */ Material owner = (Material)getOwner(); +/* */ +/* 1082 */ this.stexture = new StringTexture(this.text, this.font, this.size, this.foregroundColor, +/* 1083 */ this.backgroundColor); +/* 1084 */ owner.setTexture(this.stexture); +/* */ } +/* */ +/* */ private String getText() { +/* 1088 */ return this.text; +/* */ } +/* */ +/* */ private void setText(String text) { +/* 1092 */ this.text = text; +/* 1093 */ if (this.stexture != null) +/* 1094 */ makeString(); +/* */ } +/* */ +/* */ private void setFont(String font) { +/* 1098 */ this.font = font; +/* 1099 */ if (this.stexture != null) +/* 1100 */ makeString(); +/* */ } +/* */ +/* */ private void setSize(int size) { +/* 1104 */ if ((size < 1) || (size > 720)) { +/* 1105 */ Console.println(Console.message("Font-sizes")); +/* */ } else { +/* 1107 */ this.size = size; +/* 1108 */ if (this.stexture != null) +/* 1109 */ makeString(); +/* */ } +/* */ } +/* */ +/* */ private void setForegroundColor(Color color) { +/* 1114 */ this.foregroundColor = color; +/* 1115 */ if (this.stexture != null) +/* 1116 */ makeString(); +/* */ } +/* */ +/* */ private void setBackgroundColor(Color color) { +/* 1120 */ this.backgroundColor = color; +/* 1121 */ if (this.stexture != null) { +/* 1122 */ makeString(); +/* */ } +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 1130 */ Object ret = null; +/* 1131 */ switch (index - offset) { +/* */ case 0: +/* 1133 */ if (mode == 0) { +/* 1134 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1135 */ "Texture Type (Text String)"), +/* 1136 */ "Texture loaded from an image file.", +/* 1137 */ "Texture created from a text string."); +/* 1138 */ } else if (mode == 1) { +/* 1139 */ ret = new Boolean(this.stexture != null); +/* 1140 */ } else if (mode == 2) { +/* 1141 */ boolean stringTexture = ((Boolean)value).booleanValue(); +/* 1142 */ if ((stringTexture) && (this.stexture == null)) { +/* 1143 */ makeString(); +/* 1144 */ } else if ((!stringTexture) && (this.stexture != null)) +/* 1145 */ setFile(this.fileName, true); +/* */ } +/* 1147 */ break; +/* */ case 1: +/* 1149 */ if (mode == 0) { +/* 1150 */ ret = new Property(this, index, "File"); +/* 1151 */ if (this.stexture == null) +/* 1152 */ ret = URLPropertyEditor.make((Property)ret, +/* 1153 */ TextureDecoder.getAllExts()); +/* 1154 */ } else if (mode == 1) { +/* 1155 */ ret = this.fileName; +/* 1156 */ } else if (mode == 2) { +/* 1157 */ setFile((URL)value, false); } +/* 1158 */ break; +/* */ case 2: +/* 1160 */ if (mode == 0) { +/* 1161 */ ret = new Property(this, index, "Text"); +/* 1162 */ if (this.stexture != null) +/* 1163 */ ret = StringPropertyEditor.make((Property)ret); +/* 1164 */ } else if (mode == 1) { +/* 1165 */ ret = getText(); +/* 1166 */ } else if (mode == 2) { +/* 1167 */ setText((String)value); } +/* 1168 */ break; +/* */ case 3: +/* 1170 */ if (mode == 0) { +/* 1171 */ ret = new Property(this, index, "Font"); +/* 1172 */ if (this.stexture != null) +/* 1173 */ ret = StringPropertyEditor.make((Property)ret); +/* 1174 */ } else if (mode == 1) { +/* 1175 */ ret = this.font; +/* 1176 */ } else if (mode == 2) { +/* 1177 */ setFont((String)value); +/* */ } +/* 1179 */ if (value != null) { +/* 1180 */ System.out.println("Setting font " + (String)value + " in Material.java"); +/* */ } +/* 1182 */ break; +/* */ case 4: +/* 1184 */ if (mode == 0) { +/* 1185 */ ret = new Property(this, index, "Size"); +/* 1186 */ if (this.stexture != null) +/* 1187 */ ret = IntegerPropertyEditor.make((Property)ret); +/* 1188 */ } else if (mode == 1) { +/* 1189 */ ret = new Integer(this.size); +/* 1190 */ } else if (mode == 2) { +/* 1191 */ setSize(((Integer)value).intValue()); } +/* 1192 */ break; +/* */ case 5: +/* 1194 */ if (mode == 0) { +/* 1195 */ ret = new Property(this, index, "Foreground Color"); +/* 1196 */ if (this.stexture != null) +/* 1197 */ ret = ColorPropertyEditor.make((Property)ret); +/* 1198 */ } else if (mode == 1) { +/* 1199 */ ret = this.foregroundColor; +/* 1200 */ } else if (mode == 2) { +/* 1201 */ setForegroundColor((Color)value); } +/* 1202 */ break; +/* */ case 6: +/* 1204 */ if (mode == 0) { +/* 1205 */ ret = new Property(this, index, "Background Color"); +/* 1206 */ if (this.stexture != null) +/* 1207 */ ret = ColorPropertyEditor.make((Property)ret); +/* 1208 */ } else if (mode == 1) { +/* 1209 */ ret = this.backgroundColor; +/* 1210 */ } else if (mode == 2) { +/* 1211 */ setBackgroundColor((Color)value); } +/* 1212 */ break; +/* */ default: +/* 1214 */ ret = super.properties(index, offset + 7, mode, value); +/* */ } +/* 1216 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 1220 */ if (this.stexture != null) { +/* 1221 */ return this.stexture; +/* */ } +/* 1223 */ Material owner = (Material)getOwner(); +/* 1224 */ URL name = null; +/* 1225 */ if (owner != null) +/* 1226 */ name = owner.textureName; +/* 1227 */ if (name == null) { +/* 1228 */ return "File "; +/* */ } +/* 1230 */ return "File " + name; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MaterialTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MaybeNullDialog.java b/NET/worlds/scape/MaybeNullDialog.java new file mode 100644 index 0000000..3d1e30c --- /dev/null +++ b/NET/worlds/scape/MaybeNullDialog.java @@ -0,0 +1,46 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.ConfirmDialog; +/* */ import NET.worlds.console.Console; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MaybeNullDialog +/* */ extends ConfirmDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Property property; +/* */ private Object newOne; +/* */ private EditTile parent; +/* */ +/* */ MaybeNullDialog(EditTile parent, String title, String prompt, Property property, Object newOne) +/* */ { +/* 27 */ super(Console.getFrame(), parent, title, prompt); +/* 28 */ this.property = property; +/* 29 */ this.newOne = newOne; +/* 30 */ this.parent = parent; +/* 31 */ ready(); +/* */ } +/* */ +/* */ +/* */ protected boolean setValue() +/* */ { +/* 37 */ this.parent.addUndoableSet(this.property, this.newOne); +/* 38 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MaybeNullDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MaybeNullPropertyEditor.java b/NET/worlds/scape/MaybeNullPropertyEditor.java new file mode 100644 index 0000000..281d68f --- /dev/null +++ b/NET/worlds/scape/MaybeNullPropertyEditor.java @@ -0,0 +1,68 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MaybeNullPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private Object newOne; +/* */ +/* */ private MaybeNullPropertyEditor(Property property, Object newOne) +/* */ { +/* 47 */ super(property); +/* 48 */ this.newOne = newOne; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 53 */ return new MaybeNullDialog(parent, title, +/* 54 */ "Create a new instance?", this.property, this.newOne); +/* */ } +/* */ +/* */ public static Property make(Property property, Object newOne) +/* */ { +/* 59 */ return property.setEditor(new MaybeNullPropertyEditor(property, +/* 60 */ newOne)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MaybeNullPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MetaEnumeration.java b/NET/worlds/scape/MetaEnumeration.java new file mode 100644 index 0000000..b777f15 --- /dev/null +++ b/NET/worlds/scape/MetaEnumeration.java @@ -0,0 +1,74 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MetaEnumeration +/* */ implements Enumeration +/* */ { +/* */ private Vector v; +/* */ private int index; +/* */ +/* */ MetaEnumeration(Vector v) +/* */ { +/* 30 */ assert (v.size() > 0); +/* */ +/* 32 */ this.v = v; +/* 33 */ this.index = 0; +/* */ +/* 35 */ advanceToNext(); +/* */ } +/* */ +/* */ public boolean hasMoreElements() +/* */ { +/* 40 */ return ((Enumeration)this.v.elementAt(this.index)).hasMoreElements(); +/* */ } +/* */ +/* */ public Object nextElement() +/* */ { +/* 45 */ Object e = ((Enumeration)this.v.elementAt(this.index)).nextElement(); +/* 46 */ advanceToNext(); +/* 47 */ return e; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void advanceToNext() +/* */ { +/* 59 */ while (!((Enumeration)this.v.elementAt(this.index)).hasMoreElements()) +/* */ { +/* 61 */ if (++this.index == this.v.size()) +/* */ { +/* 63 */ this.index -= 1; +/* 64 */ break; +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MetaEnumeration.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Mirror.java b/NET/worlds/scape/Mirror.java new file mode 100644 index 0000000..97f609f --- /dev/null +++ b/NET/worlds/scape/Mirror.java @@ -0,0 +1,91 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Mirror +/* */ extends Portal +/* */ { +/* */ public Mirror(float w, float h) +/* */ { +/* 36 */ super(w, h); +/* */ +/* 38 */ connectTo(this); +/* */ +/* 40 */ this.flags |= 0x4; +/* */ } +/* */ +/* */ +/* */ public Mirror(float llx, float lly, float llz, float urx, float ury, float urz) +/* */ { +/* 46 */ super(llx, lly, llz, urx, ury, urz); +/* */ +/* 48 */ connectTo(this); +/* */ +/* 50 */ this.flags |= 0x4; +/* */ } +/* */ +/* */ public Mirror(Point3Temp llc, Point3Temp urc) +/* */ { +/* 55 */ super(llc, urc); +/* */ +/* 57 */ connectTo(this); +/* */ +/* 59 */ this.flags |= 0x4; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public BumpCalc getBumpCalc(BumpEventTemp b) +/* */ { +/* 67 */ if (this.bumpCalc == null) +/* 68 */ return Rect.standardPlaneBumpCalc; +/* 69 */ return this.bumpCalc; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Mirror() {} +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 83 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Mirror.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MomentumBehavior.java b/NET/worlds/scape/MomentumBehavior.java new file mode 100644 index 0000000..c9ffe2b --- /dev/null +++ b/NET/worlds/scape/MomentumBehavior.java @@ -0,0 +1,14 @@ +package NET.worlds.scape; + +import java.util.Enumeration; + +public abstract interface MomentumBehavior +{ + public abstract void transferFrom(Enumeration paramEnumeration); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MomentumBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MontyDoor.java b/NET/worlds/scape/MontyDoor.java new file mode 100644 index 0000000..a9ff251 --- /dev/null +++ b/NET/worlds/scape/MontyDoor.java @@ -0,0 +1,255 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MontyDoor +/* */ extends Portal +/* */ implements MouseDownHandler, MainCallback +/* */ { +/* */ public MontyDoor() +/* */ { +/* 36 */ this.flags |= 0x40000; +/* */ } +/* */ +/* */ +/* 40 */ boolean setsAvatar = false; +/* */ +/* */ +/* */ URL url; +/* */ +/* */ +/* 46 */ String description = ""; +/* */ +/* */ DialogAction action; +/* */ +/* */ String viewName; +/* */ +/* */ URL viewURL; +/* */ Persister lastTrigger; +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 57 */ if ((e.key & 0x1) == 0) { +/* 58 */ return false; +/* */ } +/* */ +/* 61 */ if ((this.action != null) || (this.url == null)) { +/* 62 */ return true; +/* */ } +/* 64 */ if (this.setsAvatar) +/* */ { +/* 66 */ SelectAvatarAction a = new SelectAvatarAction(); +/* 67 */ a.url = this.viewURL; +/* 68 */ a.description = this.description; +/* 69 */ this.action = a; +/* */ } +/* */ else { +/* 72 */ SendURLAction a = new SendURLAction(); +/* 73 */ a.destination = this.url; +/* 74 */ a.description = this.description; +/* 75 */ this.action = a; +/* */ } +/* */ +/* */ +/* 79 */ this.action.cancelOnly = true; +/* 80 */ Main.register(this); +/* */ +/* 82 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ public void mainCallback() +/* */ { +/* 89 */ if (this.action.cancelOnly) { +/* 90 */ this.lastTrigger = this.action.trigger(null, this.lastTrigger); +/* 91 */ if (this.lastTrigger != null) { +/* 92 */ return; +/* */ } +/* */ +/* 95 */ if ((this.viewURL != null) && (this.viewName != null) && +/* 96 */ (this._farSideRoomName != null)) +/* */ { +/* 98 */ Room r = getRoom(); +/* */ World w; +/* 100 */ if ((r != null) && ((w = r.getWorld()) != null)) { +/* 101 */ r = w.getRoom(this._farSideRoomName); +/* */ +/* 103 */ if (r == null) { +/* 104 */ Main.unregister(this); +/* 105 */ this.action = null; +/* 106 */ Object[] arguments = { new String(getName()), +/* 107 */ new String(this._farSideRoomName) }; +/* 108 */ Console.println(MessageFormat.format( +/* 109 */ Console.message("MontyDoor"), arguments)); +/* 110 */ return; +/* */ } +/* */ +/* 113 */ Enumeration list = r.getDeepOwned(); +/* 114 */ SetPropertyAction.propHelper(2, this.viewURL, "File", +/* 115 */ SuperRoot.nameSearch(list, this.viewName)); +/* */ } +/* */ } +/* */ +/* */ +/* 120 */ this.action.cancelOnly = false; +/* */ +/* 122 */ this.flags &= 0xFFFBFFFF; +/* 123 */ reset(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 129 */ this.lastTrigger = this.action.trigger(null, this.lastTrigger); +/* 130 */ if (this.lastTrigger != null) { +/* 131 */ return; +/* */ } +/* */ +/* 134 */ Main.unregister(this); +/* 135 */ this.action = null; +/* */ +/* */ +/* 138 */ this.flags |= 0x40000; +/* 139 */ reset(); +/* */ } +/* */ +/* */ public BumpCalc getBumpCalc(BumpEventTemp b) { +/* 143 */ return standardPlaneBumpCalc; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 148 */ return true; +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 155 */ Object ret = null; +/* 156 */ switch (index - offset) { +/* */ case 0: +/* 158 */ if (mode == 0) { +/* 159 */ ret = BooleanPropertyEditor.make( +/* 160 */ new Property(this, index, "Avatar type"), +/* 161 */ "SendURL", +/* 162 */ "SelectAvatar"); +/* */ } +/* 164 */ else if (mode == 1) { +/* 165 */ ret = new Boolean(this.setsAvatar); +/* */ } +/* 167 */ else if (mode == 2) { +/* 168 */ this.setsAvatar = ((Boolean)value).booleanValue(); +/* */ } +/* 170 */ break; +/* */ case 1: +/* 172 */ if (mode == 0) { +/* 173 */ ret = URLPropertyEditor.make( +/* 174 */ new Property(this, index, +/* 175 */ "URL (used only for non-avatar)") +/* 176 */ .allowSetNull(), null); +/* */ } +/* 178 */ else if (mode == 1) { +/* 179 */ ret = this.url; +/* 180 */ } else if (mode == 2) +/* 181 */ this.url = ((URL)value); +/* 182 */ break; +/* */ case 2: +/* 184 */ if (mode == 0) { +/* 185 */ ret = StringPropertyEditor.make( +/* 186 */ new Property(this, index, "Description")); +/* 187 */ } else if (mode == 1) { +/* 188 */ ret = this.description; +/* 189 */ } else if (mode == 2) +/* 190 */ this.description = ((String)value).toString().trim(); +/* 191 */ break; +/* */ case 3: +/* 193 */ if (mode == 0) { +/* 194 */ ret = URLPropertyEditor.make( +/* 195 */ new Property(this, index, "Display URL") +/* 196 */ .allowSetNull(), null); +/* */ } +/* 198 */ else if (mode == 1) { +/* 199 */ ret = this.viewURL; +/* 200 */ } else if (mode == 2) +/* 201 */ this.viewURL = ((URL)value); +/* 202 */ break; +/* */ case 4: +/* 204 */ if (mode == 0) { +/* 205 */ ret = StringPropertyEditor.make( +/* 206 */ new Property(this, index, "Display Name")); +/* 207 */ } else if (mode == 1) { +/* 208 */ ret = this.viewName; +/* 209 */ } else if (mode == 2) +/* 210 */ this.viewName = ((String)value).toString().trim(); +/* 211 */ break; +/* */ default: +/* 213 */ ret = super.properties(index, offset + 5, mode, value); +/* */ } +/* 215 */ return ret; +/* */ } +/* */ +/* */ +/* 219 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 222 */ s.saveVersion(0, classCookie); +/* 223 */ int f = this.flags; +/* 224 */ this.flags |= 0x40000; +/* 225 */ super.saveState(s); +/* 226 */ this.flags = f; +/* 227 */ s.saveBoolean(this.setsAvatar); +/* 228 */ URL.save(s, this.url); +/* 229 */ s.saveString(this.description); +/* 230 */ URL.save(s, this.viewURL); +/* 231 */ s.saveString(this.viewName); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 235 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 237 */ super.restoreState(r); +/* 238 */ this.setsAvatar = r.restoreBoolean(); +/* 239 */ this.url = URL.restore(r); +/* 240 */ this.description = r.restoreString(); +/* 241 */ this.viewURL = URL.restore(r); +/* 242 */ this.viewName = r.restoreString(); +/* 243 */ break; +/* */ +/* */ default: +/* 246 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MontyDoor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MoreInfoDialog.java b/NET/worlds/scape/MoreInfoDialog.java new file mode 100644 index 0000000..bb24c2b --- /dev/null +++ b/NET/worlds/scape/MoreInfoDialog.java @@ -0,0 +1,75 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.ImageButtons; +/* */ import NET.worlds.console.ImageButtonsCallback; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Rectangle; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MoreInfoDialog +/* */ extends PolledDialog +/* */ implements ImageButtonsCallback +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private ImageButtons ib; +/* */ +/* */ public MoreInfoDialog(Window parent, DialogReceiver receiver) +/* */ { +/* 30 */ super(parent, receiver, Console.message("BrowseQ"), false); +/* 31 */ setAlignment(1); +/* 32 */ Rectangle[] rects = new Rectangle[2]; +/* 33 */ int yesX = IniFile.override().getIniInt("moreinfoYesX", 48); +/* 34 */ int yesY = IniFile.override().getIniInt("moreinfoYesY", 22); +/* 35 */ int yesW = IniFile.override().getIniInt("moreinfoYesW", 60); +/* 36 */ int yesH = IniFile.override().getIniInt("moreinfoYesH", 19); +/* 37 */ rects[0] = new Rectangle(yesX, yesY, yesW, yesH); +/* 38 */ int noX = IniFile.override().getIniInt("moreinfoNoX", 139); +/* 39 */ int noY = IniFile.override().getIniInt("moreinfoNoY", 22); +/* 40 */ int noW = IniFile.override().getIniInt("moreinfoNoW", 54); +/* 41 */ int noH = IniFile.override().getIniInt("moreinfoNoH", 19); +/* 42 */ rects[1] = new Rectangle(noX, noY, noW, noH); +/* 43 */ String migif = IniFile.override().getIniString("moreInfoDlg", +/* 44 */ Console.message("moreinfo.gif")); +/* 45 */ this.ib = new ImageButtons(migif, rects, this); +/* 46 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 51 */ add("Center", this.ib); +/* */ } +/* */ +/* */ public Object imageButtonsCallback(Component who, int which) +/* */ { +/* 56 */ done(which == 0); +/* 57 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 63 */ if (key == 27) +/* 64 */ return done(false); +/* 65 */ if (key == 10) +/* 66 */ return done(true); +/* 67 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MoreInfoDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Motion.java b/NET/worlds/scape/Motion.java new file mode 100644 index 0000000..32367ff --- /dev/null +++ b/NET/worlds/scape/Motion.java @@ -0,0 +1,484 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Date; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Motion +/* */ extends TriggeredSwitchableBehavior +/* */ implements FrameHandler, Persister, MouseDownHandler, BumpHandler +/* */ { +/* */ long startMotionTime; +/* */ protected float cycleTime; +/* */ protected String frameList; +/* */ protected int cycles; +/* */ protected Transform motionTransform; +/* */ protected Point3 startPoint; +/* */ protected Point3 endPoint; +/* */ protected Point3 deltaPoint; +/* */ protected Point3 startScale; +/* */ protected Point3 endScale; +/* */ protected Point3 deltaScale; +/* */ protected Point3 startSpin; +/* */ protected Point3 endSpin; +/* */ protected Point3 currentSpin; +/* */ protected float startRotation; +/* */ protected float endRotation; +/* */ protected float currentRotation; +/* */ protected boolean motionTransformInitialized; +/* */ protected boolean variableInitialized; +/* 38 */ protected boolean motionEnd = true; +/* */ +/* */ +/* */ public Motion() +/* */ { +/* 43 */ this.cycleTime = 1000.0F; +/* 44 */ this.trigger = new String("none"); +/* 45 */ this.externalTriggerTag = new String(""); +/* 46 */ this.cycles = 0; +/* 47 */ this.motionTransformInitialized = false; +/* 48 */ this.variableInitialized = false; +/* 49 */ this.startPoint = new Point3(); +/* 50 */ this.endPoint = new Point3(); +/* 51 */ this.deltaPoint = new Point3(); +/* 52 */ this.startScale = new Point3(); +/* 53 */ this.endScale = new Point3(); +/* 54 */ this.deltaScale = new Point3(); +/* 55 */ this.startSpin = new Point3(); +/* 56 */ this.endSpin = new Point3(); +/* 57 */ this.currentSpin = new Point3(); +/* */ +/* 59 */ startMotion(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void ExternalTrigger(Trigger trigger_source, int sequence_no, int event_no) +/* */ { +/* 67 */ this.trigger_source = trigger_source; +/* 68 */ this.sequence_no = sequence_no; +/* 69 */ this.event_no = event_no; +/* 70 */ startMotion(); +/* */ } +/* */ +/* */ public boolean equivalent(Point3Temp a, Point3Temp b) +/* */ { +/* 75 */ if ((Math.round(a.x) == Math.round(b.x)) && +/* 76 */ (Math.round(a.y) == Math.round(b.y)) && +/* 77 */ (Math.round(a.z) == Math.round(b.z))) { +/* 78 */ return true; +/* */ } +/* 80 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void startMotion() +/* */ { +/* 88 */ if ((this.motionTransform != null) && +/* 89 */ (equivalent(this.startPoint, this.motionTransform.getPosition())) && +/* 90 */ (Math.round(this.startScale.x) == +/* 91 */ Math.round(this.motionTransform.getTotalScale()))) +/* */ { +/* 93 */ this.currentRotation = Math.round(this.motionTransform.getSpin( +/* 94 */ this.currentSpin)); +/* 95 */ this.startRotation = Math.round(this.startRotation); +/* */ +/* 97 */ if (((this.startRotation != this.currentRotation) && +/* 98 */ (this.startRotation - 360.0F != this.currentRotation)) || ( +/* 99 */ (equivalent(this.startSpin, this.currentSpin)) || ( +/* 100 */ ((-this.startRotation == this.currentRotation) || +/* 101 */ (360.0F - this.startRotation == this.currentRotation)) && +/* 102 */ (equivalent(this.startSpin, this.currentSpin.negate()))))) +/* */ { +/* 104 */ Date timer = new Date(); +/* 105 */ this.startMotionTime = timer.getTime(); +/* 106 */ this.motionEnd = true; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 122 */ if (!this.motionTransformInitialized) { +/* 123 */ this.motionTransform = e.target; +/* 124 */ this.motionTransformInitialized = true; +/* */ } +/* 126 */ if (!this.variableInitialized) { +/* 127 */ this.startPoint.copy(this.motionTransform.getPosition()); +/* 128 */ this.endPoint.copy(this.startPoint); +/* 129 */ this.startScale.x = this.motionTransform.getTotalScale(); +/* 130 */ this.startScale.y = this.motionTransform.getTotalScale(); +/* 131 */ this.startScale.z = this.motionTransform.getTotalScale(); +/* 132 */ this.endScale.copy(this.startScale); +/* */ +/* 134 */ this.startRotation = this.motionTransform.getSpin(this.startSpin); +/* 135 */ this.endRotation = 0.0F; +/* 136 */ this.variableInitialized = true; +/* */ } +/* */ +/* 139 */ if (this.enabled) +/* */ { +/* 141 */ Date timer = new Date(); +/* 142 */ long currentTime = timer.getTime(); +/* 143 */ float frameLoc = (float)(-this.startMotionTime + currentTime) % +/* 144 */ this.cycleTime / this.cycleTime; +/* 145 */ int cycleNo = (int)((float)(-this.startMotionTime + currentTime) / this.cycleTime); +/* */ +/* 147 */ if ((cycleNo < this.cycles) || (this.cycles == 0) || (!this.motionEnd)) +/* */ { +/* */ +/* 150 */ this.motionEnd = false; +/* 151 */ if ((cycleNo >= this.cycles) && (this.cycles != 0)) { +/* 152 */ this.motionEnd = true; +/* 153 */ frameLoc = 1.0F; +/* 154 */ if (this.trigger_source != null) { +/* 155 */ this.trigger_source.registerFinishedTriggerTag(this.sequence_no, +/* 156 */ this.event_no); +/* */ } +/* */ } +/* 159 */ e.receiver.makeIdentity(); +/* 160 */ e.receiver.scale( +/* 161 */ this.startScale.x + (this.endScale.x - this.startScale.x) * frameLoc, +/* 162 */ this.startScale.x + (this.endScale.x - this.startScale.x) * frameLoc, +/* 163 */ this.startScale.x + (this.endScale.x - this.startScale.x) * frameLoc); +/* */ +/* 165 */ e.receiver.moveTo( +/* 166 */ this.startPoint.x + (this.endPoint.x - this.startPoint.x) * frameLoc, +/* 167 */ this.startPoint.y + (this.endPoint.y - this.startPoint.y) * frameLoc, +/* 168 */ this.startPoint.z + (this.endPoint.z - this.startPoint.z) * frameLoc); +/* */ +/* 170 */ e.receiver.spin(this.startSpin, this.startRotation); +/* 171 */ e.receiver.spin(this.endSpin, this.endRotation * frameLoc); +/* */ } +/* */ } +/* */ +/* 175 */ return true; +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 180 */ if ((this.enabled) && +/* 181 */ (this.trigger.equals("click"))) { +/* 182 */ startMotion(); +/* */ } +/* */ +/* 185 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 190 */ if ((this.enabled) && +/* 191 */ (this.trigger.equals("bump"))) { +/* 192 */ startMotion(); +/* */ } +/* */ +/* 195 */ return true; +/* */ } +/* */ +/* */ +/* */ public void startTransform() +/* */ { +/* 201 */ if (this.motionTransform != null) { +/* 202 */ this.motionTransform.makeIdentity(); +/* 203 */ this.motionTransform.scale(this.startScale.x, this.startScale.x, this.startScale.x); +/* 204 */ this.motionTransform.moveTo(this.startPoint.x, this.startPoint.y, this.startPoint.z); +/* */ +/* 206 */ this.motionTransform.spin(this.startSpin, this.startRotation); +/* */ } else { +/* 208 */ System.out.println("motionTransform is null!!!!"); +/* */ } +/* */ } +/* */ +/* */ public void endTransform() +/* */ { +/* 214 */ if (this.motionTransform != null) { +/* 215 */ this.motionTransform.makeIdentity(); +/* 216 */ this.motionTransform.scale(this.endScale.x, this.endScale.x, this.endScale.x); +/* 217 */ this.motionTransform.moveTo(this.endPoint.x, this.endPoint.y, this.endPoint.z); +/* */ +/* 219 */ this.motionTransform.spin(this.startSpin, this.startRotation); +/* 220 */ this.motionTransform.spin(this.endSpin, this.endRotation); +/* */ } else { +/* 222 */ System.out.println("motionTransform is null!!!!"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 233 */ Object ret = null; +/* 234 */ switch (index - offset) { +/* */ case 0: +/* 236 */ if (mode == 0) +/* 237 */ ret = new ClassProperty(this, index, "Motion"); +/* 238 */ break; +/* */ case 1: +/* 240 */ if (mode == 0) { +/* 241 */ ret = FloatPropertyEditor.make( +/* 242 */ new Property(this, index, "Cycle Time")); +/* 243 */ } else if (mode == 1) { +/* 244 */ ret = new Float(this.cycleTime); +/* 245 */ } else if (mode == 2) +/* 246 */ this.cycleTime = ((Float)value).floatValue(); +/* 247 */ break; +/* */ case 2: +/* 249 */ if (mode == 0) { +/* 250 */ ret = IntegerPropertyEditor.make( +/* 251 */ new Property(this, index, "Cycles")); +/* 252 */ } else if (mode == 1) { +/* 253 */ ret = new Integer(this.cycles); +/* 254 */ } else if (mode == 2) +/* 255 */ this.cycles = ((Integer)value).intValue(); +/* 256 */ break; +/* */ case 3: +/* 258 */ if (mode == 0) { +/* 259 */ ret = StringPropertyEditor.make( +/* 260 */ new Property(this, index, "Trigger")); +/* 261 */ } else if (mode == 1) { +/* 262 */ ret = new String(this.trigger); +/* 263 */ } else if (mode == 2) { +/* 264 */ this.trigger = ((String)value).toString().trim(); +/* 265 */ if (this.trigger.equals("external")) { +/* 266 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 267 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 268 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ } +/* 271 */ break; +/* */ case 4: +/* 273 */ if (mode == 0) { +/* 274 */ ret = StringPropertyEditor.make( +/* 275 */ new Property(this, index, "External Trigger Tag")); +/* 276 */ } else if (mode == 1) { +/* 277 */ ret = new String(this.externalTriggerTag); +/* 278 */ } else if (mode == 2) { +/* 279 */ this.externalTriggerTag = ((String)value).toString().trim(); +/* */ } +/* 281 */ break; +/* */ case 5: +/* 283 */ if (mode == 0) { +/* 284 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 285 */ "End Point")); +/* 286 */ } else if (mode == 1) { +/* 287 */ ret = new Point3(this.endPoint); +/* 288 */ endTransform(); +/* */ } +/* 290 */ else if (mode == 2) { +/* 291 */ this.endPoint.copy((Point3)value); +/* 292 */ endTransform(); +/* */ } +/* 294 */ break; +/* */ case 6: +/* 296 */ if (mode == 0) { +/* 297 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 298 */ "Start Point")); +/* 299 */ } else if (mode == 1) { +/* 300 */ ret = new Point3(this.startPoint); +/* 301 */ startTransform(); +/* */ +/* */ } +/* 304 */ else if (mode == 2) { +/* 305 */ this.startPoint.copy((Point3)value); +/* 306 */ startTransform(); +/* */ } +/* 308 */ break; +/* */ case 7: +/* 310 */ if (mode == 0) { +/* 311 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 312 */ "End Scale")); +/* 313 */ } else if (mode == 1) { +/* 314 */ ret = new Point3(this.endScale); +/* 315 */ endTransform(); +/* */ } +/* 317 */ else if (mode == 2) { +/* 318 */ this.endScale.copy((Point3)value); +/* 319 */ endTransform(); +/* */ } +/* 321 */ break; +/* */ case 8: +/* 323 */ if (mode == 0) { +/* 324 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 325 */ "Start Scale")); +/* 326 */ } else if (mode == 1) { +/* 327 */ ret = new Point3(this.startScale); +/* 328 */ startTransform(); +/* */ +/* */ } +/* 331 */ else if (mode == 2) { +/* 332 */ this.startScale.copy((Point3)value); +/* 333 */ startTransform(); +/* */ } +/* 335 */ break; +/* */ case 9: +/* 337 */ if (mode == 0) { +/* 338 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 339 */ "End Spin (Relative)")); +/* 340 */ } else if (mode == 1) { +/* 341 */ ret = new Point3(this.endSpin); +/* 342 */ endTransform(); +/* */ } +/* 344 */ else if (mode == 2) { +/* 345 */ this.endSpin.copy((Point3)value); +/* 346 */ endTransform(); +/* */ } +/* 348 */ break; +/* */ case 10: +/* 350 */ if (mode == 0) { +/* 351 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 352 */ "Start Spin")); +/* 353 */ } else if (mode == 1) { +/* 354 */ ret = new Point3(this.startSpin); +/* 355 */ startTransform(); +/* */ } +/* 357 */ else if (mode == 2) { +/* 358 */ this.startSpin.copy((Point3)value); +/* 359 */ startTransform(); +/* */ } +/* 361 */ break; +/* */ case 11: +/* 363 */ if (mode == 0) { +/* 364 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 365 */ "End Rotation (Relative)")); +/* 366 */ } else if (mode == 1) { +/* 367 */ ret = new Float(this.endRotation); +/* 368 */ endTransform(); +/* */ } +/* 370 */ else if (mode == 2) { +/* 371 */ this.endRotation = ((Float)value).floatValue(); +/* 372 */ endTransform(); +/* */ } +/* 374 */ break; +/* */ case 12: +/* 376 */ if (mode == 0) { +/* 377 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 378 */ "Start Rotation")); +/* 379 */ } else if (mode == 1) { +/* 380 */ ret = new Float(this.startRotation); +/* 381 */ startTransform(); +/* */ } +/* 383 */ else if (mode == 2) { +/* 384 */ this.startRotation = ((Float)value).floatValue(); +/* 385 */ startTransform(); +/* */ } +/* 387 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ default: +/* 393 */ ret = super.properties(index, offset + 13, mode, value); +/* */ } +/* 395 */ if (mode == 2) +/* */ { +/* 397 */ if (this.trigger.equals("none")) { +/* 398 */ startMotion(); +/* */ } +/* */ } +/* 401 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 406 */ return +/* */ +/* 408 */ "Motion: cycleTime " + this.cycleTime + ", cycles " + this.cycles + ", enabled " + this.enabled + ", trigger " + this.trigger + ", externalTriggerTag " + this.externalTriggerTag; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 414 */ s.saveFloat(this.cycleTime); +/* 415 */ s.saveInt(this.cycles); +/* 416 */ s.saveString(this.trigger); +/* 417 */ s.saveString(this.externalTriggerTag); +/* 418 */ this.endPoint.saveState(s); +/* 419 */ this.startPoint.saveState(s); +/* 420 */ this.endScale.saveState(s); +/* 421 */ this.startScale.saveState(s); +/* 422 */ this.endSpin.saveState(s); +/* 423 */ this.startSpin.saveState(s); +/* 424 */ s.saveFloat(this.endRotation); +/* 425 */ s.saveFloat(this.startRotation); +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 432 */ this.cycleTime = r.restoreFloat(); +/* 433 */ this.cycles = r.restoreInt(); +/* 434 */ this.trigger = r.restoreString(); +/* 435 */ if (this.trigger.equals("external")) { +/* 436 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 437 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 438 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ +/* 441 */ this.externalTriggerTag = r.restoreString(); +/* */ try { +/* 443 */ this.endPoint.restoreState(r); +/* 444 */ this.startPoint.restoreState(r); +/* 445 */ this.endScale.restoreState(r); +/* 446 */ this.startScale.restoreState(r); +/* 447 */ this.endSpin.restoreState(r); +/* 448 */ this.startSpin.restoreState(r); +/* */ } +/* */ catch (Exception localException) {} +/* 451 */ this.endRotation = r.restoreFloat(); +/* 452 */ this.startRotation = r.restoreFloat(); +/* 453 */ this.variableInitialized = true; +/* 454 */ if (!this.trigger.equals("none")) { +/* 455 */ this.startMotionTime = ((int)-(this.cycles * this.cycleTime)); +/* */ } else { +/* 457 */ startMotion(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 466 */ String name = getName(); +/* 467 */ String arg1 = name == null ? "" : name; +/* 468 */ SuperRoot owner = getOwner(); +/* 469 */ String oname = ""; +/* 470 */ if (owner != null) { +/* 471 */ oname = owner.getName(); +/* */ } +/* 473 */ String arg2 = oname == null ? "" : oname; +/* 474 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 475 */ Console.println(MessageFormat.format( +/* 476 */ Console.message("Motion-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Motion.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseButtonEvent.java b/NET/worlds/scape/MouseButtonEvent.java new file mode 100644 index 0000000..7ce112f --- /dev/null +++ b/NET/worlds/scape/MouseButtonEvent.java @@ -0,0 +1,46 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseButtonEvent +/* */ extends MouseEvent +/* */ { +/* */ public char key; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public MouseButtonEvent(int time, WObject target, char key, int x, int y) +/* */ { +/* 20 */ super(time, target, x, y); +/* 21 */ this.key = key; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 35 */ if (((o instanceof MouseButtonHandler)) && +/* 36 */ (((MouseButtonHandler)o).handle(this))) +/* 37 */ return true; +/* 38 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseButtonEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseButtonHandler.java b/NET/worlds/scape/MouseButtonHandler.java new file mode 100644 index 0000000..98eaffb --- /dev/null +++ b/NET/worlds/scape/MouseButtonHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseButtonHandler +{ + public abstract boolean handle(MouseButtonEvent paramMouseButtonEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseButtonHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDeltaEvent.java b/NET/worlds/scape/MouseDeltaEvent.java new file mode 100644 index 0000000..ac2d581 --- /dev/null +++ b/NET/worlds/scape/MouseDeltaEvent.java @@ -0,0 +1,54 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseDeltaEvent +/* */ extends MouseEvent +/* */ { +/* */ public int dx; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int dy; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public MouseDeltaEvent(int time, WObject target, int dx, int dy) +/* */ { +/* 28 */ super(time, target, 0, 0); +/* */ +/* 30 */ this.dx = dx; +/* 31 */ this.dy = dy; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 43 */ if (((o instanceof MouseDeltaHandler)) && +/* 44 */ (((MouseDeltaHandler)o).handle(this))) +/* 45 */ return true; +/* 46 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDeltaEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDeltaHandler.java b/NET/worlds/scape/MouseDeltaHandler.java new file mode 100644 index 0000000..d93cfe6 --- /dev/null +++ b/NET/worlds/scape/MouseDeltaHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseDeltaHandler +{ + public abstract boolean handle(MouseDeltaEvent paramMouseDeltaEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDeltaHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDownEvent.java b/NET/worlds/scape/MouseDownEvent.java new file mode 100644 index 0000000..10e4de8 --- /dev/null +++ b/NET/worlds/scape/MouseDownEvent.java @@ -0,0 +1,55 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BBWObjClickedCommand; +/* */ import NET.worlds.console.BlackBox; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseDownEvent +/* */ extends MouseButtonEvent +/* */ { +/* */ public MouseDownEvent(int time, WObject target, char key, int x, int y) +/* */ { +/* 23 */ super(time, target, key, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 35 */ if ((o instanceof MouseDownHandler)) +/* */ { +/* 37 */ BlackBox.getInstance().submitEvent(new BBWObjClickedCommand( +/* 38 */ ((SuperRoot)o).getName(), this.key, this.x, this.y)); +/* 39 */ if (((MouseDownHandler)o).handle(this)) +/* 40 */ return true; +/* */ } +/* 42 */ return super.deliver(o); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 47 */ return "MouseDown" + super.toString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDownEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDownHandler.java b/NET/worlds/scape/MouseDownHandler.java new file mode 100644 index 0000000..0d499f3 --- /dev/null +++ b/NET/worlds/scape/MouseDownHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseDownHandler +{ + public abstract boolean handle(MouseDownEvent paramMouseDownEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDownHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDragEvent.java b/NET/worlds/scape/MouseDragEvent.java new file mode 100644 index 0000000..586f42f --- /dev/null +++ b/NET/worlds/scape/MouseDragEvent.java @@ -0,0 +1,43 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseDragEvent +/* */ extends MousePositionEvent +/* */ { +/* */ public MouseDragEvent(int time, WObject target, int x, int y) +/* */ { +/* 20 */ super(time, target, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 32 */ if (((o instanceof MouseDragHandler)) && +/* 33 */ (((MouseDragHandler)o).handle(this))) +/* 34 */ return true; +/* 35 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDragEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseDragHandler.java b/NET/worlds/scape/MouseDragHandler.java new file mode 100644 index 0000000..fffb29b --- /dev/null +++ b/NET/worlds/scape/MouseDragHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseDragHandler +{ + public abstract boolean handle(MouseDragEvent paramMouseDragEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseDragHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseEnterEvent.java b/NET/worlds/scape/MouseEnterEvent.java new file mode 100644 index 0000000..25b0f4c --- /dev/null +++ b/NET/worlds/scape/MouseEnterEvent.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseEnterEvent +/* */ extends MousePositionEvent +/* */ { +/* */ public MouseEnterEvent(int time, WObject target, int x, int y) +/* */ { +/* 18 */ super(time, target, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 30 */ if (((o instanceof MouseEnterHandler)) && +/* 31 */ (((MouseEnterHandler)o).handle(this))) +/* 32 */ return true; +/* 33 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseEnterEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseEnterHandler.java b/NET/worlds/scape/MouseEnterHandler.java new file mode 100644 index 0000000..c19d36a --- /dev/null +++ b/NET/worlds/scape/MouseEnterHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseEnterHandler +{ + public abstract boolean handle(MouseEnterEvent paramMouseEnterEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseEnterHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseEvent.java b/NET/worlds/scape/MouseEvent.java new file mode 100644 index 0000000..a91dd16 --- /dev/null +++ b/NET/worlds/scape/MouseEvent.java @@ -0,0 +1,46 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseEvent +/* */ extends UserEvent +/* */ { +/* */ public int x; +/* */ +/* */ +/* */ +/* */ public int y; +/* */ +/* */ +/* */ +/* */ +/* */ public MouseEvent(int time, WObject target, int x, int y) +/* */ { +/* 21 */ super(time, null, target); +/* 22 */ this.x = x; +/* 23 */ this.y = y; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 35 */ if (((o instanceof MouseHandler)) && +/* 36 */ (((MouseHandler)o).handle(this))) +/* 37 */ return true; +/* 38 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseExitEvent.java b/NET/worlds/scape/MouseExitEvent.java new file mode 100644 index 0000000..dd93b8f --- /dev/null +++ b/NET/worlds/scape/MouseExitEvent.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseExitEvent +/* */ extends MousePositionEvent +/* */ { +/* */ public MouseExitEvent(int time, WObject target, int x, int y) +/* */ { +/* 18 */ super(time, target, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 30 */ if (((o instanceof MouseExitHandler)) && +/* 31 */ (((MouseExitHandler)o).handle(this))) +/* 32 */ return true; +/* 33 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseExitEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseExitHandler.java b/NET/worlds/scape/MouseExitHandler.java new file mode 100644 index 0000000..6d5da38 --- /dev/null +++ b/NET/worlds/scape/MouseExitHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseExitHandler +{ + public abstract boolean handle(MouseExitEvent paramMouseExitEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseExitHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseHandler.java b/NET/worlds/scape/MouseHandler.java new file mode 100644 index 0000000..0d47822 --- /dev/null +++ b/NET/worlds/scape/MouseHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseHandler +{ + public abstract boolean handle(MouseEvent paramMouseEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseMoveEvent.java b/NET/worlds/scape/MouseMoveEvent.java new file mode 100644 index 0000000..eaff344 --- /dev/null +++ b/NET/worlds/scape/MouseMoveEvent.java @@ -0,0 +1,43 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseMoveEvent +/* */ extends MousePositionEvent +/* */ { +/* */ public MouseMoveEvent(int time, WObject target, int x, int y) +/* */ { +/* 20 */ super(time, target, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 32 */ if (((o instanceof MouseMoveHandler)) && +/* 33 */ (((MouseMoveHandler)o).handle(this))) +/* 34 */ return true; +/* 35 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseMoveEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseMoveHandler.java b/NET/worlds/scape/MouseMoveHandler.java new file mode 100644 index 0000000..d6aaf62 --- /dev/null +++ b/NET/worlds/scape/MouseMoveHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseMoveHandler +{ + public abstract boolean handle(MouseMoveEvent paramMouseMoveEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseMoveHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MousePositionEvent.java b/NET/worlds/scape/MousePositionEvent.java new file mode 100644 index 0000000..aa99a8d --- /dev/null +++ b/NET/worlds/scape/MousePositionEvent.java @@ -0,0 +1,44 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MousePositionEvent +/* */ extends MouseEvent +/* */ { +/* */ public MousePositionEvent(int time, WObject target, int x, int y) +/* */ { +/* 21 */ super(time, target, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 33 */ if (((o instanceof MousePositionHandler)) && +/* 34 */ (((MousePositionHandler)o).handle(this))) +/* 35 */ return true; +/* 36 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MousePositionEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MousePositionHandler.java b/NET/worlds/scape/MousePositionHandler.java new file mode 100644 index 0000000..1d540ae --- /dev/null +++ b/NET/worlds/scape/MousePositionHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MousePositionHandler +{ + public abstract boolean handle(MousePositionEvent paramMousePositionEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MousePositionHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseUpEvent.java b/NET/worlds/scape/MouseUpEvent.java new file mode 100644 index 0000000..1e85825 --- /dev/null +++ b/NET/worlds/scape/MouseUpEvent.java @@ -0,0 +1,49 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MouseUpEvent +/* */ extends MouseButtonEvent +/* */ { +/* */ public MouseUpEvent(int time, WObject target, char key, int x, int y) +/* */ { +/* 21 */ super(time, target, key, x, y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 33 */ if (((o instanceof MouseUpHandler)) && +/* 34 */ (((MouseUpHandler)o).handle(this))) +/* 35 */ return true; +/* 36 */ return super.deliver(o); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 41 */ return "MouseUp" + super.toString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseUpEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MouseUpHandler.java b/NET/worlds/scape/MouseUpHandler.java new file mode 100644 index 0000000..8b31532 --- /dev/null +++ b/NET/worlds/scape/MouseUpHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface MouseUpHandler +{ + public abstract boolean handle(MouseUpEvent paramMouseUpEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MouseUpHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MoveAction.java b/NET/worlds/scape/MoveAction.java new file mode 100644 index 0000000..0d7c61b --- /dev/null +++ b/NET/worlds/scape/MoveAction.java @@ -0,0 +1,622 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MoveAction +/* */ extends Action +/* */ { +/* */ int startTime; +/* 65 */ boolean killOthers = true; +/* */ +/* */ +/* 68 */ boolean killed = false; +/* */ +/* */ +/* 71 */ public int cycleTime = 1000; +/* */ +/* 73 */ public int cycles = 1; +/* 74 */ public boolean loopInfinite = false; +/* */ +/* 76 */ public Point3 startPoint = new Point3(); +/* 77 */ public Point3 startScale = new Point3(1.0F, 1.0F, 1.0F); +/* 78 */ public Point3 startSpin = new Point3(0.0F, 0.0F, -1.0F); +/* */ +/* */ public float startRotation; +/* */ +/* 82 */ public Point3 extentPoint = new Point3(); +/* 83 */ public Point3 extentScale = new Point3(1.0F, 1.0F, 1.0F); +/* 84 */ public Point3 extentSpin = new Point3(0.0F, 0.0F, -1.0F); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float extentRotation; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected Persister activeID; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void noteAddingTo(SuperRoot owner) +/* */ { +/* 106 */ if ((this.startPoint.x == 0.0F) && (this.startPoint.y == 0.0F) && (this.startPoint.z == 0.0F) && +/* 107 */ (this.startScale.x == 1.0F) && (this.startScale.y == 1.0F) && (this.startScale.z == 1.0F) && +/* 108 */ (this.startSpin.x == 0.0F) && (this.startSpin.y == 0.0F) && (this.startSpin.z == -1.0F) && +/* 109 */ (this.startRotation == 0.0F)) { +/* 110 */ updateStored(true); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateStored(boolean start) +/* */ { +/* 120 */ Object owner = getOwner(); +/* 121 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 122 */ return; +/* 123 */ WObject o = (WObject)owner; +/* */ +/* 125 */ if (!start) +/* */ { +/* 127 */ this.extentPoint.copy(o.getPosition()); +/* 128 */ this.extentScale.copy(o.getScale()); +/* 129 */ Point3Temp newSpin = Point3Temp.make(); +/* 130 */ endToExtent(o.getSpin(newSpin), newSpin); +/* */ } +/* */ else +/* */ { +/* 134 */ this.startPoint.copy(o.getPosition()); +/* 135 */ this.startScale.copy(o.getScale()); +/* 136 */ this.startRotation = o.getSpin(this.startSpin); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void endToExtent(float rot, Point3Temp spinAxis) +/* */ { +/* 147 */ this.extentPoint.minus(this.startPoint); +/* 148 */ this.extentScale.dividedBy(this.startScale); +/* */ +/* */ +/* */ +/* 152 */ Transform t = Transform.make(); +/* 153 */ t.spin(spinAxis, rot); +/* 154 */ t.spin(this.startSpin, -this.startRotation); +/* 155 */ rot = t.getSpin(spinAxis); +/* 156 */ t.recycle(); +/* */ +/* */ +/* */ +/* 160 */ if (equivalentSpinAxises(spinAxis, this.extentSpin)) +/* */ { +/* 162 */ int wholeTurns = Math.round((this.extentRotation - rot) / 360.0F); +/* 163 */ this.extentRotation = (rot + wholeTurns * 360); +/* 164 */ } else if (equivalentSpinAxises(spinAxis, this.extentSpin.negate())) +/* */ { +/* 166 */ this.extentSpin.negate(); +/* 167 */ rot = -rot; +/* 168 */ int wholeTurns = Math.round((this.extentRotation - rot) / 360.0F); +/* 169 */ this.extentRotation = (rot + wholeTurns * 360); +/* */ } +/* */ else { +/* 172 */ this.extentSpin.copy(spinAxis); +/* 173 */ this.extentRotation = rot; +/* */ } +/* */ } +/* */ +/* */ private boolean equivalentSpinAxises(Point3Temp a, Point3Temp b) +/* */ { +/* 179 */ return Math.abs(a.x - b.x) + +/* 180 */ Math.abs(a.y - b.y) + +/* 181 */ Math.abs(a.z - b.z) < 0.001F; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void updateOwner(boolean start) +/* */ { +/* 190 */ Object owner = getOwner(); +/* 191 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 192 */ return; +/* 193 */ WObject o = (WObject)owner; +/* */ +/* 195 */ o.makeIdentity(); +/* */ +/* 197 */ if (!start) +/* */ { +/* 199 */ o.spin(this.extentSpin, this.extentRotation); +/* 200 */ o.moveBy(this.extentPoint); +/* 201 */ o.scale(this.extentScale); +/* */ } +/* */ +/* 204 */ o.scale(this.startScale); +/* 205 */ o.spin(this.startSpin, this.startRotation); +/* 206 */ o.moveBy(this.startPoint); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void kill() +/* */ { +/* 217 */ this.killed = true; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean isRunning() +/* */ { +/* 224 */ return this.activeID != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 236 */ Object owner = getOwner(); +/* 237 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 238 */ return null; +/* 239 */ WObject o = (WObject)owner; +/* */ +/* 241 */ if (this.killed) +/* */ { +/* 243 */ this.killed = false; +/* 244 */ this.activeID = null; +/* 245 */ return null; +/* */ } +/* */ +/* */ +/* 249 */ if (seqID == null) +/* */ { +/* */ +/* 252 */ if (this.activeID != null) { +/* 253 */ return this.activeID; +/* */ } +/* 255 */ if (this.killOthers) +/* */ { +/* 257 */ Enumeration acts = o.getActions(); +/* 258 */ while (acts.hasMoreElements()) { +/* 259 */ Action a = (Action)acts.nextElement(); +/* 260 */ if ((a != this) && ((a instanceof MoveAction))) { +/* 261 */ MoveAction ma = (MoveAction)a; +/* 262 */ if (ma.isRunning()) +/* */ { +/* 264 */ ma.kill(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 271 */ this.startTime = Std.getRealTime(); +/* 272 */ this.activeID = new SuperRoot(); +/* 273 */ seqID = this.activeID; +/* */ } +/* */ +/* */ +/* 277 */ if (seqID != this.activeID) { +/* 278 */ return null; +/* */ } +/* 280 */ int currentTime = Std.getRealTime(); +/* 281 */ int cycleNo = (currentTime - this.startTime) / this.cycleTime; +/* */ +/* 283 */ float frameLoc = 1.0F; +/* 284 */ if ((cycleNo >= this.cycles) && (!this.loopInfinite)) { +/* 285 */ this.activeID = null; +/* */ } else { +/* 287 */ frameLoc = (currentTime - this.startTime) % this.cycleTime / this.cycleTime; +/* */ } +/* 289 */ (o instanceof Camera); +/* */ +/* */ +/* */ +/* */ +/* 294 */ if ((o instanceof PosableDrone)) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 301 */ float yaw = -(this.startRotation + this.extentRotation * frameLoc); +/* 302 */ Point3Temp dest = Point3Temp.make(this.extentPoint) +/* 303 */ .times(frameLoc) +/* 304 */ .plus(this.startPoint); +/* 305 */ o.makeIdentity().moveTo(dest).yaw(yaw); +/* */ } else { +/* 307 */ o.makeIdentity(); +/* */ +/* */ +/* */ +/* 311 */ o.spin(this.extentSpin, this.extentRotation * frameLoc); +/* 312 */ o.spin(this.startSpin, this.startRotation); +/* */ +/* 314 */ Point3Temp p = Point3Temp.make( +/* 315 */ (float)Math.pow(this.extentScale.x, frameLoc), +/* 316 */ (float)Math.pow(this.extentScale.y, frameLoc), +/* 317 */ (float)Math.pow(this.extentScale.z, frameLoc)); +/* 318 */ o.scale(p.times(this.startScale)); +/* 319 */ o.moveTo(Point3Temp.make(this.extentPoint) +/* 320 */ .times(frameLoc) +/* 321 */ .plus(this.startPoint)); +/* */ } +/* */ +/* 324 */ return this.activeID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 334 */ Object ret = null; +/* 335 */ switch (index - offset) { +/* */ case 0: +/* 337 */ if (mode == 0) { +/* 338 */ ret = FloatPropertyEditor.make( +/* 339 */ new Property(this, index, "Cycle Time (in seconds)")); +/* 340 */ } else if (mode == 1) { +/* 341 */ ret = new Float(this.cycleTime / 1000.0F); +/* 342 */ } else if (mode == 2) +/* 343 */ this.cycleTime = ((int)(1000.0F * ((Float)value).floatValue())); +/* 344 */ break; +/* */ case 1: +/* 346 */ if (mode == 0) { +/* 347 */ ret = IntegerPropertyEditor.make( +/* 348 */ new Property(this, index, "Cycles")); +/* 349 */ } else if (mode == 1) { +/* 350 */ ret = new Integer(this.cycles); +/* 351 */ } else if (mode == 2) +/* 352 */ this.cycles = ((Integer)value).intValue(); +/* 353 */ break; +/* */ case 2: +/* 355 */ if (mode == 0) { +/* 356 */ ret = IntegerPropertyEditor.make( +/* 357 */ new Property(this, index, +/* 358 */ "Copy Start/End 1/2:Action->Owner 3/4:Owner->Action")); +/* 359 */ } else if (mode == 1) { +/* 360 */ ret = new Integer(0); +/* 361 */ } else if (mode == 2) +/* */ { +/* 363 */ switch (((Integer)value).intValue()) { +/* */ case 1: +/* 365 */ updateOwner(true); break; +/* 366 */ case 2: updateOwner(false); break; +/* 367 */ case 3: updateStored(true); break; +/* 368 */ case 4: updateStored(false); +/* */ } +/* */ } +/* 371 */ break; +/* */ case 3: +/* 373 */ if (mode == 0) { +/* 374 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 375 */ "Translation Extent")); +/* 376 */ } else if (mode == 1) { +/* 377 */ ret = new Point3(this.extentPoint); +/* 378 */ } else if (mode == 2) +/* 379 */ this.extentPoint.copy((Point3)value); +/* 380 */ break; +/* */ case 4: +/* 382 */ if (mode == 0) { +/* 383 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 384 */ "Scale Extent")); +/* 385 */ } else if (mode == 1) { +/* 386 */ ret = new Point3(this.extentScale); +/* 387 */ } else if (mode == 2) +/* 388 */ this.extentScale.copy((Point3)value); +/* 389 */ break; +/* */ case 5: +/* 391 */ if (mode == 0) { +/* 392 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 393 */ "Spin Axis For Extent")); +/* 394 */ } else if (mode == 1) { +/* 395 */ Point3 p = new Point3(this.extentSpin); +/* */ +/* 397 */ p.x = (Math.round(p.x * 10000.0F) / 10000.0F); +/* 398 */ p.y = (Math.round(p.y * 10000.0F) / 10000.0F); +/* 399 */ p.z = (Math.round(p.z * 10000.0F) / 10000.0F); +/* 400 */ ret = p; +/* */ } +/* 402 */ else if (mode == 2) { +/* 403 */ this.extentSpin.copy((Point3)value); } +/* 404 */ break; +/* */ case 6: +/* 406 */ if (mode == 0) { +/* 407 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 408 */ "Extent Rotation Amount")); +/* 409 */ } else if (mode == 1) { +/* 410 */ ret = new Float(this.extentRotation); +/* 411 */ } else if (mode == 2) +/* 412 */ this.extentRotation = ((Float)value).floatValue(); +/* 413 */ break; +/* */ case 7: +/* 415 */ if (mode == 0) { +/* 416 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 417 */ "Start Point")); +/* 418 */ } else if (mode == 1) { +/* 419 */ ret = new Point3(this.startPoint); +/* 420 */ } else if (mode == 2) +/* 421 */ this.startPoint.copy((Point3)value); +/* 422 */ break; +/* */ case 8: +/* 424 */ if (mode == 0) { +/* 425 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 426 */ "Start Scale")); +/* 427 */ } else if (mode == 1) { +/* 428 */ ret = new Point3(this.startScale); +/* 429 */ } else if (mode == 2) +/* 430 */ this.startScale.copy((Point3)value); +/* 431 */ break; +/* */ case 9: +/* 433 */ if (mode == 0) { +/* 434 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 435 */ "Start Spin")); +/* 436 */ } else if (mode == 1) { +/* 437 */ ret = new Point3(this.startSpin); +/* 438 */ } else if (mode == 2) +/* 439 */ this.startSpin.copy((Point3)value); +/* 440 */ break; +/* */ case 10: +/* 442 */ if (mode == 0) { +/* 443 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 444 */ "Start Rotation")); +/* 445 */ } else if (mode == 1) { +/* 446 */ ret = new Float(this.startRotation); +/* 447 */ } else if (mode == 2) +/* 448 */ this.startRotation = ((Float)value).floatValue(); +/* 449 */ break; +/* */ case 11: +/* 451 */ if (mode == 0) { +/* 452 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 453 */ "Kill Other Move Actions"), +/* 454 */ "Let other moves finish", +/* 455 */ "Kill other move actions"); +/* 456 */ } else if (mode == 1) { +/* 457 */ ret = new Boolean(this.killOthers); +/* 458 */ } else if (mode == 2) +/* 459 */ this.killOthers = ((Boolean)value).booleanValue(); +/* 460 */ break; +/* */ case 12: +/* 462 */ if (mode == 0) { +/* 463 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 464 */ "Loop Infinite"), +/* 465 */ "False", +/* 466 */ "True"); +/* 467 */ } else if (mode == 1) { +/* 468 */ ret = new Boolean(this.loopInfinite); +/* 469 */ } else if (mode == 2) +/* 470 */ this.loopInfinite = ((Boolean)value).booleanValue(); +/* 471 */ break; +/* */ default: +/* 473 */ ret = super.properties(index, offset + 13, mode, value); +/* */ } +/* 475 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 480 */ String retVal = super.toString() + +/* 481 */ "[cycleTime " + this.cycleTime / 1000.0F + ", cycles " + this.cycles + ","; +/* 482 */ if (!this.loopInfinite) +/* */ { +/* 484 */ retVal = retVal + " not "; +/* */ } +/* 486 */ retVal = retVal + " Infinite ]"; +/* 487 */ return retVal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 493 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 497 */ s.saveVersion(6, classCookie); +/* 498 */ super.saveState(s); +/* */ +/* 500 */ s.saveBoolean(this.loopInfinite); +/* 501 */ s.saveInt(this.cycleTime); +/* 502 */ s.saveInt(this.cycles); +/* 503 */ s.save(this.extentPoint); +/* 504 */ s.save(this.startPoint); +/* 505 */ s.save(this.extentScale); +/* 506 */ s.save(this.startScale); +/* 507 */ s.save(this.extentSpin); +/* 508 */ s.save(this.startSpin); +/* 509 */ s.saveFloat(this.extentRotation); +/* 510 */ s.saveFloat(this.startRotation); +/* 511 */ s.saveBoolean(this.killOthers); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 516 */ restoreStateMoveActionHelper(r, classCookie); +/* */ } +/* */ +/* */ public void restoreStateMoveActionHelper(Restorer r, Object cookie) +/* */ throws IOException, TooNewException +/* */ { +/* 522 */ switch (r.restoreVersion(cookie)) { +/* */ case 6: +/* 524 */ super.restoreState(r); +/* 525 */ this.loopInfinite = r.restoreBoolean(); +/* 526 */ this.cycleTime = r.restoreInt(); +/* 527 */ this.cycles = r.restoreInt(); +/* */ +/* 529 */ this.extentPoint = ((Point3)r.restore()); +/* 530 */ this.startPoint = ((Point3)r.restore()); +/* 531 */ this.extentScale = ((Point3)r.restore()); +/* 532 */ this.startScale = ((Point3)r.restore()); +/* 533 */ this.extentSpin = ((Point3)r.restore()); +/* 534 */ this.startSpin = ((Point3)r.restore()); +/* */ +/* 536 */ this.extentRotation = r.restoreFloat(); +/* 537 */ this.startRotation = r.restoreFloat(); +/* 538 */ this.killOthers = r.restoreBoolean(); +/* 539 */ break; +/* */ case 5: +/* 541 */ super.restoreState(r); +/* 542 */ this.cycleTime = r.restoreInt(); +/* 543 */ this.cycles = r.restoreInt(); +/* 544 */ this.loopInfinite = (this.cycles == 0); +/* */ +/* 546 */ this.extentPoint = ((Point3)r.restore()); +/* 547 */ this.startPoint = ((Point3)r.restore()); +/* 548 */ this.extentScale = ((Point3)r.restore()); +/* 549 */ this.startScale = ((Point3)r.restore()); +/* 550 */ this.extentSpin = ((Point3)r.restore()); +/* 551 */ this.startSpin = ((Point3)r.restore()); +/* */ +/* 553 */ this.extentRotation = r.restoreFloat(); +/* 554 */ this.startRotation = r.restoreFloat(); +/* 555 */ this.killOthers = r.restoreBoolean(); +/* 556 */ break; +/* */ case 3: +/* */ case 4: +/* 559 */ r.setOldFlag(); +/* 560 */ super.restoreState(r); +/* 561 */ this.cycleTime = r.restoreInt(); +/* 562 */ this.cycles = r.restoreInt(); +/* 563 */ this.loopInfinite = (this.cycles == 0); +/* 564 */ this.extentPoint = ((Point3)r.restore()); +/* 565 */ this.startPoint = ((Point3)r.restore()); +/* 566 */ this.extentScale = ((Point3)r.restore()); +/* 567 */ this.startScale = ((Point3)r.restore()); +/* 568 */ this.extentSpin = ((Point3)r.restore()); +/* 569 */ this.startSpin = ((Point3)r.restore()); +/* */ +/* 571 */ this.extentRotation = r.restoreFloat(); +/* 572 */ this.startRotation = r.restoreFloat(); +/* 573 */ break; +/* */ case 2: +/* 575 */ r.setOldFlag(); +/* 576 */ super.restoreState(r); +/* 577 */ this.cycleTime = r.restoreInt(); +/* 578 */ this.cycles = r.restoreInt(); +/* 579 */ this.loopInfinite = (this.cycles == 0); +/* 580 */ this.extentPoint = ((Point3)r.restore()); +/* 581 */ this.startPoint = ((Point3)r.restore()); +/* 582 */ this.extentScale = ((Point3)r.restore()); +/* 583 */ this.startScale = ((Point3)r.restore()); +/* 584 */ this.extentSpin = ((Point3)r.restore()); +/* 585 */ this.startSpin = ((Point3)r.restore()); +/* */ +/* 587 */ this.extentRotation = r.restoreFloat(); +/* 588 */ this.startRotation = r.restoreFloat(); +/* */ +/* 590 */ r.restoreBoolean(); +/* 591 */ break; +/* */ case 1: +/* 593 */ super.restoreState(r); +/* */ case 0: +/* 595 */ r.setOldFlag(); +/* 596 */ this.cycleTime = ((int)r.restoreFloat()); +/* 597 */ this.cycles = r.restoreInt(); +/* 598 */ this.loopInfinite = (this.cycles == 0); +/* 599 */ this.extentPoint = ((Point3)r.restore()); +/* 600 */ this.startPoint = ((Point3)r.restore()); +/* 601 */ this.extentScale = ((Point3)r.restore()); +/* 602 */ this.startScale = ((Point3)r.restore()); +/* 603 */ this.extentSpin = ((Point3)r.restore()); +/* 604 */ this.startSpin = ((Point3)r.restore()); +/* */ +/* 606 */ this.extentRotation = r.restoreFloat(); +/* 607 */ this.startRotation = r.restoreFloat(); +/* */ +/* 609 */ this.extentPoint.minus(this.startPoint); +/* 610 */ this.extentScale.dividedBy(this.startScale); +/* 611 */ break; +/* */ default: +/* 613 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MoveAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MoveCameraAction.java b/NET/worlds/scape/MoveCameraAction.java new file mode 100644 index 0000000..c6a6391 --- /dev/null +++ b/NET/worlds/scape/MoveCameraAction.java @@ -0,0 +1,127 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MoveCameraAction +/* */ extends MoveAction +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 29 */ Pilot pl = Pilot.getActive(); +/* 30 */ if ((pl instanceof HoloPilot)) +/* */ { +/* 32 */ HoloPilot holo = (HoloPilot)pl; +/* 33 */ holo.releaseCamera(); +/* */ +/* 35 */ Object owner = holo.getCamera(); +/* */ +/* 37 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 38 */ return null; +/* 39 */ WObject o = (WObject)owner; +/* */ +/* 41 */ if (this.killed) +/* */ { +/* 43 */ this.killed = false; +/* 44 */ this.activeID = null; +/* 45 */ holo.reclaimCamera(); +/* 46 */ return null; +/* */ } +/* */ +/* */ +/* 50 */ if (seqID == null) +/* */ { +/* */ +/* 53 */ if (this.activeID != null) { +/* 54 */ return this.activeID; +/* */ } +/* 56 */ if (this.killOthers) +/* */ { +/* 58 */ Enumeration acts = o.getActions(); +/* 59 */ while (acts.hasMoreElements()) { +/* 60 */ Action a = (Action)acts.nextElement(); +/* 61 */ if ((a != this) && ((a instanceof MoveAction))) { +/* 62 */ MoveAction ma = (MoveAction)a; +/* 63 */ if (ma.isRunning()) +/* */ { +/* 65 */ ma.kill(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 72 */ this.startTime = Std.getRealTime(); +/* 73 */ this.activeID = new SuperRoot(); +/* 74 */ seqID = this.activeID; +/* */ } +/* */ +/* */ +/* 78 */ if (seqID != this.activeID) { +/* 79 */ return null; +/* */ } +/* */ +/* 82 */ int currentTime = Std.getRealTime(); +/* 83 */ int cycleNo = (currentTime - this.startTime) / this.cycleTime; +/* */ +/* 85 */ float frameLoc = 1.0F; +/* 86 */ if ((cycleNo >= this.cycles) && (!this.loopInfinite)) +/* */ { +/* 88 */ System.out.println("Killing MoveCameraAction. loopInfinite = " + this.loopInfinite); +/* 89 */ this.activeID = null; +/* */ } +/* */ else { +/* 92 */ frameLoc = (currentTime - this.startTime) % this.cycleTime / +/* 93 */ this.cycleTime; +/* */ } +/* 95 */ o.makeIdentity(); +/* */ +/* */ +/* */ +/* 99 */ o.spin(this.extentSpin, this.extentRotation * frameLoc); +/* 100 */ o.spin(this.startSpin, this.startRotation); +/* */ +/* 102 */ Point3Temp p = Point3Temp.make( +/* 103 */ (float)Math.pow(this.extentScale.x, frameLoc), +/* 104 */ (float)Math.pow(this.extentScale.y, frameLoc), +/* 105 */ (float)Math.pow(this.extentScale.z, frameLoc)); +/* 106 */ o.scale(p.times(this.startScale)); +/* 107 */ o.moveTo(Point3Temp.make(this.extentPoint) +/* 108 */ .times(frameLoc) +/* 109 */ .plus(this.startPoint)); +/* */ +/* */ +/* 112 */ if (this.activeID == null) +/* 113 */ holo.reclaimCamera(); +/* 114 */ return this.activeID; +/* */ } +/* */ +/* */ +/* */ +/* 119 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MoveCameraAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MultiManifestAction.java b/NET/worlds/scape/MultiManifestAction.java new file mode 100644 index 0000000..659947c --- /dev/null +++ b/NET/worlds/scape/MultiManifestAction.java @@ -0,0 +1,144 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.File; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MultiManifestAction +/* */ extends Action +/* */ implements LoadedURLSelf +/* */ { +/* */ private String _directory; +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 31 */ Object ret = null; +/* 32 */ switch (index - offset) { +/* */ case 0: +/* 34 */ if (mode == 0) { +/* 35 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 36 */ "Directory")); +/* 37 */ } else if (mode == 1) { +/* 38 */ if (this._directory == null) +/* 39 */ this._directory = new String(); +/* 40 */ ret = new String(this._directory); +/* 41 */ } else if (mode == 2) { +/* 42 */ this._directory = ((String)value).trim(); +/* */ } +/* 44 */ break; +/* */ default: +/* 46 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 48 */ return ret; +/* */ } +/* */ +/* 51 */ private static Object classCookie = new Object(); +/* */ private String[] _files; +/* */ +/* 54 */ public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie); +/* 55 */ super.saveState(s); +/* 56 */ s.saveString(this._directory); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 60 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 62 */ super.restoreState(r); +/* 63 */ this._directory = r.restoreString(); +/* 64 */ break; +/* */ default: +/* 66 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqId) { +/* 71 */ if (seqId == null) { +/* 72 */ System.out.println("MMAState:starting"); +/* 73 */ this._dir = new File(this._directory); +/* 74 */ this._files = this._dir.list(new ExtensionFilter(".world")); +/* 75 */ this._curFile = 0; +/* */ +/* 77 */ startFile(); +/* */ } +/* */ +/* 80 */ if (this._curFile >= this._files.length) { +/* 81 */ return null; +/* */ } +/* 83 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ private File _dir; +/* */ +/* */ +/* */ private int _curFile; +/* */ +/* */ +/* */ private String _file; +/* */ +/* */ +/* */ public void startFile() +/* */ { +/* 99 */ if (this._curFile >= this._files.length) { +/* 100 */ System.out.println("MMAState:Done"); +/* 101 */ return; +/* */ } +/* */ +/* 104 */ this._file = new File(this._dir, this._files[this._curFile]).getAbsolutePath(); +/* 105 */ System.out.println("MMAState:Loading: " + this._file); +/* 106 */ World.load(URL.make(this._file), this); +/* */ } +/* */ +/* */ public void loadedURLSelf(URLSelf o, URL url, String err) { +/* 110 */ if ((err != null) || (!(o instanceof World))) { +/* 111 */ if (err == null) { +/* 112 */ err = Console.message("No-contain-world"); +/* 113 */ o.decRef(); +/* */ } +/* */ +/* 116 */ Console.println(Console.message("Cant-load-remote") + url + "' "); +/* */ } else { +/* 118 */ World w = (World)o; +/* */ +/* 120 */ String mftname = this._file.substring(0, this._file.lastIndexOf(".world")) + +/* 121 */ ".mft"; +/* 122 */ System.out.println("MMAState:Manifesting: " + mftname); +/* */ try { +/* 124 */ Manifest mft = new Manifest(mftname); +/* 125 */ mft.saveProps(w); +/* 126 */ mft.done(); +/* */ } catch (Exception ex) { +/* 128 */ ex.printStackTrace(System.out); +/* */ } +/* */ +/* 131 */ if (w != Pilot.getActive().getWorld()) +/* 132 */ w.discard(); +/* */ } +/* 134 */ this._curFile += 1; +/* */ +/* 136 */ startFile(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MultiManifestAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MultiMotion.java b/NET/worlds/scape/MultiMotion.java new file mode 100644 index 0000000..05fb1b0 --- /dev/null +++ b/NET/worlds/scape/MultiMotion.java @@ -0,0 +1,698 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Date; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MultiMotion +/* */ extends TriggeredSwitchableBehavior +/* */ implements FrameHandler, Persister, MouseDownHandler, BumpHandler +/* */ { +/* 23 */ protected int motionNumber = 0; +/* 24 */ protected int motionNumberCount = 0; +/* 25 */ protected int motionNumberMax = 100; +/* */ long startMultiMotionTime; +/* 27 */ long totalMultiMotionTime = 0L; +/* */ protected String cycleTime; +/* */ protected float[] cycleTimeArray; +/* */ protected int cycles; +/* */ protected Transform MultiMotionTransform; +/* */ protected String startPoint; +/* */ protected String endPoint; +/* */ protected String deltaPoint; +/* */ protected String startScale; +/* */ protected String endScale; +/* */ protected String deltaScale; +/* */ protected String startSpin; +/* */ protected String endSpin; +/* */ protected Point3[] startPointArray; +/* */ protected Point3[] endPointArray; +/* */ protected Point3[] deltaPointArray; +/* */ protected Point3[] startScaleArray; +/* */ protected Point3[] endScaleArray; +/* */ protected Point3[] deltaScaleArray; +/* */ protected Point3[] startSpinArray; +/* */ protected Point3[] endSpinArray; +/* */ protected String startRotation; +/* */ protected String endRotation; +/* */ protected float[] startRotationArray; +/* */ protected float[] endRotationArray; +/* 52 */ protected boolean MultiMotionTransformInitialized; protected boolean variableInitialized; protected boolean multiMotionEnd = true; +/* */ +/* */ +/* */ public MultiMotion() +/* */ { +/* 57 */ this.cycleTime = new String("1000"); +/* 58 */ this.cycleTimeArray = new float[this.motionNumberMax]; +/* 59 */ this.cycleTimeArray[0] = 1000.0F; +/* 60 */ this.trigger = new String("none"); +/* 61 */ this.externalTriggerTag = new String(""); +/* 62 */ this.cycles = 0; +/* 63 */ this.MultiMotionTransformInitialized = false; +/* 64 */ this.variableInitialized = false; +/* */ +/* 66 */ this.startPointArray = new Point3[this.motionNumberMax]; +/* 67 */ this.endPointArray = new Point3[this.motionNumberMax]; +/* 68 */ this.deltaPointArray = new Point3[this.motionNumberMax]; +/* 69 */ this.startScaleArray = new Point3[this.motionNumberMax]; +/* 70 */ this.endScaleArray = new Point3[this.motionNumberMax]; +/* 71 */ this.deltaScaleArray = new Point3[this.motionNumberMax]; +/* 72 */ this.startSpinArray = new Point3[this.motionNumberMax]; +/* 73 */ this.endSpinArray = new Point3[this.motionNumberMax]; +/* 74 */ for (int i = 0; i < this.motionNumberMax; i++) { +/* 75 */ this.startPointArray[i] = new Point3(); +/* 76 */ this.endPointArray[i] = new Point3(); +/* 77 */ this.deltaPointArray[i] = new Point3(); +/* 78 */ this.startScaleArray[i] = new Point3(); +/* 79 */ this.endScaleArray[i] = new Point3(); +/* 80 */ this.deltaScaleArray[i] = new Point3(); +/* 81 */ this.startSpinArray[i] = new Point3(); +/* 82 */ this.endSpinArray[i] = new Point3(); +/* */ } +/* */ +/* 85 */ this.startRotationArray = new float[this.motionNumberMax]; +/* 86 */ this.endRotationArray = new float[this.motionNumberMax]; +/* */ +/* */ +/* 89 */ startMultiMotion(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void ExternalTrigger(Trigger trigger_source, int sequence_no, int event_no) +/* */ { +/* 96 */ this.trigger_source = trigger_source; +/* 97 */ this.sequence_no = sequence_no; +/* 98 */ this.event_no = event_no; +/* 99 */ startMultiMotion(); +/* */ } +/* */ +/* */ public void startMultiMotion() +/* */ { +/* 104 */ Date timer = new Date(); +/* 105 */ this.startMultiMotionTime = timer.getTime(); +/* 106 */ this.motionNumber = 0; +/* 107 */ this.multiMotionEnd = false; +/* */ } +/* */ +/* */ +/* */ public void setTotalMultiMotionTime() +/* */ { +/* 113 */ this.totalMultiMotionTime = 0L; +/* 114 */ for (int i = 0; i < this.motionNumberCount; i++) +/* */ { +/* 116 */ this.totalMultiMotionTime += +/* 117 */ (int)this.cycleTimeArray[i]; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void parseFloatString(String floatList, float[] floatArray) +/* */ { +/* 126 */ int currentIndex = 0; +/* 127 */ int currentSeparator = 0;int nextSeparator = 0; +/* 128 */ int lastSeparator = floatList.lastIndexOf(" "); +/* */ +/* 130 */ if ((lastSeparator != -1) || (floatList.length() != 0)) +/* */ { +/* */ +/* */ +/* 134 */ if (lastSeparator == -1) +/* */ { +/* 136 */ floatArray[currentIndex] = +/* 137 */ Float.valueOf(floatList).floatValue(); +/* */ } +/* */ else { +/* 140 */ nextSeparator = floatList.indexOf(" "); +/* */ +/* 142 */ floatArray[currentIndex] = +/* 143 */ Float.valueOf(floatList.substring(0, nextSeparator)) +/* 144 */ .floatValue(); +/* 145 */ currentIndex++; +/* */ +/* 147 */ while (nextSeparator != lastSeparator) { +/* 148 */ currentSeparator = nextSeparator; +/* 149 */ nextSeparator = floatList.indexOf(" ", currentSeparator + 1); +/* 150 */ floatArray[currentIndex] = +/* 151 */ Float.valueOf(floatList.substring(currentSeparator + 1, +/* 152 */ nextSeparator)).floatValue(); +/* 153 */ currentIndex++; +/* */ } +/* */ +/* 156 */ floatArray[currentIndex] = +/* 157 */ Float.valueOf(floatList.substring(nextSeparator + 1)) +/* 158 */ .floatValue(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public Point3 StringToPoint3(String Point3String) +/* */ { +/* 167 */ Point3 newPoint3 = new Point3(); +/* 168 */ int currentIndex = 0; +/* */ +/* */ +/* 171 */ newPoint3.x = Float.valueOf( +/* 172 */ Point3String.substring(currentIndex, Point3String.indexOf(",", +/* 173 */ currentIndex))).floatValue(); +/* 174 */ currentIndex = Point3String.indexOf(",", currentIndex) + 1; +/* 175 */ newPoint3.y = Float.valueOf( +/* 176 */ Point3String.substring(currentIndex, Point3String.indexOf(",", +/* 177 */ currentIndex))).floatValue(); +/* 178 */ currentIndex = Point3String.indexOf(",", currentIndex) + 1; +/* 179 */ newPoint3.z = Float.valueOf( +/* 180 */ Point3String.substring(currentIndex, Point3String.length())) +/* 181 */ .floatValue(); +/* */ +/* */ +/* */ +/* 185 */ return newPoint3; +/* */ } +/* */ +/* */ +/* */ public void parsePoint3String(String Point3List, Point3[] Point3Array) +/* */ { +/* 191 */ int currentIndex = 0; +/* 192 */ int currentSeparator = 0;int nextSeparator = 0; +/* 193 */ int lastSeparator = Point3List.lastIndexOf(" "); +/* */ +/* 195 */ if ((lastSeparator != -1) || (Point3List.length() != 0)) +/* */ { +/* */ +/* */ +/* 199 */ if (lastSeparator == -1) +/* */ { +/* 201 */ Point3Array[currentIndex] = StringToPoint3(Point3List); +/* */ } +/* */ else { +/* 204 */ nextSeparator = Point3List.indexOf(" "); +/* */ +/* 206 */ Point3Array[currentIndex] = StringToPoint3(Point3List +/* 207 */ .substring(0, nextSeparator)); +/* 208 */ currentIndex++; +/* */ +/* 210 */ while (nextSeparator != lastSeparator) { +/* 211 */ currentSeparator = nextSeparator; +/* 212 */ nextSeparator = Point3List.indexOf(" ", currentSeparator + 1); +/* 213 */ Point3Array[currentIndex] = +/* 214 */ StringToPoint3(Point3List.substring(currentSeparator + 1, +/* 215 */ nextSeparator)); +/* 216 */ currentIndex++; +/* */ } +/* */ +/* 219 */ Point3Array[currentIndex] = +/* 220 */ StringToPoint3(Point3List.substring(nextSeparator + 1)); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 233 */ if (!this.MultiMotionTransformInitialized) { +/* 234 */ this.MultiMotionTransform = e.target; +/* 235 */ this.MultiMotionTransformInitialized = true; +/* */ } +/* 237 */ if (!this.variableInitialized) { +/* 238 */ this.startPoint = this.MultiMotionTransform.getPosition().toString(); +/* 239 */ this.startPointArray[0].copy(this.MultiMotionTransform.getPosition()); +/* 240 */ this.endPoint = new String(this.startPoint); +/* 241 */ this.endPointArray[0].copy(this.startPointArray[0]); +/* 242 */ this.startScaleArray[0].x = this.MultiMotionTransform.getTotalScale(); +/* 243 */ this.startScaleArray[0].y = this.MultiMotionTransform.getTotalScale(); +/* 244 */ this.startScaleArray[0].z = this.MultiMotionTransform.getTotalScale(); +/* 245 */ this.startScale = this.startScaleArray[0].toString(); +/* 246 */ this.endScaleArray[0].copy(this.startScaleArray[0]); +/* 247 */ this.endScale = this.endScaleArray[0].toString(); +/* */ +/* 249 */ this.startRotation = new Float(this.MultiMotionTransform +/* 250 */ .getSpin(this.startSpinArray[0])).toString(); +/* 251 */ this.startRotationArray[0] = Float.valueOf(this.startRotation).floatValue(); +/* 252 */ this.startSpin = this.startSpinArray[0].toString(); +/* 253 */ this.endRotation = new String("0.0"); +/* 254 */ this.endRotationArray[0] = Float.valueOf(this.endRotation).floatValue(); +/* 255 */ this.endSpinArray[0] = new Point3(); +/* 256 */ this.endSpin = this.endSpinArray[0].toString(); +/* 257 */ this.variableInitialized = true; +/* */ } +/* */ +/* 260 */ if (this.enabled) +/* */ { +/* 262 */ Date timer = new Date(); +/* 263 */ long currentTime = timer.getTime(); +/* */ +/* 265 */ int cycleNo = 0; +/* 266 */ if (this.totalMultiMotionTime > 0L) { +/* 267 */ cycleNo = (int)((-this.startMultiMotionTime + currentTime) / +/* 268 */ this.totalMultiMotionTime); +/* */ } +/* */ +/* */ +/* 272 */ if ((this.totalMultiMotionTime > 0L) && ( +/* 273 */ (cycleNo < this.cycles) || (this.cycles == 0))) { +/* 274 */ long totalTime = 0L; +/* 275 */ int currentCycleTime = (int)((currentTime - +/* 276 */ this.startMultiMotionTime) % this.totalMultiMotionTime); +/* 277 */ int currentMotionTime = 0; +/* 278 */ this.motionNumber = 0; +/* 279 */ while ((this.motionNumber < this.motionNumberCount) && ( +/* 280 */ totalTime <= currentCycleTime)) { +/* 281 */ currentMotionTime = (int)this.cycleTimeArray[this.motionNumber]; +/* 282 */ totalTime += currentMotionTime; +/* 283 */ this.motionNumber += 1; +/* */ } +/* */ +/* 286 */ this.motionNumber -= 1; +/* 287 */ if (totalTime < currentCycleTime) { +/* 288 */ System.out.print("Error in totalMultiMotionTime computation.\n"); +/* */ } +/* */ +/* */ +/* */ +/* 293 */ currentMotionTime = (int)(currentMotionTime - ( +/* 294 */ totalTime - currentCycleTime)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 302 */ float frameLoc = currentMotionTime % +/* 303 */ this.cycleTimeArray[this.motionNumber] / +/* 304 */ this.cycleTimeArray[this.motionNumber]; +/* */ +/* */ +/* */ +/* 308 */ e.receiver.makeIdentity(); +/* 309 */ e.receiver.scale( +/* 310 */ this.startScaleArray[this.motionNumber].x + +/* 311 */ (this.endScaleArray[this.motionNumber].x - +/* 312 */ this.startScaleArray[this.motionNumber].x) * frameLoc, +/* 313 */ this.startScaleArray[this.motionNumber].x + +/* 314 */ (this.endScaleArray[this.motionNumber].x - +/* 315 */ this.startScaleArray[this.motionNumber].x) * frameLoc, +/* 316 */ this.startScaleArray[this.motionNumber].x + +/* 317 */ (this.endScaleArray[this.motionNumber].x - +/* 318 */ this.startScaleArray[this.motionNumber].x) * frameLoc); +/* */ +/* 320 */ e.receiver.moveTo( +/* 321 */ this.startPointArray[this.motionNumber].x + +/* 322 */ (this.endPointArray[this.motionNumber].x - +/* 323 */ this.startPointArray[this.motionNumber].x) * frameLoc, +/* 324 */ this.startPointArray[this.motionNumber].y + +/* 325 */ (this.endPointArray[this.motionNumber].y - +/* 326 */ this.startPointArray[this.motionNumber].y) * frameLoc, +/* 327 */ this.startPointArray[this.motionNumber].z + +/* 328 */ (this.endPointArray[this.motionNumber].z - +/* 329 */ this.startPointArray[this.motionNumber].z) * frameLoc); +/* */ +/* 331 */ e.receiver.spin(this.startSpinArray[this.motionNumber], +/* 332 */ this.startRotationArray[this.motionNumber]); +/* 333 */ e.receiver.spin(this.endSpinArray[this.motionNumber], +/* 334 */ this.endRotationArray[this.motionNumber] * frameLoc); +/* */ +/* */ +/* */ } +/* 338 */ else if ((cycleNo >= this.cycles) && (this.cycles != 0) && +/* 339 */ (!this.multiMotionEnd)) { +/* 340 */ this.multiMotionEnd = true; +/* 341 */ if (this.trigger_source != null) +/* */ { +/* 343 */ this.trigger_source.registerFinishedTriggerTag( +/* 344 */ this.sequence_no, this.event_no); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 350 */ return true; +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 355 */ if ((this.enabled) && +/* 356 */ (this.trigger.equals("click"))) { +/* 357 */ startMultiMotion(); +/* */ } +/* */ +/* 360 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 365 */ if ((this.enabled) && +/* 366 */ (this.trigger.equals("bump"))) { +/* 367 */ startMultiMotion(); +/* */ } +/* */ +/* 370 */ return true; +/* */ } +/* */ +/* */ +/* */ public void startTransform() +/* */ { +/* 376 */ if (this.MultiMotionTransform != null) { +/* 377 */ this.MultiMotionTransform.makeIdentity(); +/* 378 */ this.MultiMotionTransform.scale(this.startScaleArray[this.motionNumber].x, +/* 379 */ this.startScaleArray[this.motionNumber].x, +/* 380 */ this.startScaleArray[this.motionNumber].x); +/* 381 */ this.MultiMotionTransform.moveTo(this.startPointArray[this.motionNumber].x, +/* 382 */ this.startPointArray[this.motionNumber].y, +/* 383 */ this.startPointArray[this.motionNumber].z); +/* */ +/* 385 */ this.MultiMotionTransform.spin(this.startSpinArray[this.motionNumber], +/* 386 */ this.startRotationArray[this.motionNumber]); +/* */ } +/* */ } +/* */ +/* */ public void endTransform() +/* */ { +/* 392 */ if (this.MultiMotionTransform != null) { +/* 393 */ this.MultiMotionTransform.makeIdentity(); +/* 394 */ this.MultiMotionTransform.scale(this.endScaleArray[this.motionNumber].x, +/* 395 */ this.endScaleArray[this.motionNumber].x, +/* 396 */ this.endScaleArray[this.motionNumber].x); +/* 397 */ this.MultiMotionTransform.moveTo(this.endPointArray[this.motionNumber].x, +/* 398 */ this.endPointArray[this.motionNumber].y, +/* 399 */ this.endPointArray[this.motionNumber].z); +/* */ +/* 401 */ this.MultiMotionTransform.spin(this.startSpinArray[this.motionNumber], +/* 402 */ this.startRotationArray[this.motionNumber]); +/* 403 */ this.MultiMotionTransform.spin(this.endSpinArray[this.motionNumber], +/* 404 */ this.endRotationArray[this.motionNumber]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 415 */ Object ret = null; +/* 416 */ switch (index - offset) { +/* */ case 0: +/* 418 */ if (mode == 0) +/* 419 */ ret = new ClassProperty(this, index, "MultiMotion"); +/* 420 */ break; +/* */ case 1: +/* 422 */ if (mode == 0) { +/* 423 */ ret = IntegerPropertyEditor.make( +/* 424 */ new Property(this, index, "Number of Motions")); +/* 425 */ } else if (mode == 1) { +/* 426 */ ret = new Integer(this.motionNumberCount); +/* 427 */ } else if (mode == 2) { +/* 428 */ this.motionNumberCount = ((Integer)value).intValue(); +/* 429 */ setTotalMultiMotionTime(); +/* */ } +/* 431 */ break; +/* */ case 2: +/* 433 */ if (mode == 0) { +/* 434 */ ret = IntegerPropertyEditor.make( +/* 435 */ new Property(this, index, "Cycles")); +/* 436 */ } else if (mode == 1) { +/* 437 */ ret = new Integer(this.cycles); +/* 438 */ } else if (mode == 2) +/* 439 */ this.cycles = ((Integer)value).intValue(); +/* 440 */ break; +/* */ case 3: +/* 442 */ if (mode == 0) { +/* 443 */ ret = StringPropertyEditor.make( +/* 444 */ new Property(this, index, "Trigger")); +/* 445 */ } else if (mode == 1) { +/* 446 */ ret = new String(this.trigger); +/* 447 */ } else if (mode == 2) { +/* 448 */ this.trigger = ((String)value).toString().trim(); +/* 449 */ if (this.trigger.equals("external")) { +/* 450 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 451 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 452 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ } +/* 455 */ break; +/* */ case 4: +/* 457 */ if (mode == 0) { +/* 458 */ ret = StringPropertyEditor.make( +/* 459 */ new Property(this, index, "External Trigger Tag")); +/* 460 */ } else if (mode == 1) { +/* 461 */ ret = new String(this.externalTriggerTag); +/* 462 */ } else if (mode == 2) { +/* 463 */ this.externalTriggerTag = ((String)value).toString().trim(); +/* */ } +/* 465 */ break; +/* */ case 5: +/* 467 */ if (mode == 0) { +/* 468 */ ret = StringPropertyEditor.make( +/* 469 */ new Property(this, index, "Cycle Time")); +/* 470 */ } else if (mode == 1) { +/* 471 */ ret = new String(this.cycleTime); +/* 472 */ } else if (mode == 2) { +/* 473 */ this.cycleTime = ((String)value); +/* 474 */ parseFloatString(this.cycleTime, this.cycleTimeArray); +/* 475 */ setTotalMultiMotionTime(); +/* */ } +/* 477 */ break; +/* */ case 6: +/* 479 */ if (mode == 0) { +/* 480 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 481 */ "End Point")); +/* 482 */ } else if (mode == 1) { +/* 483 */ ret = new String(this.endPoint); +/* 484 */ endTransform(); +/* */ } +/* 486 */ else if (mode == 2) { +/* 487 */ this.endPoint = ((String)value); +/* 488 */ parsePoint3String(this.endPoint, this.endPointArray); +/* 489 */ endTransform(); +/* */ } +/* 491 */ break; +/* */ case 7: +/* 493 */ if (mode == 0) { +/* 494 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 495 */ "Start Point")); +/* 496 */ } else if (mode == 1) { +/* 497 */ ret = new String(this.startPoint); +/* 498 */ startTransform(); +/* */ +/* */ } +/* 501 */ else if (mode == 2) { +/* 502 */ this.startPoint = ((String)value); +/* 503 */ parsePoint3String(this.startPoint, this.startPointArray); +/* 504 */ startTransform(); +/* */ } +/* 506 */ break; +/* */ case 8: +/* 508 */ if (mode == 0) { +/* 509 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 510 */ "End Scale")); +/* 511 */ } else if (mode == 1) { +/* 512 */ ret = new String(this.endScale); +/* 513 */ endTransform(); +/* */ } +/* 515 */ else if (mode == 2) { +/* 516 */ this.endScale = ((String)value); +/* 517 */ parsePoint3String(this.endScale, this.endScaleArray); +/* 518 */ endTransform(); +/* */ } +/* 520 */ break; +/* */ case 9: +/* 522 */ if (mode == 0) { +/* 523 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 524 */ "Start Scale")); +/* 525 */ } else if (mode == 1) { +/* 526 */ ret = new String(this.startScale); +/* 527 */ startTransform(); +/* */ +/* */ } +/* 530 */ else if (mode == 2) { +/* 531 */ this.startScale = ((String)value); +/* 532 */ parsePoint3String(this.startScale, this.startScaleArray); +/* 533 */ startTransform(); +/* */ } +/* 535 */ break; +/* */ case 10: +/* 537 */ if (mode == 0) { +/* 538 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 539 */ "End Spin (Relative)")); +/* 540 */ } else if (mode == 1) { +/* 541 */ ret = new String(this.endSpin); +/* 542 */ endTransform(); +/* */ } +/* 544 */ else if (mode == 2) { +/* 545 */ this.endSpin = ((String)value); +/* 546 */ parsePoint3String(this.endSpin, this.endSpinArray); +/* 547 */ endTransform(); +/* */ } +/* 549 */ break; +/* */ case 11: +/* 551 */ if (mode == 0) { +/* 552 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 553 */ "Start Spin")); +/* 554 */ } else if (mode == 1) { +/* 555 */ ret = new String(this.startSpin); +/* 556 */ startTransform(); +/* */ } +/* 558 */ else if (mode == 2) { +/* 559 */ this.startSpin = ((String)value); +/* 560 */ parsePoint3String(this.startSpin, this.startSpinArray); +/* 561 */ startTransform(); +/* */ } +/* 563 */ break; +/* */ case 12: +/* 565 */ if (mode == 0) { +/* 566 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 567 */ "End Rotation (Relative)")); +/* 568 */ } else if (mode == 1) { +/* 569 */ ret = new String(this.endRotation); +/* 570 */ endTransform(); +/* */ } +/* 572 */ else if (mode == 2) { +/* 573 */ this.endRotation = ((String)value); +/* 574 */ parseFloatString(this.endRotation, this.endRotationArray); +/* */ +/* 576 */ endTransform(); +/* */ } +/* 578 */ break; +/* */ case 13: +/* 580 */ if (mode == 0) { +/* 581 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 582 */ "Start Rotation")); +/* 583 */ } else if (mode == 1) { +/* 584 */ ret = new String(this.startRotation); +/* 585 */ startTransform(); +/* */ } +/* 587 */ else if (mode == 2) { +/* 588 */ this.startRotation = ((String)value); +/* 589 */ parseFloatString(this.startRotation, this.startRotationArray); +/* 590 */ startTransform(); +/* */ } +/* 592 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ default: +/* 598 */ ret = super.properties(index, offset + 14, mode, value); +/* */ } +/* 600 */ if (mode == 2) +/* */ { +/* 602 */ if (this.trigger.equals("none")) { +/* 603 */ startMultiMotion(); +/* */ } +/* */ } +/* 606 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 611 */ return +/* */ +/* 613 */ "Multimotion: cycleTime " + this.cycleTime + ", cycles " + this.cycles + ", enabled " + this.enabled + ", trigger " + this.trigger + ", externalTriggerTag " + this.externalTriggerTag; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 619 */ s.saveInt(this.motionNumberCount); +/* 620 */ s.saveInt(this.cycles); +/* 621 */ s.saveString(this.trigger); +/* 622 */ s.saveString(this.externalTriggerTag); +/* 623 */ s.saveString(this.cycleTime); +/* 624 */ s.saveString(this.endPoint); +/* 625 */ s.saveString(this.startPoint); +/* 626 */ s.saveString(this.endScale); +/* 627 */ s.saveString(this.startScale); +/* 628 */ s.saveString(this.endSpin); +/* 629 */ s.saveString(this.startSpin); +/* 630 */ s.saveString(this.endRotation); +/* 631 */ s.saveString(this.startRotation); +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 638 */ this.motionNumberCount = r.restoreInt(); +/* 639 */ this.cycles = r.restoreInt(); +/* 640 */ this.trigger = r.restoreString(); +/* 641 */ if (this.trigger.equals("external")) { +/* 642 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 643 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 644 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ +/* 647 */ this.externalTriggerTag = r.restoreString(); +/* 648 */ this.cycleTime = r.restoreString(); +/* 649 */ parseFloatString(this.cycleTime, this.cycleTimeArray); +/* 650 */ this.endPoint = r.restoreString(); +/* 651 */ parsePoint3String(this.endPoint, this.endPointArray); +/* 652 */ setTotalMultiMotionTime(); +/* 653 */ this.startPoint = r.restoreString(); +/* 654 */ parsePoint3String(this.startPoint, this.startPointArray); +/* 655 */ this.endScale = r.restoreString(); +/* 656 */ parsePoint3String(this.endScale, this.endScaleArray); +/* 657 */ this.startScale = r.restoreString(); +/* 658 */ parsePoint3String(this.startScale, this.startScaleArray); +/* 659 */ this.endSpin = r.restoreString(); +/* 660 */ parsePoint3String(this.endSpin, this.endSpinArray); +/* 661 */ this.startSpin = r.restoreString(); +/* 662 */ parsePoint3String(this.startSpin, this.startSpinArray); +/* 663 */ this.endRotation = r.restoreString(); +/* 664 */ parseFloatString(this.endRotation, this.endRotationArray); +/* 665 */ this.startRotation = r.restoreString(); +/* 666 */ parseFloatString(this.startRotation, this.startRotationArray); +/* 667 */ this.variableInitialized = true; +/* 668 */ if (!this.trigger.equals("none")) { +/* 669 */ this.startMultiMotionTime = ((int)-(this.cycles * this.cycleTimeArray[this.motionNumber])); +/* */ } else { +/* 671 */ startMultiMotion(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 680 */ String name = getName(); +/* 681 */ String arg1 = name == null ? "" : name; +/* 682 */ SuperRoot owner = getOwner(); +/* 683 */ String oname = ""; +/* 684 */ if (owner != null) { +/* 685 */ oname = owner.getName(); +/* */ } +/* 687 */ String arg2 = oname == null ? "" : oname; +/* 688 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 689 */ Console.println(MessageFormat.format( +/* 690 */ Console.message("MultiMotion-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MultiMotion.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MusicManager.java b/NET/worlds/scape/MusicManager.java new file mode 100644 index 0000000..c50ae78 --- /dev/null +++ b/NET/worlds/scape/MusicManager.java @@ -0,0 +1,560 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.network.URL; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MusicManager +/* */ implements MainCallback, DialogReceiver +/* */ { +/* 55 */ private static Hashtable managers = new Hashtable(); +/* */ private static MusicManagerDialog dialog; +/* */ private static boolean registered; +/* */ private static URL lastWorldURL; +/* */ private static boolean showDialog; +/* */ private static MusicManager curManager; +/* 61 */ private static String lastRoomName = ""; +/* */ +/* */ private static int lastCDTrack; +/* */ private static URL lastMIDIFile; +/* */ private String name; +/* 66 */ private Hashtable tracks = new Hashtable(); +/* 67 */ private Hashtable rooms = new Hashtable(); +/* */ private World world; +/* */ private String fileName; +/* */ private boolean maybeMusicChange; +/* */ +/* */ public static void showDialog() +/* */ { +/* 74 */ if (dialog == null) +/* 75 */ showDialog = true; +/* */ } +/* */ +/* */ public MusicManager() { +/* 79 */ if (!registered) { +/* 80 */ Main.register(this); +/* 81 */ registered = true; +/* 82 */ curManager = this; +/* */ } +/* */ } +/* */ +/* */ private MusicManager(World world, URL url) { +/* 87 */ this.world = world; +/* 88 */ this.name = world.getName(); +/* 89 */ String file = url.unalias().toLowerCase(); +/* 90 */ int index = file.lastIndexOf(".world"); +/* 91 */ if (index != -1) { +/* 92 */ this.fileName = (url.unalias().substring(0, index) + ".music"); +/* 93 */ load(); +/* */ } +/* */ } +/* */ +/* */ public World getWorld() { +/* 98 */ return this.world; +/* */ } +/* */ +/* */ public String getName() { +/* 102 */ return this.name; +/* */ } +/* */ +/* */ public String getFileName() { +/* 106 */ return this.fileName; +/* */ } +/* */ +/* */ public Hashtable getMusic() { +/* 110 */ return this.tracks; +/* */ } +/* */ +/* */ public MusicTrack getMusic(String name) { +/* 114 */ return (MusicTrack)this.tracks.get(name); +/* */ } +/* */ +/* */ public Hashtable getRooms() { +/* 118 */ return this.rooms; +/* */ } +/* */ +/* */ public MusicRoom getRoom(String name) { +/* 122 */ return (MusicRoom)this.rooms.get(name); +/* */ } +/* */ +/* */ public synchronized void maybeChangedMusic() { +/* 126 */ this.maybeMusicChange = true; +/* */ } +/* */ +/* */ /* Error */ +/* */ public void save() +/* */ { +/* */ // Byte code: +/* */ // 0: aconst_null +/* */ // 1: astore_1 +/* */ // 2: new 153 java/io/PrintStream +/* */ // 5: dup +/* */ // 6: new 155 java/io/FileOutputStream +/* */ // 9: dup +/* */ // 10: aload_0 +/* */ // 11: getfield 122 NET/worlds/scape/MusicManager:fileName Ljava/lang/String; +/* */ // 14: invokespecial 157 java/io/FileOutputStream: (Ljava/lang/String;)V +/* */ // 17: invokespecial 158 java/io/PrintStream: (Ljava/io/OutputStream;)V +/* */ // 20: astore_1 +/* */ // 21: aload_0 +/* */ // 22: getfield 58 NET/worlds/scape/MusicManager:tracks Ljava/util/Hashtable; +/* */ // 25: invokestatic 161 NET/worlds/core/Sort:sortKeys (Ljava/util/Hashtable;)[Ljava/lang/String; +/* */ // 28: astore_2 +/* */ // 29: iconst_0 +/* */ // 30: istore_3 +/* */ // 31: goto +100 -> 131 +/* */ // 34: aload_0 +/* */ // 35: getfield 58 NET/worlds/scape/MusicManager:tracks Ljava/util/Hashtable; +/* */ // 38: aload_2 +/* */ // 39: iload_3 +/* */ // 40: aaload +/* */ // 41: invokevirtual 137 java/util/Hashtable:get (Ljava/lang/Object;)Ljava/lang/Object; +/* */ // 44: checkcast 141 NET/worlds/scape/MusicTrack +/* */ // 47: astore 4 +/* */ // 49: aload 4 +/* */ // 51: invokevirtual 167 NET/worlds/scape/MusicTrack:getMIDIFileName ()Ljava/lang/String; +/* */ // 54: astore 5 +/* */ // 56: aload 5 +/* */ // 58: invokevirtual 170 java/lang/String:length ()I +/* */ // 61: ifne +7 -> 68 +/* */ // 64: ldc -82 +/* */ // 66: astore 5 +/* */ // 68: aload_1 +/* */ // 69: new 100 java/lang/StringBuilder +/* */ // 72: dup +/* */ // 73: ldc -80 +/* */ // 75: invokespecial 110 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 78: aload 4 +/* */ // 80: invokevirtual 178 NET/worlds/scape/MusicTrack:getName ()Ljava/lang/String; +/* */ // 83: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 86: ldc -77 +/* */ // 88: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 91: aload 4 +/* */ // 93: invokevirtual 181 NET/worlds/scape/MusicTrack:getVirtTrackNumber ()I +/* */ // 96: invokevirtual 184 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; +/* */ // 99: ldc -77 +/* */ // 101: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 104: aload 5 +/* */ // 106: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 109: ldc -77 +/* */ // 111: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 114: aload 4 +/* */ // 116: invokevirtual 187 NET/worlds/scape/MusicTrack:getLooping ()Z +/* */ // 119: invokevirtual 191 java/lang/StringBuilder:append (Z)Ljava/lang/StringBuilder; +/* */ // 122: invokevirtual 119 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 125: invokevirtual 194 java/io/PrintStream:println (Ljava/lang/String;)V +/* */ // 128: iinc 3 1 +/* */ // 131: iload_3 +/* */ // 132: aload_2 +/* */ // 133: arraylength +/* */ // 134: if_icmplt -100 -> 34 +/* */ // 137: aload_0 +/* */ // 138: getfield 60 NET/worlds/scape/MusicManager:rooms Ljava/util/Hashtable; +/* */ // 141: invokestatic 161 NET/worlds/core/Sort:sortKeys (Ljava/util/Hashtable;)[Ljava/lang/String; +/* */ // 144: astore_2 +/* */ // 145: iconst_0 +/* */ // 146: istore_3 +/* */ // 147: goto +58 -> 205 +/* */ // 150: aload_0 +/* */ // 151: getfield 60 NET/worlds/scape/MusicManager:rooms Ljava/util/Hashtable; +/* */ // 154: aload_2 +/* */ // 155: iload_3 +/* */ // 156: aaload +/* */ // 157: invokevirtual 137 java/util/Hashtable:get (Ljava/lang/Object;)Ljava/lang/Object; +/* */ // 160: checkcast 147 NET/worlds/scape/MusicRoom +/* */ // 163: astore 4 +/* */ // 165: aload_1 +/* */ // 166: new 100 java/lang/StringBuilder +/* */ // 169: dup +/* */ // 170: ldc -59 +/* */ // 172: invokespecial 110 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 175: aload 4 +/* */ // 177: invokevirtual 199 NET/worlds/scape/MusicRoom:getRoomName ()Ljava/lang/String; +/* */ // 180: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 183: ldc -77 +/* */ // 185: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 188: aload 4 +/* */ // 190: invokevirtual 202 NET/worlds/scape/MusicRoom:getMusicName ()Ljava/lang/String; +/* */ // 193: invokevirtual 115 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 196: invokevirtual 119 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 199: invokevirtual 194 java/io/PrintStream:println (Ljava/lang/String;)V +/* */ // 202: iinc 3 1 +/* */ // 205: iload_3 +/* */ // 206: aload_2 +/* */ // 207: arraylength +/* */ // 208: if_icmplt -58 -> 150 +/* */ // 211: goto +28 -> 239 +/* */ // 214: astore_2 +/* */ // 215: aload_1 +/* */ // 216: ifnull +31 -> 247 +/* */ // 219: aload_1 +/* */ // 220: invokevirtual 205 java/io/PrintStream:close ()V +/* */ // 223: goto +24 -> 247 +/* */ // 226: astore 6 +/* */ // 228: aload_1 +/* */ // 229: ifnull +7 -> 236 +/* */ // 232: aload_1 +/* */ // 233: invokevirtual 205 java/io/PrintStream:close ()V +/* */ // 236: aload 6 +/* */ // 238: athrow +/* */ // 239: aload_1 +/* */ // 240: ifnull +7 -> 247 +/* */ // 243: aload_1 +/* */ // 244: invokevirtual 205 java/io/PrintStream:close ()V +/* */ // 247: return +/* */ // Line number table: +/* */ // Java source line #130 -> byte code offset #0 +/* */ // Java source line #132 -> byte code offset #2 +/* */ // Java source line #134 -> byte code offset #21 +/* */ // Java source line #135 -> byte code offset #29 +/* */ // Java source line #136 -> byte code offset #34 +/* */ // Java source line #137 -> byte code offset #49 +/* */ // Java source line #138 -> byte code offset #56 +/* */ // Java source line #139 -> byte code offset #64 +/* */ // Java source line #140 -> byte code offset #68 +/* */ // Java source line #141 -> byte code offset #91 +/* */ // Java source line #142 -> byte code offset #114 +/* */ // Java source line #140 -> byte code offset #125 +/* */ // Java source line #135 -> byte code offset #128 +/* */ // Java source line #144 -> byte code offset #137 +/* */ // Java source line #145 -> byte code offset #145 +/* */ // Java source line #146 -> byte code offset #150 +/* */ // Java source line #147 -> byte code offset #165 +/* */ // Java source line #145 -> byte code offset #202 +/* */ // Java source line #149 -> byte code offset #211 +/* */ // Java source line #151 -> byte code offset #215 +/* */ // Java source line #152 -> byte code offset #219 +/* */ // Java source line #150 -> byte code offset #226 +/* */ // Java source line #151 -> byte code offset #228 +/* */ // Java source line #152 -> byte code offset #232 +/* */ // Java source line #153 -> byte code offset #236 +/* */ // Java source line #151 -> byte code offset #239 +/* */ // Java source line #152 -> byte code offset #243 +/* */ // Java source line #154 -> byte code offset #247 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 248 0 this MusicManager +/* */ // 1 243 1 out java.io.PrintStream +/* */ // 28 179 2 keys String[] +/* */ // 214 1 2 localException Exception +/* */ // 30 102 3 i int +/* */ // 146 60 3 i int +/* */ // 47 68 4 m MusicTrack +/* */ // 163 26 4 r MusicRoom +/* */ // 54 51 5 midiName String +/* */ // 226 11 6 localObject Object +/* */ // Exception table: +/* */ // from to target type +/* */ // 2 211 214 java/lang/Exception +/* */ // 2 215 226 finally +/* */ } +/* */ +/* */ /* Error */ +/* */ private void load() +/* */ { +/* */ // Byte code: +/* */ // 0: aload_0 +/* */ // 1: getfield 58 NET/worlds/scape/MusicManager:tracks Ljava/util/Hashtable; +/* */ // 4: invokevirtual 223 java/util/Hashtable:clear ()V +/* */ // 7: aload_0 +/* */ // 8: getfield 60 NET/worlds/scape/MusicManager:rooms Ljava/util/Hashtable; +/* */ // 11: invokevirtual 223 java/util/Hashtable:clear ()V +/* */ // 14: aconst_null +/* */ // 15: astore_1 +/* */ // 16: aconst_null +/* */ // 17: astore_2 +/* */ // 18: new 226 java/io/DataInputStream +/* */ // 21: dup +/* */ // 22: new 228 java/io/FileInputStream +/* */ // 25: dup +/* */ // 26: aload_0 +/* */ // 27: getfield 122 NET/worlds/scape/MusicManager:fileName Ljava/lang/String; +/* */ // 30: invokespecial 230 java/io/FileInputStream: (Ljava/lang/String;)V +/* */ // 33: invokespecial 231 java/io/DataInputStream: (Ljava/io/InputStream;)V +/* */ // 36: astore_1 +/* */ // 37: goto +125 -> 162 +/* */ // 40: new 234 java/util/StringTokenizer +/* */ // 43: dup +/* */ // 44: aload_2 +/* */ // 45: ldc -77 +/* */ // 47: invokespecial 236 java/util/StringTokenizer: (Ljava/lang/String;Ljava/lang/String;)V +/* */ // 50: astore_3 +/* */ // 51: aload_3 +/* */ // 52: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 55: astore 4 +/* */ // 57: aload 4 +/* */ // 59: ldc -14 +/* */ // 61: invokevirtual 244 java/lang/String:equals (Ljava/lang/Object;)Z +/* */ // 64: ifeq +55 -> 119 +/* */ // 67: new 141 NET/worlds/scape/MusicTrack +/* */ // 70: dup +/* */ // 71: aload_3 +/* */ // 72: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 75: aload_3 +/* */ // 76: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 79: invokestatic 248 java/lang/Integer:parseInt (Ljava/lang/String;)I +/* */ // 82: aload_3 +/* */ // 83: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 86: aload_3 +/* */ // 87: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 90: invokestatic 253 java/lang/Boolean:valueOf (Ljava/lang/String;)Ljava/lang/Boolean; +/* */ // 93: invokevirtual 258 java/lang/Boolean:booleanValue ()Z +/* */ // 96: invokespecial 261 NET/worlds/scape/MusicTrack: (Ljava/lang/String;ILjava/lang/String;Z)V +/* */ // 99: astore 5 +/* */ // 101: aload_0 +/* */ // 102: getfield 58 NET/worlds/scape/MusicManager:tracks Ljava/util/Hashtable; +/* */ // 105: aload 5 +/* */ // 107: invokevirtual 178 NET/worlds/scape/MusicTrack:getName ()Ljava/lang/String; +/* */ // 110: aload 5 +/* */ // 112: invokevirtual 264 java/util/Hashtable:put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; +/* */ // 115: pop +/* */ // 116: goto +46 -> 162 +/* */ // 119: aload 4 +/* */ // 121: ldc_w 268 +/* */ // 124: invokevirtual 244 java/lang/String:equals (Ljava/lang/Object;)Z +/* */ // 127: ifeq +35 -> 162 +/* */ // 130: new 147 NET/worlds/scape/MusicRoom +/* */ // 133: dup +/* */ // 134: aload_3 +/* */ // 135: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 138: aload_3 +/* */ // 139: invokevirtual 239 java/util/StringTokenizer:nextToken ()Ljava/lang/String; +/* */ // 142: invokespecial 270 NET/worlds/scape/MusicRoom: (Ljava/lang/String;Ljava/lang/String;)V +/* */ // 145: astore 5 +/* */ // 147: aload_0 +/* */ // 148: getfield 60 NET/worlds/scape/MusicManager:rooms Ljava/util/Hashtable; +/* */ // 151: aload 5 +/* */ // 153: invokevirtual 199 NET/worlds/scape/MusicRoom:getRoomName ()Ljava/lang/String; +/* */ // 156: aload 5 +/* */ // 158: invokevirtual 264 java/util/Hashtable:put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; +/* */ // 161: pop +/* */ // 162: aload_1 +/* */ // 163: invokevirtual 271 java/io/DataInputStream:readLine ()Ljava/lang/String; +/* */ // 166: dup +/* */ // 167: astore_2 +/* */ // 168: ifnonnull -128 -> 40 +/* */ // 171: goto +38 -> 209 +/* */ // 174: astore_3 +/* */ // 175: aload_1 +/* */ // 176: ifnull +46 -> 222 +/* */ // 179: aload_1 +/* */ // 180: invokevirtual 274 java/io/DataInputStream:close ()V +/* */ // 183: goto +39 -> 222 +/* */ // 186: astore 7 +/* */ // 188: goto +34 -> 222 +/* */ // 191: astore 6 +/* */ // 193: aload_1 +/* */ // 194: ifnull +12 -> 206 +/* */ // 197: aload_1 +/* */ // 198: invokevirtual 274 java/io/DataInputStream:close ()V +/* */ // 201: goto +5 -> 206 +/* */ // 204: astore 7 +/* */ // 206: aload 6 +/* */ // 208: athrow +/* */ // 209: aload_1 +/* */ // 210: ifnull +12 -> 222 +/* */ // 213: aload_1 +/* */ // 214: invokevirtual 274 java/io/DataInputStream:close ()V +/* */ // 217: goto +5 -> 222 +/* */ // 220: astore 7 +/* */ // 222: return +/* */ // Line number table: +/* */ // Java source line #157 -> byte code offset #0 +/* */ // Java source line #158 -> byte code offset #7 +/* */ // Java source line #159 -> byte code offset #14 +/* */ // Java source line #160 -> byte code offset #16 +/* */ // Java source line #162 -> byte code offset #18 +/* */ // Java source line #163 -> byte code offset #37 +/* */ // Java source line #164 -> byte code offset #40 +/* */ // Java source line #165 -> byte code offset #51 +/* */ // Java source line #166 -> byte code offset #57 +/* */ // Java source line #167 -> byte code offset #67 +/* */ // Java source line #168 -> byte code offset #75 +/* */ // Java source line #169 -> byte code offset #86 +/* */ // Java source line #167 -> byte code offset #96 +/* */ // Java source line #170 -> byte code offset #101 +/* */ // Java source line #171 -> byte code offset #116 +/* */ // Java source line #172 -> byte code offset #130 +/* */ // Java source line #173 -> byte code offset #138 +/* */ // Java source line #172 -> byte code offset #142 +/* */ // Java source line #174 -> byte code offset #147 +/* */ // Java source line #163 -> byte code offset #162 +/* */ // Java source line #177 -> byte code offset #171 +/* */ // Java source line #180 -> byte code offset #175 +/* */ // Java source line #181 -> byte code offset #179 +/* */ // Java source line #182 -> byte code offset #183 +/* */ // Java source line #178 -> byte code offset #191 +/* */ // Java source line #180 -> byte code offset #193 +/* */ // Java source line #181 -> byte code offset #197 +/* */ // Java source line #182 -> byte code offset #201 +/* */ // Java source line #184 -> byte code offset #206 +/* */ // Java source line #180 -> byte code offset #209 +/* */ // Java source line #181 -> byte code offset #213 +/* */ // Java source line #182 -> byte code offset #217 +/* */ // Java source line #185 -> byte code offset #222 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 223 0 this MusicManager +/* */ // 15 199 1 in java.io.DataInputStream +/* */ // 17 151 2 line String +/* */ // 50 89 3 tok java.util.StringTokenizer +/* */ // 174 1 3 localException Exception +/* */ // 55 65 4 type String +/* */ // 99 12 5 track MusicTrack +/* */ // 145 12 5 room MusicRoom +/* */ // 191 16 6 localObject Object +/* */ // 186 1 7 localIOException java.io.IOException +/* */ // 204 1 7 localIOException1 java.io.IOException +/* */ // 220 1 7 localIOException2 java.io.IOException +/* */ // Exception table: +/* */ // from to target type +/* */ // 18 171 174 java/lang/Exception +/* */ // 175 183 186 java/io/IOException +/* */ // 18 175 191 finally +/* */ // 193 201 204 java/io/IOException +/* */ // 209 217 220 java/io/IOException +/* */ } +/* */ +/* */ public void mainCallback() +/* */ { +/* 188 */ Pilot pilot = Pilot.getActive(); +/* 189 */ if (pilot != null) { +/* 190 */ World world = pilot.getWorld(); +/* 191 */ boolean worldChange = false; +/* 192 */ String newRoomName = ""; +/* 193 */ if (world != null) { +/* 194 */ URL url = world.getSourceURL(); +/* 195 */ if (!url.equals(lastWorldURL)) { +/* 196 */ MusicManager manager = (MusicManager)managers.get(url); +/* 197 */ if (manager == null) { +/* 198 */ manager = new MusicManager(world, url); +/* 199 */ managers.put(url, manager); +/* */ } +/* 201 */ lastWorldURL = url; +/* 202 */ curManager = manager; +/* 203 */ worldChange = true; +/* */ } +/* 205 */ Room room = pilot.getRoom(); +/* 206 */ if (room != null) { +/* 207 */ String roomName = room.getName(); +/* 208 */ if (roomName != null) +/* 209 */ newRoomName = roomName; +/* */ } +/* */ } else { +/* 212 */ lastWorldURL = null; } +/* 213 */ synchronized (this) { +/* 214 */ if ((worldChange) || (!newRoomName.equals(lastRoomName)) || +/* 215 */ (curManager.maybeMusicChange)) { +/* 216 */ curManager.maybeMusicChange = false; +/* 217 */ lastRoomName = newRoomName; +/* 218 */ MusicRoom mr = curManager.getRoom(lastRoomName); +/* 219 */ CDAudio cd = CDAudio.get(); +/* 220 */ boolean found = false; +/* 221 */ if (mr != null) { +/* 222 */ MusicTrack mt = curManager.getMusic(mr.getMusicName()); +/* 223 */ if (mt != null) { +/* 224 */ found = true; +/* 225 */ int track = mt.getVirtTrackNumber(); +/* 226 */ boolean changed = false; +/* 227 */ if (track != cd.getCDTrack()) { +/* 228 */ cd.setCDTrack(lastCDTrack = track); +/* 229 */ changed = true; +/* */ } +/* 231 */ String name = mt.getMIDIFileName(); +/* */ URL midiPath; +/* 233 */ URL midiPath; if (name.length() != 0) { +/* 234 */ midiPath = URL.make(world.getSourceURL(), +/* 235 */ mt.getMIDIFileName()); +/* */ } else +/* 237 */ midiPath = cd.getDefaultMIDIFile(); +/* 238 */ if (!midiPath.equals(cd.getMIDIFile())) { +/* 239 */ cd.setMIDIFile(lastMIDIFile = midiPath); +/* 240 */ changed = true; +/* */ } +/* 242 */ if (changed) +/* 243 */ cd.change(mt.getLooping()); +/* */ } +/* */ } +/* 246 */ if (!found) { +/* 247 */ if (((lastCDTrack != 0) && (cd.getCDTrack() == lastCDTrack)) || ( +/* 248 */ (lastMIDIFile != null) && +/* 249 */ (lastMIDIFile.equals(cd.getMIDIFile())))) { +/* 250 */ cd.setCDTrack(0); +/* 251 */ cd.setMIDIFile(cd.getDefaultMIDIFile()); +/* 252 */ cd.stop(); +/* */ } +/* 254 */ lastCDTrack = 0; +/* 255 */ lastMIDIFile = null; +/* */ } +/* */ } +/* */ } +/* */ } +/* 260 */ lastWorldURL = null; +/* 261 */ if ((lastWorldURL != null) && (dialog == null) && (showDialog)) { +/* 262 */ showDialog = false; +/* 263 */ dialog = new MusicManagerDialog( +/* 264 */ (MusicManager)managers.get(lastWorldURL)); +/* */ } +/* */ } +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) { +/* 269 */ if (confirmed) { +/* 270 */ save(); +/* */ } else { +/* 272 */ load(); +/* 273 */ maybeChangedMusic(); +/* */ } +/* 275 */ dialog = null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MusicManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MusicManagerDialog.java b/NET/worlds/scape/MusicManagerDialog.java new file mode 100644 index 0000000..c06def2 --- /dev/null +++ b/NET/worlds/scape/MusicManagerDialog.java @@ -0,0 +1,646 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.ConfirmDialog; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.Sort; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.BorderLayout; +/* */ import java.awt.Button; +/* */ import java.awt.Checkbox; +/* */ import java.awt.CheckboxGroup; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.List; +/* */ import java.awt.Panel; +/* */ import java.awt.Point; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MusicManagerDialog +/* */ extends PolledDialog +/* */ implements DialogReceiver +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private MusicManager manager; +/* 285 */ private String lastRoom = ""; +/* 286 */ private Label curRoom = new Label(); +/* 287 */ private Label curMusic = new Label(); +/* 288 */ private Button assignCurButton = new Button( +/* 289 */ Console.message("Assign-Current")); +/* 290 */ private Checkbox autoAssign = new Checkbox(Console.message("Auto-assign")); +/* 291 */ private CheckboxGroup group = new CheckboxGroup(); +/* 292 */ private Checkbox musicBox = new Checkbox(Console.message("Music"), this.group, +/* 293 */ true); +/* 294 */ private Checkbox aRoomsBox = new Checkbox( +/* 295 */ Console.message("Assigned-rooms"), this.group, false); +/* 296 */ private Checkbox uRoomsBox = new Checkbox( +/* 297 */ Console.message("Unassigned-rooms"), this.group, false); +/* 298 */ private List list = new List(10); +/* 299 */ private Button editButton = new Button(Console.message("Edit")); +/* 300 */ private Button addButton = new Button(Console.message("Add")); +/* 301 */ private Button delButton = new Button(Console.message("Delete")); +/* 302 */ private Button assignButton = new Button(Console.message("Assign")); +/* 303 */ private Button saveButton = new Button(Console.message("Save-Changes")); +/* 304 */ private Button okButton = new Button(Console.message("OK")); +/* 305 */ private Button cancelButton = new Button(Console.message("Cancel")); +/* */ private PolledDialog subDialog; +/* */ private Vector allRooms; +/* */ private boolean madeChanges; +/* */ private boolean confirmingState; +/* 310 */ static Point lastWindowLocation = null; +/* 311 */ private static Font font = new Font(Console.message("MenuFont"), +/* 312 */ 0, 12); +/* 313 */ private static Font bfont = new Font(Console.message("ButtonFont"), +/* 314 */ 0, 12); +/* */ +/* 316 */ private static final String title = Console.message("Music-Manager"); +/* */ +/* */ public MusicManagerDialog(MusicManager manager) { +/* 319 */ super(Console.getFrame(), manager, title + manager.getName(), false); +/* 320 */ setAlignment(2); +/* 321 */ this.manager = manager; +/* 322 */ ready(); +/* */ } +/* */ +/* */ public MusicManager getManager() { +/* 326 */ return this.manager; +/* */ } +/* */ +/* */ public String getCurRoom() { +/* 330 */ return this.curRoom.getText(); +/* */ } +/* */ +/* */ public Vector getAllRooms() { +/* 334 */ return this.allRooms; +/* */ } +/* */ +/* */ protected void build() { +/* 338 */ GridBagLayout gbag = new GridBagLayout(); +/* 339 */ setLayout(gbag); +/* 340 */ GridBagConstraints c = new GridBagConstraints(); +/* 341 */ Panel p = new Panel(new BorderLayout()); +/* 342 */ this.musicBox.setFont(font); +/* 343 */ this.aRoomsBox.setFont(font); +/* 344 */ this.uRoomsBox.setFont(font); +/* 345 */ p.add("West", this.musicBox); +/* 346 */ p.add("Center", this.aRoomsBox); +/* 347 */ p.add("East", this.uRoomsBox); +/* 348 */ c.weightx = 0.0D; +/* 349 */ c.gridwidth = 0; +/* 350 */ add(gbag, p, c); +/* 351 */ c.fill = 1; +/* 352 */ c.weightx = 1.0D; +/* 353 */ c.weighty = 1.0D; +/* 354 */ c.gridwidth = 2; +/* 355 */ c.gridheight = 6; +/* 356 */ this.list.setFont(font); +/* 357 */ add(gbag, this.list, c); +/* 358 */ c.fill = 2; +/* 359 */ c.weightx = 0.0D; +/* 360 */ c.weighty = 0.0D; +/* 361 */ c.gridwidth = 0; +/* 362 */ c.gridheight = 1; +/* 363 */ this.assignButton.setFont(bfont); +/* 364 */ this.editButton.setFont(bfont); +/* 365 */ this.addButton.setFont(bfont); +/* 366 */ this.delButton.setFont(bfont); +/* 367 */ add(gbag, this.assignButton, c); +/* 368 */ add(gbag, this.editButton, c); +/* 369 */ add(gbag, this.addButton, c); +/* 370 */ add(gbag, this.delButton, c); +/* 371 */ for (int i = 0; i < 2; i++) +/* 372 */ add(gbag, new Label(""), c); +/* 373 */ c.gridwidth = 1; +/* 374 */ c.fill = 0; +/* 375 */ Label cRoom = new Label(Console.message("Current-room")); +/* 376 */ cRoom.setFont(font); +/* 377 */ add(gbag, cRoom, c); +/* 378 */ c.gridwidth = 0; +/* 379 */ c.weightx = 1.0D; +/* 380 */ c.fill = 2; +/* 381 */ this.curRoom.setFont(font); +/* 382 */ add(gbag, this.curRoom, c); +/* 383 */ c.gridwidth = 1; +/* 384 */ c.weightx = 0.0D; +/* 385 */ Label aMusic = new Label(Console.message("Assigned-music")); +/* 386 */ aMusic.setFont(font); +/* 387 */ add(gbag, aMusic, c); +/* 388 */ c.fill = 0; +/* 389 */ c.gridwidth = 0; +/* 390 */ c.fill = 2; +/* 391 */ c.weightx = 1.0D; +/* 392 */ this.curMusic.setFont(font); +/* 393 */ add(gbag, this.curMusic, c); +/* 394 */ c.weightx = 0.0D; +/* 395 */ c.weighty = 0.0D; +/* 396 */ c.gridwidth = 1; +/* 397 */ c.fill = 0; +/* 398 */ this.assignCurButton.setFont(bfont); +/* 399 */ this.autoAssign.setFont(bfont); +/* 400 */ add(gbag, this.assignCurButton, c); +/* 401 */ c.gridwidth = 0; +/* 402 */ add(gbag, this.autoAssign, c); +/* 403 */ p = new Panel(); +/* 404 */ p.setFont(bfont); +/* 405 */ p.add(this.saveButton); +/* 406 */ p.add(this.okButton); +/* 407 */ p.add(this.cancelButton); +/* 408 */ c.fill = 2; +/* 409 */ add(gbag, p, c); +/* 410 */ rebuildList(false); +/* 411 */ buildAllRoomsList(); +/* */ } +/* */ +/* */ protected boolean done(boolean confirmed) { +/* 415 */ lastWindowLocation = getLocation(); +/* 416 */ return super.done(confirmed); +/* */ } +/* */ +/* */ protected void initialSize(int width, int height) { +/* 420 */ if (lastWindowLocation == null) { +/* 421 */ super.initialSize(width, height); +/* */ } else { +/* 423 */ setLocation(lastWindowLocation); +/* 424 */ setSize(width, height); +/* */ } +/* */ } +/* */ +/* */ private void buildAllRoomsList() { +/* 429 */ this.allRooms = new Vector(); +/* 430 */ Pilot pilot = Pilot.getActive(); +/* 431 */ if (pilot != null) { +/* 432 */ World world = pilot.getWorld(); +/* 433 */ if (world != null) { +/* 434 */ Enumeration rooms = world.getRooms(); +/* 435 */ while (rooms.hasMoreElements()) +/* 436 */ this.allRooms.addElement(((Room)rooms.nextElement()).getName()); +/* */ } +/* */ } +/* */ } +/* */ +/* */ private void rebuildList(boolean changed) { +/* 442 */ boolean enable = !this.uRoomsBox.getState(); +/* 443 */ this.assignButton.setEnabled(!this.musicBox.getState()); +/* 444 */ this.editButton.setEnabled(enable); +/* 445 */ this.addButton.setEnabled(enable); +/* 446 */ this.delButton.setEnabled(enable); +/* 447 */ this.list.removeAll(); +/* 448 */ if (this.musicBox.getState()) { +/* 449 */ Sort.sortInto(this.list, this.manager.getMusic()); +/* 450 */ } else if (this.aRoomsBox.getState()) { +/* 451 */ String[] content = Sort.sortKeys(this.manager.getRooms()); +/* 452 */ for (int i = 0; i < content.length; i++) { +/* 453 */ String name = content[i]; +/* 454 */ this.list.add(name + " (" + this.manager.getRoom(name).getMusicName() + +/* 455 */ ")"); +/* */ } +/* */ } else { +/* 458 */ Enumeration e = this.allRooms.elements(); +/* 459 */ Hashtable aRooms = this.manager.getRooms(); +/* 460 */ Vector v = new Vector(); +/* 461 */ while (e.hasMoreElements()) { +/* 462 */ String name = (String)e.nextElement(); +/* 463 */ if (!aRooms.containsKey(name)) +/* 464 */ v.addElement(name); +/* */ } +/* 466 */ Sort.sortInto(this.list, v); +/* */ } +/* 468 */ if (changed) { +/* 469 */ this.madeChanges = true; +/* 470 */ this.manager.maybeChangedMusic(); +/* */ } +/* */ } +/* */ +/* */ protected synchronized void activeCallback() { +/* 475 */ Pilot pilot = Pilot.getActive(); +/* 476 */ if (pilot != null) { +/* 477 */ World world = pilot.getWorld(); +/* 478 */ if (world != null) +/* */ { +/* 480 */ if (world.getSourceURL().equals(this.manager.getWorld().getSourceURL())) { +/* 481 */ Room room = pilot.getRoom(); +/* 482 */ if (room != null) { +/* 483 */ String name = room.getName(); +/* 484 */ if (!name.equals(this.lastRoom)) { +/* 485 */ this.lastRoom = name; +/* 486 */ this.curRoom.setText(name); +/* 487 */ MusicRoom mr = this.manager.getRoom(name); +/* 488 */ if (mr != null) { +/* 489 */ this.curMusic.setText(mr.getMusicName()); +/* */ } else { +/* 491 */ this.curMusic.setText(""); +/* 492 */ if ((this.autoAssign.getState()) && (this.subDialog == null)) +/* 493 */ this.subDialog = new EditRoomDialog(this, null, name); +/* */ } +/* */ } +/* 496 */ return; +/* */ } +/* */ } } +/* */ } +/* 500 */ this.curRoom.setText(""); +/* 501 */ this.curMusic.setText(""); +/* */ } +/* */ +/* */ @Deprecated +/* */ public synchronized boolean action(Event event, Object what) { +/* 506 */ Object target = event.target; +/* 507 */ String selected = this.list.getSelectedItem(); +/* 508 */ boolean isMusic = this.musicBox.getState(); +/* 509 */ boolean haveMusic = this.manager.getMusic().size() != 0; +/* 510 */ if ((isMusic) && (target == this.editButton) && (selected != null)) { +/* 511 */ this.subDialog = new EditMusicDialog(this, this.manager.getMusic(selected)); +/* 512 */ } else if ((isMusic) && (target == this.addButton)) { +/* 513 */ this.subDialog = new EditMusicDialog(this, null); +/* 514 */ } else if ((isMusic) && (target == this.delButton) && (selected != null)) { +/* 515 */ if (!isMusicInUse(selected)) { +/* 516 */ this.manager.getMusic().remove(selected); +/* 517 */ if (this.manager.getMusic().size() == 0) +/* 518 */ this.autoAssign.setState(false); +/* 519 */ rebuildList(true); +/* */ } else { +/* 521 */ cantChangeMusic(); +/* 522 */ } } else if ((!isMusic) && (target == this.editButton) && (selected != null) && +/* 523 */ (haveMusic)) { +/* 524 */ selected = selected.substring(0, selected.lastIndexOf('(') - 1); +/* 525 */ this.subDialog = new EditRoomDialog(this, this.manager.getRoom(selected), +/* 526 */ selected); +/* 527 */ } else if ((!isMusic) && (target == this.addButton)) { +/* 528 */ if (haveMusic) { +/* 529 */ this.subDialog = new EditRoomDialog(this, null, getCurRoom()); +/* */ } else +/* 531 */ needMusic(); +/* 532 */ } else if ((!isMusic) && (target == this.delButton) && (selected != null)) { +/* 533 */ selected = selected.substring(0, selected.lastIndexOf('(') - 1); +/* 534 */ this.manager.getRooms().remove(selected); +/* 535 */ rebuildList(true); +/* 536 */ } else if (target == this.saveButton) { +/* 537 */ this.manager.save(); +/* 538 */ this.madeChanges = false; +/* 539 */ } else if (target == this.okButton) { +/* 540 */ if (this.madeChanges) { +/* 541 */ this.confirmingState = true; +/* 542 */ new ConfirmDialog(this, this, Console.message("Save-Changes2"), +/* 543 */ Console.message("sure-save")); +/* */ } else { +/* 545 */ done(false); +/* 546 */ } } else if (target == this.cancelButton) { +/* 547 */ if (this.madeChanges) { +/* 548 */ this.confirmingState = false; +/* 549 */ new ConfirmDialog(this, this, +/* 550 */ Console.message("Abandon-Changes"), +/* 551 */ Console.message("sure-cancel")); +/* */ } else { +/* 553 */ done(false); +/* 554 */ } } else if ((target == this.musicBox) || (target == this.aRoomsBox) || +/* 555 */ (target == this.uRoomsBox)) { +/* 556 */ rebuildList(false); +/* 557 */ } else if (((target == this.assignButton) && (selected != null)) || +/* 558 */ (target == this.assignCurButton)) { +/* 559 */ if (haveMusic) { +/* 560 */ String selection = target == this.assignButton ? selected : this.lastRoom; +/* 561 */ this.subDialog = new EditRoomDialog(this, +/* 562 */ this.manager.getRoom(selection), selection); +/* */ } else { +/* 564 */ needMusic(); +/* 565 */ } } else if ((target == this.autoAssign) && (this.autoAssign.getState())) { +/* 566 */ if (haveMusic) { +/* 567 */ if (this.manager.getRoom(this.lastRoom) == null) +/* 568 */ this.subDialog = new EditRoomDialog(this, null, this.lastRoom); +/* */ } else { +/* 570 */ this.autoAssign.setState(false); +/* 571 */ needMusic(); +/* */ } +/* */ } else { +/* 574 */ return false; } +/* 575 */ return true; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) { +/* 580 */ if ((event.key == 1004) || (event.key == 1005) || +/* 581 */ (event.key == 1006) || (event.key == 1007)) { +/* 582 */ Console.getFrame().requestFocus(); +/* 583 */ return true; +/* */ } +/* 585 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ private void needMusic() { +/* 589 */ this.subDialog = new OkCancelDialog(this, this, +/* 590 */ Console.message("Need-Music"), null, Console.message("OK"), +/* 591 */ Console.message("at-least-one"), true); +/* */ } +/* */ +/* */ private boolean isMusicInUse(String name) { +/* 595 */ Enumeration e = this.manager.getRooms().elements(); +/* 596 */ while (e.hasMoreElements()) +/* 597 */ if (name.equals(((MusicRoom)e.nextElement()).getMusicName())) +/* 598 */ return true; +/* 599 */ return false; +/* */ } +/* */ +/* */ private void cantChangeMusic() { +/* 603 */ this.subDialog = new OkCancelDialog(this, this, +/* 604 */ Console.message("Cant-Change"), null, Console.message("OK"), +/* 605 */ Console.message("may-not-delete"), true); +/* */ } +/* */ +/* */ public synchronized void dialogDone(Object who, boolean confirmed) { +/* 609 */ boolean showCantChange = false; +/* 610 */ if (confirmed) { +/* 611 */ if ((who instanceof EditMusicDialog)) { +/* 612 */ EditMusicDialog em = (EditMusicDialog)who; +/* 613 */ MusicTrack music = em.getMusicTrack(); +/* 614 */ String oldName = em.getOldName(); +/* 615 */ if ((oldName != null) && (!oldName.equals(music.getName())) && +/* 616 */ (isMusicInUse(oldName))) { +/* 617 */ music.setName(oldName); +/* 618 */ showCantChange = true; +/* */ } +/* 620 */ this.manager.getMusic().put(music.getName(), music); +/* 621 */ rebuildList(true); +/* 622 */ } else if ((who instanceof EditRoomDialog)) { +/* 623 */ EditRoomDialog er = (EditRoomDialog)who; +/* 624 */ MusicRoom room = er.getMusicRoom(); +/* 625 */ this.manager.getRooms().put(room.getRoomName(), room); +/* 626 */ rebuildList(true); +/* 627 */ } else if ((who instanceof ConfirmDialog)) { +/* 628 */ done(this.confirmingState); } +/* 629 */ if (this.lastRoom != null) { +/* 630 */ MusicRoom mr = this.manager.getRoom(this.lastRoom); +/* 631 */ if (mr != null) +/* 632 */ this.curMusic.setText(mr.getMusicName()); +/* */ } +/* */ } +/* 635 */ this.subDialog = null; +/* 636 */ if (showCantChange) { +/* 637 */ cantChangeMusic(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MusicManagerDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MusicRoom.java b/NET/worlds/scape/MusicRoom.java new file mode 100644 index 0000000..3714a06 --- /dev/null +++ b/NET/worlds/scape/MusicRoom.java @@ -0,0 +1,984 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MusicRoom +/* */ { +/* */ private String roomName; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String musicName; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public MusicRoom(String roomName, String musicName) +/* */ { +/* 955 */ this.roomName = roomName; +/* 956 */ this.musicName = musicName; +/* */ } +/* */ +/* */ public String getRoomName() { +/* 960 */ return this.roomName; +/* */ } +/* */ +/* */ public void setRoomName(String roomName) { +/* 964 */ this.roomName = roomName; +/* */ } +/* */ +/* */ public String getMusicName() { +/* 968 */ return this.musicName; +/* */ } +/* */ +/* */ public void setMusicName(String musicName) { +/* 972 */ this.musicName = musicName; +/* */ } +/* */ +/* */ public String toString() { +/* 976 */ return this.roomName; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MusicRoom.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MusicTrack.java b/NET/worlds/scape/MusicTrack.java new file mode 100644 index 0000000..58042c6 --- /dev/null +++ b/NET/worlds/scape/MusicTrack.java @@ -0,0 +1,954 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MusicTrack +/* */ { +/* */ private String name; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int vTrack; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String midi; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean loop; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public MusicTrack(String name, int vTrack, String midi, boolean loop) +/* */ { +/* 907 */ this.name = name; +/* 908 */ this.vTrack = vTrack; +/* 909 */ this.midi = (midi.equals("-") ? "" : midi); +/* 910 */ this.loop = loop; +/* */ } +/* */ +/* */ public String getName() { +/* 914 */ return this.name; +/* */ } +/* */ +/* */ public void setName(String name) { +/* 918 */ this.name = name; +/* */ } +/* */ +/* */ public int getVirtTrackNumber() { +/* 922 */ return this.vTrack; +/* */ } +/* */ +/* */ public void setVirtTrackNumber(int vTrack) { +/* 926 */ this.vTrack = vTrack; +/* */ } +/* */ +/* */ public String getMIDIFileName() { +/* 930 */ return this.midi; +/* */ } +/* */ +/* */ public void setMIDIFileName(String midi) { +/* 934 */ this.midi = midi; +/* */ } +/* */ +/* */ public boolean getLooping() { +/* 938 */ return this.loop; +/* */ } +/* */ +/* */ public void setLooping(boolean loop) { +/* 942 */ this.loop = loop; +/* */ } +/* */ +/* */ public String toString() { +/* 946 */ return this.name; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MusicTrack.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MutedDrone.java b/NET/worlds/scape/MutedDrone.java new file mode 100644 index 0000000..3be1f3a --- /dev/null +++ b/NET/worlds/scape/MutedDrone.java @@ -0,0 +1,82 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class MutedDrone +/* */ extends Drone +/* */ { +/* */ public MutedDrone(ObjID objID, WorldServer serv, URL url) +/* */ { +/* 31 */ super(objID, serv); +/* 32 */ setSourceURL(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public MutedDrone() {} +/* */ +/* */ +/* */ +/* */ public Drone setAvatarNow(URL url) +/* */ { +/* 44 */ if (shouldBeMuted()) +/* */ { +/* 46 */ setSourceURL(url); +/* 47 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 53 */ return super.setAvatarNow(url); +/* */ } +/* */ +/* */ +/* */ +/* 58 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 61 */ s.saveVersion(1, classCookie); +/* 62 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 67 */ int vers = r.restoreVersion(classCookie); +/* 68 */ switch (vers) { +/* */ case 1: +/* 70 */ super.restoreState(r); +/* 71 */ break; +/* */ default: +/* 73 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MutedDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/MyButton.java b/NET/worlds/scape/MyButton.java new file mode 100644 index 0000000..60d4f73 --- /dev/null +++ b/NET/worlds/scape/MyButton.java @@ -0,0 +1,50 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Button; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class MyButton +/* */ extends Button +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ int numParamsXYZ; +/* */ int numParamsN; +/* */ +/* */ MyButton(String text, int numParamsXYZ, int numParamsN) +/* */ { +/* 40 */ super(text); +/* 41 */ this.numParamsXYZ = numParamsXYZ; +/* 42 */ this.numParamsN = numParamsN; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\MyButton.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NamedPortal.java b/NET/worlds/scape/NamedPortal.java new file mode 100644 index 0000000..4c055f3 --- /dev/null +++ b/NET/worlds/scape/NamedPortal.java @@ -0,0 +1,83 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class NamedPortal +/* */ implements Persister +/* */ { +/* 33 */ private static Object classCookie = new Object(); +/* */ +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 41 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 49 */ switch (r.restoreVersion(classCookie)) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ case 0: +/* 57 */ r.setOldFlag(); +/* 58 */ Portal p = new Portal(); +/* 59 */ r.replace(this, p); +/* 60 */ p.restoreState(r); +/* 61 */ String name = r.restoreString(); +/* 62 */ p.setName(name); +/* 63 */ break; +/* */ default: +/* 65 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 75 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NamedPortal.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NametagDrone.java b/NET/worlds/scape/NametagDrone.java new file mode 100644 index 0000000..f7e60ac --- /dev/null +++ b/NET/worlds/scape/NametagDrone.java @@ -0,0 +1,101 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class NametagDrone +/* */ extends Drone +/* */ { +/* */ public void loadInit() {} +/* */ +/* */ public void setName(String v) +/* */ { +/* 44 */ super.setName(v); +/* */ +/* */ +/* 47 */ SuperRoot nametag = SuperRoot.nameSearch(getContents(), "nametag"); +/* 48 */ if ((nametag == null) || (!(nametag instanceof Hologram))) +/* 49 */ return; +/* 50 */ Hologram oldtag = (Hologram)nametag; +/* */ +/* */ +/* */ +/* 54 */ String name = getLongID(); +/* */ +/* 56 */ Texture[] tagText = new Texture[1]; +/* 57 */ tagText[0] = new StringTexture(name, Console.message("TextureFont"), +/* 58 */ 48, Color.black, Color.white); +/* */ +/* */ +/* 61 */ oldtag.detach(); +/* 62 */ Hologram newtag = new Hologram(tagText); +/* 63 */ newtag.post(oldtag); +/* 64 */ newtag.setScale(name.length() * 10, +/* 65 */ 1.0F, +/* 66 */ 10.0F); +/* 67 */ newtag.setVisible(true); +/* 68 */ newtag.setBumpable(false); +/* 69 */ newtag.setLocalShadowed(false); +/* 70 */ newtag.setShadowedLocally(true); +/* 71 */ add(newtag); +/* */ } +/* */ +/* */ +/* */ +/* 76 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 80 */ s.saveVersion(0, classCookie); +/* 81 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 86 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 88 */ super.restoreState(r); +/* 89 */ break; +/* */ +/* */ default: +/* 92 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NametagDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NoSuchPropertyException.java b/NET/worlds/scape/NoSuchPropertyException.java new file mode 100644 index 0000000..b857adc --- /dev/null +++ b/NET/worlds/scape/NoSuchPropertyException.java @@ -0,0 +1,13 @@ +package NET.worlds.scape; + +public class NoSuchPropertyException + extends Exception +{ + private static final long serialVersionUID = 1L; +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NoSuchPropertyException.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NonPersister.java b/NET/worlds/scape/NonPersister.java new file mode 100644 index 0000000..79778cb --- /dev/null +++ b/NET/worlds/scape/NonPersister.java @@ -0,0 +1,9 @@ +package NET.worlds.scape; + +public abstract interface NonPersister {} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NonPersister.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NotifyScriptAction.java b/NET/worlds/scape/NotifyScriptAction.java new file mode 100644 index 0000000..db2a7d8 --- /dev/null +++ b/NET/worlds/scape/NotifyScriptAction.java @@ -0,0 +1,79 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class NotifyScriptAction +/* */ extends Action +/* */ { +/* 13 */ private String message = "NotifyScriptAction"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setMessage(String m) +/* */ { +/* 21 */ this.message = m; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqId) +/* */ { +/* 26 */ WorldScriptManager.getInstance().action(this.message); +/* 27 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 36 */ Object ret = null; +/* 37 */ switch (index - offset) { +/* */ case 0: +/* 39 */ if (mode == 0) { +/* 40 */ ret = StringPropertyEditor.make( +/* 41 */ new Property(this, index, "Message")); +/* 42 */ } else if (mode == 1) { +/* 43 */ ret = new String(this.message); +/* 44 */ } else if (mode == 2) +/* 45 */ this.message = ((String)value); +/* 46 */ break; +/* */ default: +/* 48 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 50 */ return ret; +/* */ } +/* */ +/* 53 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 57 */ s.saveVersion(1, classCookie); +/* 58 */ super.saveState(s); +/* 59 */ s.saveString(this.message); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 64 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 66 */ super.restoreState(r); +/* 67 */ this.message = r.restoreString(); +/* 68 */ break; +/* */ default: +/* 70 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NotifyScriptAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/NumberAttribute.java b/NET/worlds/scape/NumberAttribute.java new file mode 100644 index 0000000..51e30a9 --- /dev/null +++ b/NET/worlds/scape/NumberAttribute.java @@ -0,0 +1,120 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class NumberAttribute +/* */ extends Attribute +/* */ { +/* */ public NumberAttribute(int attrID) +/* */ { +/* 23 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 31 */ float value = 0.0F; +/* */ +/* */ +/* */ +/* */ public NumberAttribute() {} +/* */ +/* */ +/* */ public void set(float x) +/* */ { +/* 40 */ this.value = x; +/* */ +/* 42 */ noteChange(); +/* */ } +/* */ +/* */ public float get() +/* */ { +/* 47 */ return this.value; +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) +/* */ throws IOException +/* */ { +/* 53 */ s.writeFloat(this.value); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 58 */ this.value = ds.readFloat(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 68 */ Object ret = null; +/* 69 */ switch (index - offset) { +/* */ case 0: +/* 71 */ if (mode == 0) { +/* 72 */ ret = FloatPropertyEditor.make( +/* 73 */ new Property(this, index, "value")); +/* 74 */ } else if (mode == 1) { +/* 75 */ ret = new Float(get()); +/* 76 */ } else if (mode == 2) +/* 77 */ set(((Float)value).floatValue()); +/* 78 */ break; +/* */ default: +/* 80 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 82 */ return ret; +/* */ } +/* */ +/* */ +/* 86 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 90 */ s.saveVersion(0, classCookie); +/* 91 */ super.saveState(s); +/* */ +/* 93 */ s.saveFloat(this.value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 98 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 100 */ super.restoreState(r); +/* 101 */ this.value = r.restoreFloat(); +/* 102 */ break; +/* */ default: +/* 104 */ throw new TooNewException(); +/* */ } +/* */ +/* 107 */ set(this.value); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 112 */ return super.toString() + "[" + get() + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\NumberAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ObjEditorDialog.java b/NET/worlds/scape/ObjEditorDialog.java new file mode 100644 index 0000000..8915eb7 --- /dev/null +++ b/NET/worlds/scape/ObjEditorDialog.java @@ -0,0 +1,45 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ObjEditorDialog +/* */ extends ObjectSelectorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ ObjEditorDialog(EditTile parent, String title, Property property, SuperRoot r, Class clas) +/* */ { +/* 32 */ super(parent, title, property, r, clas); +/* */ } +/* */ +/* */ protected void addIt(Property p, Object obj) +/* */ { +/* 37 */ this.parent.addUndoableSet(p, obj); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ObjPropertyEditor.java b/NET/worlds/scape/ObjPropertyEditor.java new file mode 100644 index 0000000..c9f106e --- /dev/null +++ b/NET/worlds/scape/ObjPropertyEditor.java @@ -0,0 +1,98 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ObjPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ SuperRoot root; +/* */ Class clas; +/* */ +/* */ private ObjPropertyEditor(Property property, SuperRoot r, Class clas) +/* */ { +/* 55 */ super(property); +/* 56 */ this.root = r; +/* 57 */ this.clas = clas; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 65 */ return new ObjEditorDialog(parent, title, this.property, this.root, this.clas); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static Property make(Property property, SuperRoot r, Class clas) +/* */ { +/* 73 */ return property.setEditor(new ObjPropertyEditor(property, r, clas)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Property make(Property property, SuperRoot r, String clas) +/* */ { +/* 82 */ Class c = null; +/* */ try { +/* 84 */ c = Class.forName(clas); +/* */ } +/* */ catch (ClassNotFoundException cfne) { +/* 87 */ System.out.println("Couldn't find " + clas); +/* 88 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* 90 */ return property.setEditor(new ObjPropertyEditor(property, r, c)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ObjectAdderDialog.java b/NET/worlds/scape/ObjectAdderDialog.java new file mode 100644 index 0000000..745eab5 --- /dev/null +++ b/NET/worlds/scape/ObjectAdderDialog.java @@ -0,0 +1,58 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ObjectAdderDialog +/* */ extends ObjectSelectorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ ObjectAdderDialog(EditTile parent, String title, VectorProperty property, SuperRoot r, Class clas) +/* */ { +/* 45 */ super(parent, title, property, r, clas); +/* */ } +/* */ +/* */ protected void addIt(Property p, Object obj) +/* */ { +/* 50 */ this.parent.addUndoableAdd((VectorProperty)p, obj, false); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjectAdderDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ObjectPropertyAdder.java b/NET/worlds/scape/ObjectPropertyAdder.java new file mode 100644 index 0000000..34145f5 --- /dev/null +++ b/NET/worlds/scape/ObjectPropertyAdder.java @@ -0,0 +1,124 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ObjectPropertyAdder +/* */ extends PropAdder +/* */ { +/* */ SuperRoot root; +/* */ Class clas; +/* */ +/* */ private ObjectPropertyAdder(VectorProperty property, SuperRoot r, Class clas) +/* */ { +/* 71 */ super(property); +/* 72 */ this.root = r; +/* 73 */ this.clas = clas; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean hasAddDialog() +/* */ { +/* 80 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public PolledDialog add(EditTile parent, String title) +/* */ { +/* 89 */ return new ObjectAdderDialog(parent, title, this.property, this.root, this.clas); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static VectorProperty make(VectorProperty property, SuperRoot r, Class clas) +/* */ { +/* 99 */ return property.setAdder(new ObjectPropertyAdder(property, r, clas)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static VectorProperty make(VectorProperty property, SuperRoot r, String clas) +/* */ { +/* 108 */ Class c = null; +/* */ try { +/* 110 */ c = Class.forName(clas); +/* */ } +/* */ catch (ClassNotFoundException cfne) { +/* 113 */ System.out.println("Couldn't find " + clas); +/* 114 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* 116 */ return property.setAdder(new ObjectPropertyAdder(property, r, c)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjectPropertyAdder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ObjectSelectorDialog.java b/NET/worlds/scape/ObjectSelectorDialog.java new file mode 100644 index 0000000..20b203c --- /dev/null +++ b/NET/worlds/scape/ObjectSelectorDialog.java @@ -0,0 +1,152 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ abstract class ObjectSelectorDialog +/* */ extends ListAdderDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Property property; +/* 31 */ private Vector objectVector = null; +/* 32 */ SuperRoot root = null; +/* 33 */ Class clas = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ ObjectSelectorDialog(EditTile parent, String title, Property property, SuperRoot r, Class clas) +/* */ { +/* 42 */ super(parent, title); +/* 43 */ this.property = property; +/* 44 */ this.root = r; +/* 45 */ this.clas = clas; +/* 46 */ ready(); +/* */ } +/* */ +/* */ private void quicksort(String[] objectList, int l, int r) +/* */ { +/* 51 */ if (r > l) { +/* 52 */ String v = objectList[r]; +/* */ +/* */ +/* 55 */ int i = l - 1; +/* 56 */ int j = r; +/* */ String tstr; +/* */ Object tobj; +/* */ do { +/* */ do { +/* 61 */ i++; } while (objectList[i].compareTo(v) < 0); +/* */ do { +/* 63 */ j--; } while ((j > l) && (objectList[j].compareTo(v) > 0)); +/* */ +/* */ +/* */ +/* 67 */ tstr = objectList[i]; +/* 68 */ objectList[i] = objectList[j]; +/* 69 */ objectList[j] = tstr; +/* */ +/* 71 */ tobj = this.objectVector.elementAt(i); +/* 72 */ this.objectVector.setElementAt(this.objectVector.elementAt(j), i); +/* 73 */ this.objectVector.setElementAt(tobj, j); +/* 60 */ } while ( +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 74 */ j > i); +/* */ +/* */ +/* 77 */ objectList[j] = objectList[i]; +/* 78 */ objectList[i] = objectList[r]; +/* 79 */ objectList[r] = tstr; +/* 80 */ this.objectVector.setElementAt(this.objectVector.elementAt(i), j); +/* 81 */ this.objectVector.setElementAt(this.objectVector.elementAt(r), i); +/* 82 */ this.objectVector.setElementAt(tobj, r); +/* 83 */ quicksort(objectList, l, i - 1); +/* 84 */ quicksort(objectList, i + 1, r); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void build() +/* */ { +/* 94 */ this.objectVector = new Vector(); +/* 95 */ if (this.root != null) { +/* 96 */ for (Enumeration e = this.root.getDeepOwned(); e.hasMoreElements();) +/* */ { +/* 98 */ Object obj = e.nextElement(); +/* 99 */ if (Std.instanceOf(obj, this.clas)) { +/* 100 */ this.objectVector.addElement(obj); +/* */ } +/* */ } +/* */ +/* 104 */ String[] objectList = new String[this.objectVector.size()]; +/* 105 */ for (int i = 0; i < objectList.length; i++) { +/* 106 */ objectList[i] = this.objectVector.elementAt(i).toString(); +/* */ } +/* */ +/* 109 */ quicksort(objectList, 0, objectList.length - 1); +/* */ +/* */ +/* 112 */ setListContents(objectList); +/* */ } +/* 114 */ super.build(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract void addIt(Property paramProperty, Object paramObject); +/* */ +/* */ +/* */ +/* */ +/* */ protected void add(int option) +/* */ { +/* 127 */ Object obj = this.objectVector.elementAt(option); +/* 128 */ if (obj != null) { +/* 129 */ addIt(this.property, obj); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ObjectSelectorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/OpenURLAction.java b/NET/worlds/scape/OpenURLAction.java new file mode 100644 index 0000000..6b58e33 --- /dev/null +++ b/NET/worlds/scape/OpenURLAction.java @@ -0,0 +1,174 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.NoWebControlException; +/* */ import NET.worlds.console.WebControl; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class OpenURLAction +/* */ extends Action +/* */ { +/* 29 */ String targetURL = "http://www.worlds.com"; +/* 30 */ int xPercent = 100; +/* 31 */ int yPercent = 100; +/* 32 */ boolean hasToolbar = true; +/* 33 */ boolean isFixed = false; +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 39 */ if (seqID != null) +/* */ { +/* */ +/* 42 */ return seqID; +/* */ } +/* */ +/* 45 */ Console c = Console.getActive(); +/* 46 */ if ((c != null) && ((c instanceof DefaultConsole))) +/* */ { +/* 48 */ System.out.println("Opening up a URL now."); +/* */ +/* 50 */ DefaultConsole dc = (DefaultConsole)c; +/* */ try { +/* 52 */ WebControl wc = new WebControl(dc.getRender(), +/* 53 */ this.xPercent, this.yPercent, this.hasToolbar, this.isFixed, +/* 54 */ false); +/* 55 */ wc.activate(); +/* 56 */ wc.setURL(this.targetURL); +/* */ } +/* */ catch (NoWebControlException localNoWebControlException) {} +/* */ +/* */ +/* */ +/* */ +/* 63 */ seqID = new SuperRoot(); +/* 64 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* 69 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 79 */ Object ret = null; +/* 80 */ switch (index - offset) { +/* */ case 0: +/* 82 */ if (mode == 0) { +/* 83 */ ret = StringPropertyEditor.make( +/* 84 */ new Property(this, index, "Target URL")); +/* 85 */ } else if (mode == 1) { +/* 86 */ ret = this.targetURL; +/* 87 */ } else if (mode == 2) +/* 88 */ this.targetURL = ((String)value); +/* 89 */ break; +/* */ case 1: +/* 91 */ if (mode == 0) { +/* 92 */ ret = IntegerPropertyEditor.make( +/* 93 */ new Property(this, index, "X Overlay % or Width"), +/* 94 */ 0, 1024); +/* 95 */ } else if (mode == 1) { +/* 96 */ ret = new Integer(this.xPercent); +/* 97 */ } else if (mode == 2) +/* 98 */ this.xPercent = ((Integer)value).intValue(); +/* 99 */ break; +/* */ case 2: +/* 101 */ if (mode == 0) { +/* 102 */ ret = IntegerPropertyEditor.make( +/* 103 */ new Property(this, index, "Y Overlay % or Height"), +/* 104 */ 0, 1024); +/* 105 */ } else if (mode == 1) { +/* 106 */ ret = new Integer(this.yPercent); +/* 107 */ } else if (mode == 2) +/* 108 */ this.yPercent = ((Integer)value).intValue(); +/* 109 */ break; +/* */ case 3: +/* 111 */ if (mode == 0) { +/* 112 */ ret = BooleanPropertyEditor.make( +/* 113 */ new Property(this, index, "Has Toolbar"), +/* 114 */ "No", "Yes"); +/* 115 */ } else if (mode == 1) { +/* 116 */ ret = new Boolean(this.hasToolbar); +/* 117 */ } else if (mode == 2) +/* 118 */ this.hasToolbar = ((Boolean)value).booleanValue(); +/* 119 */ break; +/* */ case 4: +/* 121 */ if (mode == 0) { +/* 122 */ ret = BooleanPropertyEditor.make( +/* 123 */ new Property(this, index, "Fixed size"), +/* 124 */ "No - Percentage specified", "Yes - Pixels specified"); +/* 125 */ } else if (mode == 1) { +/* 126 */ ret = new Boolean(this.isFixed); +/* 127 */ } else if (mode == 2) +/* 128 */ this.isFixed = ((Boolean)value).booleanValue(); +/* 129 */ break; +/* */ default: +/* 131 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* */ +/* 134 */ return ret; +/* */ } +/* */ +/* */ +/* 138 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 142 */ s.saveVersion(0, classCookie); +/* 143 */ super.saveState(s); +/* */ +/* 145 */ s.saveString(this.targetURL); +/* 146 */ s.saveInt(this.xPercent); +/* 147 */ s.saveInt(this.yPercent); +/* 148 */ s.saveBoolean(this.hasToolbar); +/* 149 */ s.saveBoolean(this.isFixed); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 154 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 156 */ super.restoreState(r); +/* 157 */ this.targetURL = r.restoreString(); +/* 158 */ this.xPercent = r.restoreInt(); +/* 159 */ this.yPercent = r.restoreInt(); +/* 160 */ this.hasToolbar = r.restoreBoolean(); +/* 161 */ this.isFixed = r.restoreBoolean(); +/* 162 */ break; +/* */ +/* */ default: +/* 165 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\OpenURLAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ParallelAction.java b/NET/worlds/scape/ParallelAction.java new file mode 100644 index 0000000..74ecc83 --- /dev/null +++ b/NET/worlds/scape/ParallelAction.java @@ -0,0 +1,226 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ParallelAction +/* */ extends Action +/* */ implements RunningActionCallback +/* */ { +/* */ protected static final int NONE = 0; +/* */ protected static final int FIRST = 1; +/* */ protected static final int ALL = -1; +/* 40 */ protected Vector actions = new Vector(); +/* */ +/* */ +/* 43 */ protected int waitState = -1; +/* */ +/* */ +/* 46 */ protected int waitingFor = 0; +/* */ +/* */ +/* 49 */ protected Object currentRun = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event evt, Persister seqID) +/* */ { +/* 66 */ if (seqID == null) { +/* 67 */ if (this.waitingFor == 0) { +/* 68 */ this.currentRun = new Object(); +/* 69 */ if (this.waitState == -1) { +/* 70 */ this.waitingFor = this.actions.size(); +/* 71 */ seqID = this; +/* 72 */ } else if (this.waitState == 1) { +/* 73 */ this.waitingFor = 1; +/* 74 */ seqID = this; +/* */ } else { +/* 76 */ this.waitingFor = 0; +/* 77 */ seqID = null; +/* */ } +/* 79 */ RunningActionHandler.trigger(this.actions, getWorld(), evt, +/* 80 */ this, this.currentRun); +/* */ } +/* */ } +/* 83 */ else if (this.waitingFor == 0) { +/* 84 */ seqID = null; +/* */ } +/* 86 */ return seqID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void actionDone(Action a, Event e, Object o) +/* */ { +/* 101 */ if ((this.waitingFor > 0) && (o == this.currentRun)) { +/* 102 */ this.waitingFor -= 1; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 110 */ public void setWaitForAll() { this.waitState = -1; } +/* 111 */ public void setWaitForFirst() { this.waitState = 1; } +/* 112 */ public void setWaitForNone() { this.waitState = 0; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addComponent(Action act) +/* */ { +/* 121 */ assert (act != null); +/* 122 */ this.actions.addElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertComponent(Action act, int index) +/* */ { +/* 131 */ assert (act != null); +/* 132 */ this.actions.insertElementAt(act, index); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean removeComponent(Action act) +/* */ { +/* 141 */ assert (act != null); +/* 142 */ return this.actions.removeElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getComponents() +/* */ { +/* 150 */ return this.actions.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 160 */ Object ret = null; +/* 161 */ switch (index - offset) { +/* */ case 0: +/* 163 */ if (mode == 0) { +/* 164 */ ret = ObjectPropertyAdder.make( +/* 165 */ new VectorProperty(this, index, "Components"), +/* 166 */ getRoot(), "NET.worlds.scape.Action"); +/* 167 */ } else if (mode == 1) { +/* 168 */ ret = this.actions.clone(); +/* 169 */ } else if (mode == 4) { +/* 170 */ this.actions.removeElement(value); +/* 171 */ } else if (mode == 3) +/* 172 */ this.actions.addElement((Action)value); +/* 173 */ break; +/* */ case 1: +/* 175 */ if (mode == 0) { +/* 176 */ String[] names = { "None", "First", "All" }; +/* 177 */ int[] values = { 0, 1, -1 }; +/* 178 */ ret = EnumPropertyEditor.make( +/* 179 */ new Property(this, index, "Wait for"), +/* 180 */ names, values); +/* 181 */ } else if (mode == 1) { +/* 182 */ ret = new Integer(this.waitState); +/* 183 */ } else if (mode == 2) { +/* 184 */ this.waitState = ((Integer)value).intValue(); } +/* 185 */ break; +/* */ default: +/* 187 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 189 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* 194 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 198 */ s.saveVersion(2, classCookie); +/* 199 */ super.saveState(s); +/* 200 */ s.saveVector(this.actions); +/* 201 */ s.saveInt(this.waitState); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 206 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 208 */ super.restoreState(r); +/* 209 */ this.actions = r.restoreVectorActions(); +/* 210 */ this.waitState = r.restoreInt(); +/* 211 */ break; +/* */ case 1: +/* 213 */ super.restoreState(r); +/* 214 */ this.actions = r.restoreVectorActions(); +/* 215 */ break; +/* */ default: +/* 217 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ParallelAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PassthroughBumpCalc.java b/NET/worlds/scape/PassthroughBumpCalc.java new file mode 100644 index 0000000..7d8c39f --- /dev/null +++ b/NET/worlds/scape/PassthroughBumpCalc.java @@ -0,0 +1,67 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PassthroughBumpCalc +/* */ extends BumpCalc +/* */ { +/* */ public void detectBump(BumpEventTemp b, WObject owner) +/* */ { +/* 32 */ Transform xfrm = owner.getObjectToWorldMatrix(); +/* 33 */ Point3Temp start = xfrm.getPosition(); +/* 34 */ Point3Temp d = owner.getPlaneExtent().vectorTimes(xfrm); +/* 35 */ xfrm.recycle(); +/* */ +/* 37 */ b.hitPlane(owner, start, d); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 43 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 47 */ s.saveVersion(0, classCookie); +/* 48 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 53 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 55 */ super.restoreState(r); +/* 56 */ break; +/* */ default: +/* 58 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PassthroughBumpCalc.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PasteWidget.java b/NET/worlds/scape/PasteWidget.java new file mode 100644 index 0000000..ecb7b9a --- /dev/null +++ b/NET/worlds/scape/PasteWidget.java @@ -0,0 +1,36 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class PasteWidget +/* */ extends ClickWidget +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public PasteWidget(ToolBar toolbar) +/* */ { +/* 23 */ super(toolbar, "paste.gif", Console.message("Paste")); +/* */ } +/* */ +/* */ public void perform() +/* */ { +/* 28 */ Console.getFrame().getEditTile().paste(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PasteWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PathMoveAction.java b/NET/worlds/scape/PathMoveAction.java new file mode 100644 index 0000000..3e26aae --- /dev/null +++ b/NET/worlds/scape/PathMoveAction.java @@ -0,0 +1,50 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PathMoveAction +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 23 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 29 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 33 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 39 */ MoveAction a = new MoveAction(); +/* 40 */ r.replace(this, a); +/* */ +/* 42 */ a.restoreStateMoveActionHelper(r, classCookie); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PathMoveAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PendingCacheDrone.java b/NET/worlds/scape/PendingCacheDrone.java new file mode 100644 index 0000000..29b60f5 --- /dev/null +++ b/NET/worlds/scape/PendingCacheDrone.java @@ -0,0 +1,132 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PendingCacheDrone +/* */ extends PendingDrone +/* */ { +/* 23 */ static String upgradeDir = IniFile.gamma().getIniString("avatarDir", +/* 24 */ "avatar/"); +/* */ +/* */ +/* */ +/* */ +/* */ public PendingCacheDrone(PosableDrone _drone, URL _url) +/* */ { +/* 31 */ super(_drone, _url); +/* */ } +/* */ +/* */ static +/* */ { +/* 25 */ if (!upgradeDir.endsWith("/")) { +/* 26 */ upgradeDir += "/"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 43 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void downloadSeqFile(String seqFileName, boolean force, int nativeNotifyObject) +/* */ { +/* 55 */ seqFileName = seqFileName.toLowerCase(); +/* */ +/* 57 */ if (!PosableDroneLoader.usingCache()) +/* */ { +/* 59 */ notifySeqLoaded(nativeNotifyObject, ".\\avatars\\" + seqFileName); +/* 60 */ return; +/* */ } +/* */ +/* 63 */ String path = NetUpdate.getUpgradeServerURL() + +/* 64 */ upgradeDir + seqFileName; +/* */ +/* 66 */ if (force) +/* */ { +/* 68 */ CacheFile cf = Cache.getFile(URL.make(path)); +/* 69 */ cf.waitUntilLoaded(); +/* 70 */ if (cf.error()) +/* */ { +/* */ +/* */ +/* 74 */ return; +/* */ } +/* */ +/* 77 */ notifySeqLoaded(nativeNotifyObject, cf.getLocalName()); +/* */ } +/* */ else +/* */ { +/* 81 */ new SeqFile(nativeNotifyObject, URL.make(path)); +/* */ } +/* */ } +/* */ +/* */ public static String getAvatarDatPath() +/* */ { +/* 87 */ if (!PosableDroneLoader.usingCache()) { +/* 88 */ return ".\\avatars\\avatars.dat"; +/* */ } +/* 90 */ if (IniFile.gamma().getIniInt("localavatarsdat", 0) == 1) { +/* 91 */ return ".\\avatars\\avatars.dat"; +/* */ } +/* */ +/* 94 */ String datURL = NetUpdate.getUpgradeServerURL() + +/* 95 */ upgradeDir + "avatars.dat"; +/* 96 */ CacheFile cf = Cache.getFile(URL.make(datURL)); +/* 97 */ cf.waitUntilLoaded(); +/* 98 */ if (cf.error()) +/* */ { +/* */ +/* */ +/* 102 */ return null; +/* */ } +/* */ +/* 105 */ return cf.getLocalName(); +/* */ } +/* */ +/* */ public synchronized void download(URL avURL) {} +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ public static native void nativeDestroy(); +/* */ +/* */ public static synchronized native void notifySeqLoaded(int paramInt, String paramString); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PendingCacheDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PendingDrone.java b/NET/worlds/scape/PendingDrone.java new file mode 100644 index 0000000..355a476 --- /dev/null +++ b/NET/worlds/scape/PendingDrone.java @@ -0,0 +1,562 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Archive; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.io.File; +/* */ import java.io.FileInputStream; +/* */ import java.io.FileNotFoundException; +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.InputStream; +/* */ import java.io.PrintStream; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.zip.ZipEntry; +/* */ import java.util.zip.ZipFile; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PendingDrone +/* */ { +/* */ static +/* */ { +/* 29 */ doAvatarUpdates = true; +/* */ } +/* */ +/* */ +/* 33 */ static boolean doAvatarUpdates = IniFile.gamma().getIniInt("noAvUpdates", 0) == 0; +/* */ protected PosableDrone drone; +/* */ protected URL url; +/* */ +/* */ PendingDrone(PosableDrone _drone, URL _url) { +/* 38 */ this.drone = _drone; +/* 39 */ this.url = _url; +/* 40 */ this.loaded = false; +/* */ } +/* */ +/* 43 */ public PosableDrone getDrone() { return this.drone; } +/* 44 */ public URL getUrl() { return this.url; } +/* 45 */ public boolean getLoaded() { return this.loaded; } +/* 46 */ public void setLoaded() { this.loaded = true; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean loaded; +/* */ +/* */ +/* */ +/* */ static final boolean debug = false; +/* */ +/* */ +/* */ +/* */ public synchronized void download(URL avURL) +/* */ { +/* 62 */ if (!doAvatarUpdates) { return; +/* */ } +/* */ +/* 65 */ if (avURL == null) { return; +/* */ } +/* */ +/* */ +/* */ try +/* */ { +/* 71 */ if (PosableDroneLoader.avatarExistsLocally(avURL)) { +/* 72 */ return; +/* */ } +/* */ +/* */ +/* */ } +/* */ catch (MalformedURLException e) +/* */ { +/* 79 */ return; +/* */ } +/* */ +/* 82 */ String s = PosableDroneLoader.getAvatarBaseName(avURL); +/* 83 */ assert (s != null); +/* 84 */ s = s.toLowerCase(); +/* */ +/* 86 */ URL realFile = URL.make(NetUpdate.getUpgradeServerURL() + +/* 87 */ "AvatarUpgrades/" + s + ".zip"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 95 */ CacheFile cf = Cache.getFile(realFile); +/* 96 */ cf.waitUntilLoaded(); +/* 97 */ if (cf.error()) +/* */ { +/* */ +/* */ +/* */ +/* 102 */ return; +/* */ } +/* */ +/* 105 */ finishDownload(cf.getLocalName()); +/* */ +/* 107 */ cf.close(); +/* */ } +/* */ +/* */ +/* */ +/* */ public synchronized boolean finishDownload(String localName) +/* */ { +/* */ try +/* */ { +/* 116 */ patchArchive = new ZipFile(localName); +/* */ } +/* */ catch (IOException e) +/* */ { +/* */ ZipFile patchArchive; +/* */ +/* 122 */ notify(); +/* 123 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ ZipFile patchArchive; +/* */ +/* */ +/* 131 */ Enumeration enums = patchArchive.entries(); +/* 132 */ while (enums.hasMoreElements()) +/* */ { +/* 134 */ ZipEntry ze = (ZipEntry)enums.nextElement(); +/* 135 */ String filename = ze.getName(); +/* 136 */ String avatarFile = URL.homeUnalias("avatars/" + +/* 137 */ filename); +/* */ +/* 139 */ String[] validExtensions = +/* 140 */ { +/* 141 */ ".bod", ".seq", ".dat", ".cmp", ".mov" }; +/* */ +/* */ +/* 144 */ boolean validFile = false; +/* 145 */ for (int idx = 0; idx < validExtensions.length; +/* 146 */ idx++) +/* */ { +/* */ +/* 149 */ if (avatarFile.toString().endsWith(validExtensions[idx])) +/* */ { +/* 151 */ validFile = true; +/* 152 */ break; +/* */ } +/* */ } +/* */ +/* 156 */ if (validFile) +/* */ { +/* 158 */ if (avatarFile.toString().endsWith("avatars.dat")) +/* */ { +/* */ +/* */ +/* */ +/* 163 */ avatarFile = URL.homeUnalias("avatars/avatars.tmp"); +/* */ +/* 165 */ CopyAvatarFile(patchArchive, ze, avatarFile); +/* 166 */ AppendAvatarsDat(); +/* */ } +/* */ else +/* */ { +/* 170 */ CopyAvatarFile(patchArchive, ze, avatarFile); +/* */ } +/* */ } +/* */ } +/* */ try +/* */ { +/* 176 */ patchArchive.close(); +/* */ } +/* */ catch (IOException localIOException1) {} +/* */ +/* 180 */ notify(); +/* */ +/* 182 */ return false; +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 187 */ if ((this.drone == null) || (this.drone.getOwner() == null)) +/* 188 */ return null; +/* 189 */ return this.drone.getOwner().getRoom(); +/* */ } +/* */ +/* */ +/* */ private void AppendAvatarsDat() +/* */ { +/* 195 */ String contentZip = URL.homeUnalias("avatars/content.zip"); +/* */ +/* */ +/* */ +/* */ +/* 200 */ Archive.flushAll(); +/* */ ZipFile contentZipArchive; +/* */ try +/* */ { +/* 204 */ contentZipArchive = new ZipFile(contentZip); +/* */ } +/* */ catch (IOException e) { +/* */ ZipFile contentZipArchive; +/* 208 */ contentZipArchive = null; +/* */ } +/* */ +/* 211 */ if (contentZipArchive != null) +/* */ { +/* 213 */ ZipEntry origAvatarDat = contentZipArchive.getEntry( +/* 214 */ "avatars.dat"); +/* 215 */ if (origAvatarDat != null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 221 */ CopyAvatarFile(contentZipArchive, origAvatarDat, +/* 222 */ URL.homeUnalias("avatars/avatars.dat")); +/* 223 */ StripAvatarDat(contentZipArchive); +/* */ } +/* */ else +/* */ { +/* */ try { +/* 228 */ contentZipArchive.close(); +/* */ } +/* */ catch (IOException localIOException1) {} +/* */ } +/* */ } +/* */ +/* */ +/* */ try +/* */ { +/* 237 */ avDat = new FileOutputStream(URL.homeUnalias( +/* 238 */ "avatars/avatars.dat"), true); +/* */ } catch (IOException e) { +/* */ FileOutputStream avDat; +/* 241 */ System.out.println(e); return; +/* */ } +/* */ +/* */ FileOutputStream avDat; +/* */ try +/* */ { +/* 247 */ avTmp = new FileInputStream(URL.homeUnalias( +/* 248 */ "avatars/avatars.tmp")); +/* */ } +/* */ catch (FileNotFoundException e) { +/* */ try { +/* */ FileInputStream avTmp; +/* 253 */ avDat.close(); +/* */ } +/* */ catch (IOException localIOException2) {} +/* */ return; +/* */ } +/* */ FileInputStream avTmp; +/* 259 */ byte[] buf = new byte['Ѐ']; +/* */ try +/* */ { +/* */ for (;;) { +/* 263 */ int bytesRead = avTmp.read(buf); +/* 264 */ if (bytesRead == -1) break; +/* 265 */ avDat.write(buf, 0, bytesRead); +/* */ } +/* */ File avTmpFile; +/* */ return; +/* */ } +/* */ catch (IOException localIOException3) +/* */ { +/* */ try { +/* 273 */ avDat.close(); +/* 274 */ avTmp.close(); +/* */ } +/* */ catch (IOException localIOException4) {} +/* */ +/* */ +/* 279 */ avTmpFile = new File(URL.homeUnalias("avatars/avatars.tmp")); +/* */ +/* 281 */ avTmpFile.delete(); +/* */ +/* */ +/* 284 */ DroneAnimator.loadconfig( +/* 285 */ URL.make("home:avatars/avatars.dat").unalias()); +/* */ } +/* */ } +/* */ +/* */ /* Error */ +/* */ private void StripAvatarDat(ZipFile contentZipArchive) +/* */ { +/* */ // Byte code: +/* */ // 0: new 256 java/io/FileOutputStream +/* */ // 3: dup +/* */ // 4: ldc_w 318 +/* */ // 7: invokestatic 173 NET/worlds/network/URL:homeUnalias (Ljava/lang/String;)Ljava/lang/String; +/* */ // 10: invokespecial 320 java/io/FileOutputStream: (Ljava/lang/String;)V +/* */ // 13: astore_2 +/* */ // 14: goto +5 -> 19 +/* */ // 17: astore_3 +/* */ // 18: return +/* */ // 19: new 321 java/util/zip/ZipOutputStream +/* */ // 22: dup +/* */ // 23: aload_2 +/* */ // 24: invokespecial 323 java/util/zip/ZipOutputStream: (Ljava/io/OutputStream;)V +/* */ // 27: astore_3 +/* */ // 28: aload_1 +/* */ // 29: invokevirtual 156 java/util/zip/ZipFile:entries ()Ljava/util/Enumeration; +/* */ // 32: astore 4 +/* */ // 34: goto +181 -> 215 +/* */ // 37: aload 4 +/* */ // 39: invokeinterface 160 1 0 +/* */ // 44: checkcast 166 java/util/zip/ZipEntry +/* */ // 47: astore 5 +/* */ // 49: aload 5 +/* */ // 51: invokevirtual 168 java/util/zip/ZipEntry:getName ()Ljava/lang/String; +/* */ // 54: astore 6 +/* */ // 56: aload 6 +/* */ // 58: ldc -65 +/* */ // 60: invokevirtual 326 java/lang/String:equals (Ljava/lang/Object;)Z +/* */ // 63: ifne +152 -> 215 +/* */ // 66: aload_1 +/* */ // 67: aload 5 +/* */ // 69: invokevirtual 330 java/util/zip/ZipFile:getInputStream (Ljava/util/zip/ZipEntry;)Ljava/io/InputStream; +/* */ // 72: astore 7 +/* */ // 74: new 166 java/util/zip/ZipEntry +/* */ // 77: dup +/* */ // 78: aload 5 +/* */ // 80: invokevirtual 168 java/util/zip/ZipEntry:getName ()Ljava/lang/String; +/* */ // 83: invokespecial 334 java/util/zip/ZipEntry: (Ljava/lang/String;)V +/* */ // 86: astore 8 +/* */ // 88: aload_3 +/* */ // 89: aload 8 +/* */ // 91: invokevirtual 335 java/util/zip/ZipOutputStream:putNextEntry (Ljava/util/zip/ZipEntry;)V +/* */ // 94: sipush 1024 +/* */ // 97: newarray +/* */ // 99: astore 9 +/* */ // 101: aload 7 +/* */ // 103: aload 9 +/* */ // 105: invokevirtual 339 java/io/InputStream:read ([B)I +/* */ // 108: istore 10 +/* */ // 110: iload 10 +/* */ // 112: iconst_m1 +/* */ // 113: if_icmpne +6 -> 119 +/* */ // 116: goto +58 -> 174 +/* */ // 119: aload_3 +/* */ // 120: aload 9 +/* */ // 122: iconst_0 +/* */ // 123: iload 10 +/* */ // 125: invokevirtual 342 java/util/zip/ZipOutputStream:write ([BII)V +/* */ // 128: goto -27 -> 101 +/* */ // 131: astore 10 +/* */ // 133: getstatic 261 java/lang/System:out Ljava/io/PrintStream; +/* */ // 136: new 85 java/lang/StringBuilder +/* */ // 139: dup +/* */ // 140: ldc_w 343 +/* */ // 143: invokespecial 96 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 146: aload 5 +/* */ // 148: invokevirtual 168 java/util/zip/ZipEntry:getName ()Ljava/lang/String; +/* */ // 151: invokevirtual 101 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 154: ldc_w 345 +/* */ // 157: invokevirtual 101 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 160: aload 10 +/* */ // 162: invokevirtual 347 java/io/IOException:getMessage ()Ljava/lang/String; +/* */ // 165: invokevirtual 101 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 168: invokevirtual 107 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 171: invokevirtual 350 java/io/PrintStream:println (Ljava/lang/String;)V +/* */ // 174: aload_3 +/* */ // 175: invokevirtual 352 java/util/zip/ZipOutputStream:closeEntry ()V +/* */ // 178: aload 7 +/* */ // 180: invokevirtual 355 java/io/InputStream:close ()V +/* */ // 183: goto +32 -> 215 +/* */ // 186: astore 8 +/* */ // 188: getstatic 261 java/lang/System:out Ljava/io/PrintStream; +/* */ // 191: new 85 java/lang/StringBuilder +/* */ // 194: dup +/* */ // 195: ldc_w 356 +/* */ // 198: invokespecial 96 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 201: aload 8 +/* */ // 203: invokevirtual 347 java/io/IOException:getMessage ()Ljava/lang/String; +/* */ // 206: invokevirtual 101 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 209: invokevirtual 107 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 212: invokevirtual 350 java/io/PrintStream:println (Ljava/lang/String;)V +/* */ // 215: aload 4 +/* */ // 217: invokeinterface 202 1 0 +/* */ // 222: ifne -185 -> 37 +/* */ // 225: aload_1 +/* */ // 226: invokevirtual 205 java/util/zip/ZipFile:close ()V +/* */ // 229: aload_3 +/* */ // 230: invokevirtual 358 java/util/zip/ZipOutputStream:close ()V +/* */ // 233: goto +29 -> 262 +/* */ // 236: astore 5 +/* */ // 238: getstatic 261 java/lang/System:out Ljava/io/PrintStream; +/* */ // 241: new 85 java/lang/StringBuilder +/* */ // 244: dup +/* */ // 245: ldc_w 359 +/* */ // 248: invokespecial 96 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 251: aload 5 +/* */ // 253: invokevirtual 361 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder; +/* */ // 256: invokevirtual 107 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 259: invokevirtual 350 java/io/PrintStream:println (Ljava/lang/String;)V +/* */ // 262: new 286 java/io/File +/* */ // 265: dup +/* */ // 266: ldc -17 +/* */ // 268: invokestatic 173 NET/worlds/network/URL:homeUnalias (Ljava/lang/String;)Ljava/lang/String; +/* */ // 271: invokespecial 288 java/io/File: (Ljava/lang/String;)V +/* */ // 274: astore 5 +/* */ // 276: new 286 java/io/File +/* */ // 279: dup +/* */ // 280: ldc_w 318 +/* */ // 283: invokestatic 173 NET/worlds/network/URL:homeUnalias (Ljava/lang/String;)Ljava/lang/String; +/* */ // 286: invokespecial 288 java/io/File: (Ljava/lang/String;)V +/* */ // 289: astore 6 +/* */ // 291: new 286 java/io/File +/* */ // 294: dup +/* */ // 295: ldc_w 364 +/* */ // 298: invokestatic 173 NET/worlds/network/URL:homeUnalias (Ljava/lang/String;)Ljava/lang/String; +/* */ // 301: invokespecial 288 java/io/File: (Ljava/lang/String;)V +/* */ // 304: astore 7 +/* */ // 306: invokestatic 241 NET/worlds/core/Archive:flushAll ()V +/* */ // 309: aload 5 +/* */ // 311: aload 7 +/* */ // 313: invokevirtual 366 java/io/File:renameTo (Ljava/io/File;)Z +/* */ // 316: istore 8 +/* */ // 318: aload 6 +/* */ // 320: aload 5 +/* */ // 322: invokevirtual 366 java/io/File:renameTo (Ljava/io/File;)Z +/* */ // 325: istore 8 +/* */ // 327: goto +13 -> 340 +/* */ // 330: astore 8 +/* */ // 332: getstatic 261 java/lang/System:out Ljava/io/PrintStream; +/* */ // 335: aload 8 +/* */ // 337: invokevirtual 267 java/io/PrintStream:println (Ljava/lang/Object;)V +/* */ // 340: return +/* */ // Line number table: +/* */ // Java source line #293 -> byte code offset #0 +/* */ // Java source line #295 -> byte code offset #14 +/* */ // Java source line #296 -> byte code offset #17 +/* */ // Java source line #297 -> byte code offset #19 +/* */ // Java source line #299 -> byte code offset #28 +/* */ // Java source line #300 -> byte code offset #34 +/* */ // Java source line #302 -> byte code offset #37 +/* */ // Java source line #303 -> byte code offset #49 +/* */ // Java source line #304 -> byte code offset #56 +/* */ // Java source line #309 -> byte code offset #66 +/* */ // Java source line #310 -> byte code offset #74 +/* */ // Java source line #311 -> byte code offset #88 +/* */ // Java source line #313 -> byte code offset #94 +/* */ // Java source line #318 -> byte code offset #101 +/* */ // Java source line #319 -> byte code offset #110 +/* */ // Java source line #320 -> byte code offset #119 +/* */ // Java source line #321 -> byte code offset #128 +/* */ // Java source line #322 -> byte code offset #131 +/* */ // Java source line #324 -> byte code offset #133 +/* */ // Java source line #325 -> byte code offset #146 +/* */ // Java source line #324 -> byte code offset #171 +/* */ // Java source line #330 -> byte code offset #174 +/* */ // Java source line #331 -> byte code offset #178 +/* */ // Java source line #332 -> byte code offset #183 +/* */ // Java source line #333 -> byte code offset #186 +/* */ // Java source line #334 -> byte code offset #188 +/* */ // Java source line #300 -> byte code offset #215 +/* */ // Java source line #341 -> byte code offset #225 +/* */ // Java source line #342 -> byte code offset #229 +/* */ // Java source line #343 -> byte code offset #233 +/* */ // Java source line #344 -> byte code offset #236 +/* */ // Java source line #345 -> byte code offset #238 +/* */ // Java source line #349 -> byte code offset #262 +/* */ // Java source line #350 -> byte code offset #276 +/* */ // Java source line #351 -> byte code offset #291 +/* */ // Java source line #353 -> byte code offset #306 +/* */ // Java source line #356 -> byte code offset #309 +/* */ // Java source line #358 -> byte code offset #318 +/* */ // Java source line #360 -> byte code offset #327 +/* */ // Java source line #361 -> byte code offset #330 +/* */ // Java source line #362 -> byte code offset #332 +/* */ // Java source line #364 -> byte code offset #340 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 341 0 this PendingDrone +/* */ // 0 341 1 contentZipArchive ZipFile +/* */ // 13 2 2 os FileOutputStream +/* */ // 19 5 2 os FileOutputStream +/* */ // 17 2 3 e IOException +/* */ // 27 203 3 zs java.util.zip.ZipOutputStream +/* */ // 32 184 4 enums Enumeration +/* */ // 47 100 5 ze ZipEntry +/* */ // 236 16 5 e IOException +/* */ // 274 47 5 origFile File +/* */ // 54 3 6 filename String +/* */ // 289 30 6 newFile File +/* */ // 72 107 7 is InputStream +/* */ // 304 8 7 oldFile File +/* */ // 86 4 8 ze2 ZipEntry +/* */ // 186 16 8 e IOException +/* */ // 316 10 8 b boolean +/* */ // 330 6 8 e Exception +/* */ // 99 22 9 buffer byte[] +/* */ // 108 16 10 bytesRead int +/* */ // 131 30 10 e IOException +/* */ // Exception table: +/* */ // from to target type +/* */ // 0 14 17 java/io/IOException +/* */ // 101 116 131 java/io/IOException +/* */ // 119 128 131 java/io/IOException +/* */ // 66 183 186 java/io/IOException +/* */ // 225 233 236 java/io/IOException +/* */ // 309 327 330 java/lang/Exception +/* */ } +/* */ +/* */ private void CopyAvatarFile(ZipFile patchArchive, ZipEntry ze, String avatarFile) +/* */ { +/* */ try +/* */ { +/* 372 */ is = patchArchive.getInputStream(ze); +/* */ } catch (IOException e) { +/* */ InputStream is; +/* */ return; +/* */ } +/* */ InputStream is; +/* 378 */ try { os = new FileOutputStream(avatarFile); +/* */ } catch (IOException e) { +/* */ try { +/* */ FileOutputStream os; +/* 382 */ is.close(); +/* */ } +/* */ catch (IOException localIOException1) {} +/* */ +/* */ return; +/* */ } +/* */ FileOutputStream os; +/* 389 */ byte[] buffer = new byte['Ѐ']; +/* */ try +/* */ { +/* */ for (;;) +/* */ { +/* 394 */ int bytesRead = is.read(buffer); +/* 395 */ if (bytesRead == -1) +/* */ break; +/* 397 */ os.write(buffer, 0, bytesRead); +/* */ } +/* */ +/* */ +/* */ return; +/* */ } +/* */ catch (IOException localIOException2) +/* */ { +/* */ try +/* */ { +/* 407 */ is.close(); +/* 408 */ os.close(); +/* */ } +/* */ catch (IOException localIOException3) {} +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PendingDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PeriodicTimeSensor.java b/NET/worlds/scape/PeriodicTimeSensor.java new file mode 100644 index 0000000..f02b1c3 --- /dev/null +++ b/NET/worlds/scape/PeriodicTimeSensor.java @@ -0,0 +1,131 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PeriodicTimeSensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* 27 */ private float timeInterval = 1.0F; +/* */ +/* */ +/* */ +/* */ private long lastTrigger; +/* */ +/* */ +/* */ +/* */ public PeriodicTimeSensor(Action act) +/* */ { +/* 37 */ if (act != null) { +/* 38 */ addAction(act); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public PeriodicTimeSensor() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 55 */ long now = 0L; +/* 56 */ if (e == null) { +/* 57 */ now = Std.getFastTime(); +/* */ } else { +/* 59 */ now = e.time; +/* */ } +/* */ +/* 62 */ if (now - this.lastTrigger > (1000.0F * this.timeInterval)) { +/* 63 */ this.lastTrigger = now; +/* 64 */ trigger(e); +/* */ } +/* */ +/* 67 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 77 */ Object ret = null; +/* 78 */ switch (index - offset) { +/* */ case 0: +/* 80 */ if (mode == 0) { +/* 81 */ ret = FloatPropertyEditor.make( +/* 82 */ new Property(this, index, "Time Interval (s)")); +/* 83 */ } else if (mode == 1) { +/* 84 */ ret = new Float(this.timeInterval); +/* 85 */ } else if (mode == 2) { +/* 86 */ this.timeInterval = ((Float)value).floatValue(); +/* */ } +/* 88 */ break; +/* */ default: +/* 90 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 92 */ return ret; +/* */ } +/* */ +/* */ +/* 96 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 100 */ s.saveVersion(1, classCookie); +/* 101 */ super.saveState(s); +/* 102 */ s.saveFloat(this.timeInterval); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 107 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 109 */ super.restoreState(r); +/* 110 */ this.timeInterval = r.restoreFloat(); +/* 111 */ break; +/* */ default: +/* 113 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 123 */ return "*every " + this.timeInterval + " s"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PeriodicTimeSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Persister.java b/NET/worlds/scape/Persister.java new file mode 100644 index 0000000..1d28221 --- /dev/null +++ b/NET/worlds/scape/Persister.java @@ -0,0 +1,20 @@ +package NET.worlds.scape; + +import java.io.IOException; + +public abstract interface Persister +{ + public abstract void saveState(Saver paramSaver) + throws IOException; + + public abstract void restoreState(Restorer paramRestorer) + throws IOException, TooNewException; + + public abstract void postRestore(int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Persister.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PickEvent.java b/NET/worlds/scape/PickEvent.java new file mode 100644 index 0000000..bf44764 --- /dev/null +++ b/NET/worlds/scape/PickEvent.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ public class PickEvent +/* */ extends UserEvent +/* */ { +/* */ public float x; +/* */ +/* */ +/* */ public float y; +/* */ +/* */ +/* */ public float z; +/* */ +/* */ +/* */ +/* */ public PickEvent(int time, WObject target, float _x, float _y, float _z) +/* */ { +/* 21 */ super(time, null, target); +/* */ +/* 23 */ this.x = _x; +/* 24 */ this.y = _y; +/* 25 */ this.z = _z; +/* */ } +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 30 */ if (((o instanceof PickHandler)) && +/* 31 */ (((PickHandler)o).handle(this))) +/* 32 */ return true; +/* 33 */ return super.deliver(o); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PickEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PickHandler.java b/NET/worlds/scape/PickHandler.java new file mode 100644 index 0000000..aa4533d --- /dev/null +++ b/NET/worlds/scape/PickHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface PickHandler +{ + public abstract boolean handle(PickEvent paramPickEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PickHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PickUpAction.java b/NET/worlds/scape/PickUpAction.java new file mode 100644 index 0000000..af2c966 --- /dev/null +++ b/NET/worlds/scape/PickUpAction.java @@ -0,0 +1,72 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PickUpAction +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 30 */ WObject w = (WObject)getOwner(); +/* */ +/* 32 */ w.detach(); +/* */ +/* */ +/* 35 */ w.raise(-Pilot.getActive().getZ()); +/* */ +/* 37 */ Pilot.getActive().add(w); +/* */ +/* */ +/* 40 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 47 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 51 */ s.saveVersion(0, classCookie); +/* 52 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 58 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 60 */ super.restoreState(r); +/* 61 */ break; +/* */ default: +/* 63 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PickUpAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Pilot.java b/NET/worlds/scape/Pilot.java new file mode 100644 index 0000000..a7de474 --- /dev/null +++ b/NET/worlds/scape/Pilot.java @@ -0,0 +1,1497 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.AdPart; +/* */ import NET.worlds.console.BBAnimateDroneCommand; +/* */ import NET.worlds.console.BBMoveDroneCommand; +/* */ import NET.worlds.console.BBTeleportCommand; +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.FramePart; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.InfiniteWaitException; +/* */ import NET.worlds.network.NetworkObject; +/* */ import NET.worlds.network.NetworkRoom; +/* */ import NET.worlds.network.OldPropertyList; +/* */ import NET.worlds.network.PacketTooLargeException; +/* */ import NET.worlds.network.PropertyList; +/* */ import NET.worlds.network.PropertySetCmd; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import NET.worlds.network.longLocCmd; +/* */ import NET.worlds.network.net2Property; +/* */ import NET.worlds.network.netPacket; +/* */ import NET.worlds.network.roomChangeCmd; +/* */ import NET.worlds.network.teleportCmd; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class Pilot +/* */ extends WObject +/* */ implements NetworkObject, BumpHandler +/* */ { +/* */ static +/* */ { +/* 161 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ public float animate(String action) +/* */ { +/* 170 */ action = action.toLowerCase(); +/* 171 */ BlackBox.getInstance().submitEvent( +/* 172 */ new BBAnimateDroneCommand("@Pilot", action)); +/* 173 */ if ((action.equals("sleep")) || (action.equals("s"))) { +/* 174 */ Console console = Console.getActive(); +/* 175 */ if (console != null) +/* 176 */ console.goToSleep(); +/* 177 */ } else if (this == getActive()) +/* */ { +/* 179 */ sendText("&|+action>" + action); +/* */ } +/* 181 */ return 0.0F; +/* */ } +/* */ +/* */ public Vector getAnimationList() { +/* 185 */ Vector v = new Vector(); +/* 186 */ v.addElement("sleep"); +/* 187 */ return v; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setSleepMode(String mode) {} +/* */ +/* */ +/* */ +/* */ +/* */ public static void load(URL url, WobLoaded callback) +/* */ { +/* 201 */ if ((url.endsWith(".mov")) || (url.endsWith(".rwx")) || +/* 202 */ (url.endsWith(".rwg"))) { +/* 203 */ callback.wobLoaded(null, new HoloPilot(url)); +/* */ } else { +/* 205 */ String s = url.getInternal(); +/* 206 */ if (s.endsWith(".drone")) { +/* 207 */ s = s.substring(0, s.length() - 6) + ".pilot"; +/* 208 */ } else if (!s.endsWith(".pilot")) { +/* 209 */ s = s + ".pilot"; +/* */ } +/* 211 */ new WobLoader(URL.make(s), callback); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addInventory(WObject child) +/* */ throws ClassCastException +/* */ { +/* 222 */ assert (child.isDynamic()); +/* 223 */ add(child); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void addInSlot(WObject child, int slot) +/* */ { +/* 231 */ assert (child.isDynamic()); +/* 232 */ Sharer s = getSharer(); +/* 233 */ if (s.getAttribute(slot) != null) { +/* 234 */ System.out.println("Attempting to add a second object (" + +/* 235 */ child.getName() + ") to slot number " + slot); +/* 236 */ return; +/* */ } +/* 238 */ s.moveToSlot(child, slot); +/* */ } +/* */ +/* */ public void add(WObject w) +/* */ { +/* 243 */ super.add(w); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 266 */ static Vector visibleRooms = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 275 */ static Vector visibleRoomInfo = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ int lastUpdateTime; +/* */ +/* */ +/* */ +/* */ +/* */ public float distToVisibleObject(WObject w) +/* */ { +/* 287 */ return distToVisiblePoint(w.getRoom(), w.getWorldPosition()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void aboutToDraw() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float distToVisiblePoint(Room r, Point3Temp pos) +/* */ { +/* 307 */ if (r == null) { +/* 308 */ return 0.0F; +/* */ } +/* 310 */ int i = visibleRooms.indexOf(r); +/* 311 */ if (i == -1) { +/* 312 */ return 0.0F; +/* */ } +/* 314 */ RoomSubscribeInfo rsi = +/* 315 */ (RoomSubscribeInfo)visibleRoomInfo.elementAt(i); +/* */ +/* */ +/* 318 */ if (rsi.d == 0.0F) { +/* 319 */ return pos.minus(getWorldPosition()).length(); +/* */ } +/* 321 */ return pos.minus(Point3Temp.make(rsi.x, rsi.y, rsi.z)).length() + +/* 322 */ rsi.d; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 332 */ private static Vector nextVisibleRooms = new Vector(); +/* 333 */ private static Vector nextVisibleRoomInfo = new Vector(); +/* */ int positionSentTime; +/* */ short lastx; +/* */ short lasty; +/* */ short lastz; +/* */ short lastdir; +/* */ Room lastroom; +/* */ Room lastFrameRoom; +/* */ +/* */ public static void addVisibleRoom(Room r, float x, float y, float z, float d) { +/* 343 */ r.noteRef(); +/* */ +/* 345 */ int i = nextVisibleRooms.indexOf(r); +/* 346 */ if (i == -1) { +/* 347 */ nextVisibleRooms.addElement(r); +/* 348 */ nextVisibleRoomInfo.addElement(new RoomSubscribeInfo(x, y, z, d)); +/* */ } +/* */ else { +/* 351 */ RoomSubscribeInfo info = +/* 352 */ (RoomSubscribeInfo)nextVisibleRoomInfo.elementAt(i); +/* 353 */ if (d < info.d) { +/* 354 */ info.x = x; +/* 355 */ info.y = y; +/* 356 */ info.z = z; +/* 357 */ info.d = d; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void generateFrameEvents(FrameEvent f) +/* */ { +/* 379 */ Room currentRoom = getRoom(); +/* 380 */ if (currentRoom != null) { +/* 381 */ addVisibleRoom(currentRoom, 0.0F, 0.0F, 0.0F, 0.0F); +/* */ } +/* */ +/* 384 */ synchronized (visibleRooms) { +/* 385 */ Vector t = visibleRoomInfo; +/* 386 */ visibleRoomInfo = nextVisibleRoomInfo; +/* 387 */ nextVisibleRoomInfo = t; +/* */ +/* 389 */ Vector j = nextVisibleRooms; +/* 390 */ nextVisibleRooms = visibleRooms; +/* */ +/* */ +/* */ +/* 394 */ visibleRooms = j; +/* */ } +/* */ +/* 397 */ Vector prevVisibleRooms = nextVisibleRooms; +/* */ +/* */ +/* 400 */ Object oldEventSource = f.source; +/* 401 */ f.source = this; +/* */ +/* */ +/* 404 */ int i = visibleRooms.size(); +/* 405 */ do { Room r = (Room)visibleRooms.elementAt(i); +/* 406 */ r.generateFrameEvents(f); +/* */ +/* */ +/* 409 */ prevVisibleRooms.removeElement(r);i--; +/* 404 */ } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 413 */ int i = prevVisibleRooms.size(); +/* 414 */ do { ((Room)prevVisibleRooms.elementAt(i)).generateFrameEvents(f);i--; +/* 413 */ } while (i >= 0); +/* */ +/* */ +/* */ +/* 417 */ nextVisibleRooms.removeAllElements(); +/* 418 */ nextVisibleRoomInfo.removeAllElements(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 424 */ int diffTime = f.time - this.lastUpdateTime; +/* */ +/* */ +/* 427 */ if (diffTime > 500) { +/* 428 */ subscribeRooms(); +/* */ +/* */ +/* */ +/* 432 */ boolean hasMoved = pilotUpdate(f.time); +/* */ +/* */ +/* */ +/* 436 */ subscriptionUpdate(hasMoved); +/* */ +/* */ +/* 439 */ updateUnsubscribes(); +/* */ +/* 441 */ this.lastUpdateTime = f.time; +/* */ } +/* */ +/* */ +/* 445 */ touchSubscribers(); +/* */ +/* 447 */ f.source = oldEventSource; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static void sendText(String msg) +/* */ { +/* 455 */ sendText(null, msg); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean containsWord(String word, String msg) +/* */ { +/* 463 */ for (int i = -1; (i = msg.indexOf(word, i + 1)) >= 0;) { +/* 464 */ if ((i == 0) || (!Character.isLetter(msg.charAt(i - 1)))) +/* */ { +/* */ +/* 467 */ int end = i + word.length(); +/* 468 */ if ((end >= msg.length()) || (!Character.isLetter(msg.charAt(end)))) +/* */ { +/* */ +/* 471 */ return true; } +/* */ } +/* */ } +/* 474 */ return false; +/* */ } +/* */ +/* */ public static void sendText(String who, String msg) { +/* 478 */ WorldServer server = active.getServer(); +/* 479 */ if (server != null) { +/* 480 */ if (msg.contains("&|+action>")) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 486 */ PropertyList propList = new PropertyList(); +/* */ +/* 488 */ String strUrl = getActive().getSourceURL().getAbsolute(); +/* */ +/* 490 */ strUrl = strUrl + "#" + msg.substring(msg.indexOf(">") + 1, msg.length()); +/* */ +/* */ +/* */ +/* 494 */ propList.addProperty(new net2Property(5, +/* 495 */ 64, 1, strUrl)); +/* */ try +/* */ { +/* 498 */ server.sendNetworkMsg(new PropertySetCmd(propList)); +/* */ } +/* */ catch (PacketTooLargeException localPacketTooLargeException) {}catch (InfiniteWaitException localInfiniteWaitException) {} +/* */ } +/* */ +/* */ +/* */ +/* 505 */ server.sendText(who, msg); +/* */ +/* */ +/* 508 */ if (((containsWord("brb", msg)) || (containsWord("ggp", msg))) && +/* 509 */ (Console.getActive() != null)) { +/* 510 */ Console.getActive().goToSleep(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 516 */ int i = msg.indexOf('*'); +/* */ int next; +/* 518 */ do { int next; int space = msg.indexOf(' ', i); +/* */ +/* */ +/* 521 */ if ((next > i + 1) && ((space == -1) || (space > next))) +/* */ { +/* */ +/* */ +/* 525 */ String act = msg.substring(i + 1, next).toLowerCase(); +/* 526 */ if ((who == null) && (active != null)) { +/* 527 */ active.animate(act); +/* */ } else { +/* 529 */ sendText(who, "&|+action>" + act); +/* */ } +/* */ } +/* 517 */ i = next; +/* 516 */ if (i < 0) break; } while ( +/* 517 */ (next = msg.indexOf('*', i + 1)) > i); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ } +/* 532 */ else if (!msg.startsWith("&|+")) { +/* 533 */ Console.println(Console.message("No-server-connect")); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private static float round(float x, float mul) +/* */ { +/* 541 */ return mul * Math.round(x / mul); +/* */ } +/* */ +/* */ +/* */ +/* */ public String getWorldRoomChannel(Room room) +/* */ { +/* 548 */ if (room == null) { +/* 549 */ return null; +/* */ } +/* 551 */ World world = room.getWorld(); +/* 552 */ if (world == null) { +/* 553 */ return null; +/* */ } +/* 555 */ URL url = world.getSourceURL(); +/* 556 */ if (url == null) { +/* 557 */ return null; +/* */ } +/* 559 */ String newURL = url.getAbsolute(); +/* */ +/* 561 */ Galaxy g = room.getGalaxy(); +/* 562 */ String channelPart = g.getChannel(); +/* */ +/* */ +/* 565 */ return newURL + "#" + room.getName() + "<" + channelPart + ">"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String getURL() +/* */ { +/* 573 */ Room room = getRoom(); +/* */ +/* 575 */ String newURL = getWorldRoomChannel(room); +/* 576 */ if (newURL == null) { +/* 577 */ return null; +/* */ } +/* 579 */ Point3Temp pos = getPosition(); +/* 580 */ float val = round(pos.x, 1.0F); +/* 581 */ newURL = newURL + "@" + val; +/* */ +/* 583 */ val = round(pos.y, 1.0F); +/* 584 */ newURL = newURL + "," + val; +/* */ +/* 586 */ val = round(pos.z, 1.0F); +/* 587 */ newURL = newURL + "," + val; +/* */ +/* 589 */ Point3Temp camAxis = Point3Temp.make(); +/* 590 */ val = round(getSpin(camAxis), 1.0F); +/* 591 */ newURL = newURL + "," + val; +/* */ +/* 593 */ val = round(camAxis.x, 0.001F); +/* 594 */ newURL = newURL + "," + val; +/* */ +/* 596 */ val = round(camAxis.y, 0.001F); +/* 597 */ newURL = newURL + "," + val; +/* */ +/* 599 */ val = round(camAxis.z, 0.001F); +/* 600 */ newURL = newURL + "," + val; +/* */ +/* 602 */ return newURL; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getTeleportURL() +/* */ { +/* 614 */ Camera tester = new Camera(); +/* */ +/* 616 */ Room room = getRoom(); +/* 617 */ if (room == null) { +/* 618 */ return null; +/* */ } +/* */ +/* 621 */ room.add(tester); +/* 622 */ tester.yaw(220.0F); +/* 623 */ tester.post(this); +/* */ +/* */ +/* 626 */ boolean pBumpable = getBumpable(); +/* 627 */ setBumpable(false); +/* 628 */ Transform t = tester.getObjectToWorldMatrix(); +/* 629 */ tester.moveThrough(Point3Temp.make(0.0F, -170.0F, 0.0F).times(t) +/* 630 */ .minus(t.getPosition())); +/* 631 */ t.recycle(); +/* 632 */ setBumpable(pBumpable); +/* */ +/* 634 */ room = tester.getRoom(); +/* 635 */ tester.detach(); +/* */ +/* 637 */ String wrc = getWorldRoomChannel(room); +/* 638 */ if (wrc == null) { +/* 639 */ return null; +/* */ } +/* 641 */ Point3Temp pos = tester.getPosition(); +/* */ +/* 643 */ return wrc + "@" + (int)pos.x + "," + (int)pos.y + "," + (int)pos.z + +/* 644 */ "," + (int)tester.getYaw(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Room getLastServedRoom() +/* */ { +/* 658 */ return this.lastroom; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float getFootHeight() +/* */ { +/* 666 */ return 0.0F; +/* */ } +/* */ +/* */ private static void sendToRoom(Room r, netPacket msg) +/* */ { +/* 671 */ if (r == null) +/* 672 */ return; +/* 673 */ synchronized (r) { +/* 674 */ WorldServer s = r.getServer(); +/* 675 */ if (s != null) { +/* */ try { +/* 677 */ s.sendNetworkMsg(msg); +/* */ } +/* */ catch (InfiniteWaitException localInfiniteWaitException) {}catch (PacketTooLargeException localPacketTooLargeException) {} +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ private boolean validRoom(Room r) +/* */ { +/* 687 */ return (r == null) || (r.getNetworkRoom().getRoomID() != 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean pilotUpdate(int t) +/* */ { +/* 698 */ Point3Temp pos = getPosition(); +/* 699 */ short x = (short)(int)pos.x;short y = (short)(int)pos.y;short z = (short)(int)getFootHeight(); +/* 700 */ short dir = (short)(int)(-getYaw() + 90.0F); +/* 701 */ dir = (short)(dir % 360); +/* 702 */ while (dir < 0) { +/* 703 */ dir = (short)(dir + 360); +/* */ } +/* */ +/* 706 */ Room room = getRoom(); +/* */ +/* 708 */ if (room != this.lastFrameRoom) { +/* 709 */ BlackBox.getInstance().submitEvent(new BBTeleportCommand(getURL())); +/* 710 */ this.lastFrameRoom = getRoom(); +/* */ } +/* */ +/* */ +/* 714 */ if ((room != null) && (!room.getNetworkRoom().isServed())) { +/* 715 */ room = null; +/* */ } +/* */ +/* 718 */ if ((this.lastroom != null) && (!this.lastroom.getNetworkRoom().isServed())) { +/* 719 */ this.lastroom = null; +/* */ } +/* */ +/* */ +/* 723 */ int diffTime = t - this.positionSentTime; +/* */ +/* */ +/* */ +/* 727 */ if ((x == this.lastx) && (y == this.lasty) && (z == this.lastz) && (dir == this.lastdir) && +/* 728 */ (diffTime <= 40000) && (room == this.lastroom)) { +/* 729 */ return false; +/* */ } +/* */ +/* */ +/* 733 */ BlackBox.getInstance().submitEvent( +/* 734 */ new BBMoveDroneCommand("@Pilot", x, y, z, dir)); +/* */ +/* 736 */ if ((room != this.lastroom) && (validRoom(room)) && (validRoom(this.lastroom))) +/* */ { +/* */ Galaxy lrGalaxy; +/* */ +/* */ +/* */ +/* 742 */ Galaxy rGalaxy = lrGalaxy = null; +/* 743 */ if (room != null) +/* 744 */ rGalaxy = room.getGalaxy(); +/* 745 */ if (this.lastroom != null) +/* 746 */ lrGalaxy = this.lastroom.getGalaxy(); +/* 747 */ if (rGalaxy != lrGalaxy) +/* */ { +/* 749 */ if (room != null) +/* */ { +/* */ +/* */ +/* 753 */ sendToRoom(room, +/* 754 */ new teleportCmd(room, (byte)0, (byte)1, x, y, z, +/* 755 */ dir)); +/* 756 */ BlackBox.getInstance().submitEvent( +/* 757 */ new BBTeleportCommand(getURL())); +/* */ } +/* */ +/* 760 */ if (this.lastroom != null) +/* 761 */ sendToRoom(this.lastroom, +/* 762 */ new teleportCmd(null, (byte)1, (byte)0, x, y, z, +/* 763 */ dir)); +/* 764 */ BlackBox.getInstance().submitEvent( +/* 765 */ new BBTeleportCommand(getURL())); +/* 766 */ } else if (room.getServer() != this.lastroom.getServer()) +/* */ { +/* */ +/* */ +/* */ +/* 771 */ if (room != null) +/* */ { +/* */ +/* */ +/* 775 */ sendToRoom(room, +/* 776 */ new teleportCmd(room, (byte)0, (byte)1, x, y, z, +/* 777 */ dir)); +/* 778 */ BlackBox.getInstance().submitEvent( +/* 779 */ new BBTeleportCommand(getURL())); +/* */ } +/* 781 */ if (this.lastroom != null) { +/* 782 */ sendToRoom(this.lastroom, +/* 783 */ new teleportCmd(null, (byte)1, (byte)0, x, y, z, +/* 784 */ dir)); +/* */ } +/* */ +/* */ +/* */ } +/* */ else +/* */ { +/* 791 */ sendToRoom(this.lastroom, new roomChangeCmd(room, x, y, z, dir)); +/* 792 */ BlackBox.getInstance().submitEvent( +/* 793 */ new BBTeleportCommand(getURL())); +/* */ } +/* */ +/* 796 */ this.lastroom = room; +/* 797 */ } else if (room != null) { +/* 798 */ sendToRoom(room, new longLocCmd(x, y, z, dir)); +/* */ } +/* */ +/* 801 */ this.positionSentTime = t; +/* 802 */ this.lastx = x; +/* 803 */ this.lasty = y; +/* 804 */ this.lastz = z; +/* 805 */ this.lastdir = dir; +/* */ +/* 807 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 813 */ private static Vector subscribers = new Vector(); +/* */ +/* */ private static int lastWarning; +/* */ private static Pilot active; +/* */ +/* */ private void updateUnsubscribes() +/* */ { +/* 820 */ int i = subscribers.size(); +/* 821 */ do { if (!visibleRooms.contains(subscribers.elementAt(i))) { +/* 822 */ ((Room)subscribers.elementAt(i)).unsubscribe(); +/* 823 */ subscribers.removeElementAt(i); +/* */ } +/* 820 */ i--; } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void subscribeRooms() +/* */ { +/* 832 */ int i = visibleRooms.size(); +/* 833 */ do { Room r = (Room)visibleRooms.elementAt(i); +/* 834 */ if (!subscribers.contains(r)) { +/* 835 */ RoomSubscribeInfo newInfo = +/* 836 */ (RoomSubscribeInfo)visibleRoomInfo.elementAt(i); +/* 837 */ r.subscribe(newInfo); +/* */ } +/* 832 */ i--; } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean removeSubscribedRoom(Room suspect) +/* */ { +/* 851 */ int i = subscribers.size(); +/* 852 */ do { if (subscribers.elementAt(i) == suspect) { +/* 853 */ subscribers.removeElementAt(i); +/* */ +/* 855 */ return true; +/* */ } +/* 851 */ i--; } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 858 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ public void touchSubscribers() +/* */ { +/* 865 */ int i = subscribers.size(); +/* 866 */ do { ((Room)subscribers.elementAt(i)).noteRef();i--; +/* 865 */ } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void subscriptionUpdate(boolean hasMoved) +/* */ { +/* 876 */ Room camRoom = getRoom(); +/* */ +/* */ +/* */ +/* 880 */ int i = visibleRooms.size(); +/* 881 */ do { Room r = (Room)visibleRooms.elementAt(i); +/* */ +/* 883 */ assert (r.getNetworkRoom() != null); +/* */ +/* 885 */ RoomSubscribeInfo newInfo = +/* 886 */ (RoomSubscribeInfo)visibleRoomInfo.elementAt(i); +/* 887 */ if (!subscribers.contains(r)) +/* */ { +/* */ +/* 890 */ subscribers.addElement(r); +/* 891 */ } else if ((hasMoved) && (r.getNetworkRoom().isServed()) && +/* 892 */ (r != camRoom)) +/* */ { +/* */ +/* */ +/* */ +/* 897 */ r.subscribeDist(newInfo); +/* */ } +/* 880 */ i--; } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void property(OldPropertyList propList) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void propertyUpdate(PropertyList propList) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void register() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void galaxyDisconnected() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void reacquireServer(WorldServer oldServ) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void changeChannel(Galaxy g, String oldChannel, String newChannel) +/* */ { +/* 929 */ sendToRoom(this.lastroom, +/* 930 */ new teleportCmd(null, (byte)1, (byte)0, this.lastx, this.lasty, this.lastz, +/* 931 */ this.lastdir)); +/* 932 */ BlackBox.getInstance().submitEvent(new BBTeleportCommand(getURL())); +/* 933 */ this.lastroom = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WorldServer getServer() +/* */ { +/* 942 */ Room r = getLastServedRoom(); +/* 943 */ if (r != null) { +/* 944 */ return r.getServer(); +/* */ } +/* 946 */ if (this.console == null) { +/* 947 */ return null; +/* */ } +/* 949 */ return this.console.getServerNew(); +/* */ } +/* */ +/* */ public String getLongID() { +/* 953 */ if (this.console != null) { +/* 954 */ return this.console.getGalaxy().getChatname(); +/* */ } +/* 956 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject changeRoom(Room newRoom, Transform invPos) +/* */ { +/* 975 */ assert (this == active); +/* */ +/* */ +/* 978 */ if ((newRoom.getVIPOnly()) && (!newRoom.getWorld().getConsole().getVIP())) { +/* 979 */ int now = Std.getFastTime(); +/* 980 */ if (now > lastWarning + 3000) { +/* 981 */ lastWarning = now; +/* 982 */ Console.println(Console.message("Only-VIPs-here")); +/* */ } +/* 984 */ return null; +/* */ } +/* */ +/* 987 */ Room oldRoom = getActiveRoom(); +/* */ +/* 989 */ if (oldRoom != null) { +/* 990 */ oldRoom.removePostrenderHandler(BlackBox.getInstance()); +/* 991 */ oldRoom.removeFrameHandler(BlackBox.getInstance(), null); +/* */ } +/* */ +/* 994 */ WObject p = changeActiveRoom(newRoom); +/* */ +/* 996 */ p.makeIdentity(); +/* 997 */ p.pre(invPos); +/* */ +/* 999 */ if (oldRoom != null) +/* 1000 */ oldRoom.move(oldRoom, newRoom); +/* 1001 */ if (newRoom != null) { +/* 1002 */ newRoom.move(oldRoom, newRoom); +/* */ } +/* 1004 */ return p; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Pilot getActive() +/* */ { +/* 1014 */ return active; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1022 */ protected int cameraMode = 0; +/* 1023 */ protected int cameraSpeed = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setOutsideCameraMode(int camMode, int camSpeed) +/* */ { +/* 1034 */ this.cameraMode = camMode; +/* 1035 */ this.cameraSpeed = camSpeed; +/* 1036 */ if (getMainCamera() != null) +/* 1037 */ getMainCamera().lookAround.makeIdentity(); +/* */ } +/* */ +/* */ public int getOutsideCameraMode() { +/* 1041 */ return this.cameraMode; +/* */ } +/* */ +/* */ public int getOutsideCameraSpeed() { +/* 1045 */ return this.cameraSpeed; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static Room getActiveRoom() +/* */ { +/* 1053 */ if (active == null) { +/* 1054 */ return null; +/* */ } +/* 1056 */ return active.getRoom(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static World getActiveWorld() +/* */ { +/* 1064 */ if (active == null) { +/* 1065 */ return null; +/* */ } +/* 1067 */ return active.getWorld(); +/* */ } +/* */ +/* 1070 */ private static World lastWorld = null; +/* */ +/* */ +/* */ +/* */ +/* */ private Camera lastCam; +/* */ +/* */ +/* */ +/* */ +/* */ protected Console console; +/* */ +/* */ +/* */ +/* */ +/* */ public abstract void resetAvatarNow(); +/* */ +/* */ +/* */ +/* */ +/* */ public static Pilot changeActiveRoom(Room newRoom) +/* */ { +/* 1092 */ BackgroundLoader.activeRoomChanged(newRoom); +/* */ +/* 1094 */ Console oldc = Console.getActive(); +/* 1095 */ Console newc = oldc; +/* 1096 */ if (newRoom != null) { +/* 1097 */ newc = newRoom.getWorld().getConsole(); +/* */ } +/* 1099 */ Pilot p = newc.getPilot(); +/* 1100 */ if (p != active) { +/* 1101 */ p.transferFrom(active); +/* */ +/* */ +/* 1104 */ if ((newRoom != null) && (active != null) && +/* 1105 */ (newRoom == active.getRoom())) { +/* 1106 */ p.makeIdentity().post(active); +/* */ } +/* */ } +/* */ +/* */ +/* 1111 */ if (oldc != newc) { +/* 1112 */ newc.forPilotOnlyActivate(); +/* */ } +/* */ +/* */ +/* 1116 */ if (oldc != null) +/* 1117 */ active.detach(); +/* 1118 */ active = p; +/* */ +/* 1120 */ p.setUpCameras(newc); +/* */ +/* 1122 */ if (newRoom != null) { +/* 1123 */ newRoom.add(p); +/* */ } +/* 1125 */ active.resetAvatarNow(); +/* */ +/* */ +/* 1128 */ newc.checkCourtesyVIP(); +/* */ +/* */ +/* 1131 */ if (active.getWorld() != lastWorld) { +/* 1132 */ lastWorld = active.getWorld(); +/* 1133 */ newc.displayAds(); +/* 1134 */ WorldScriptManager.getInstance().worldEntered(lastWorld.toString()); +/* */ } +/* 1136 */ WorldScriptManager.getInstance().roomEntered(newRoom.toString()); +/* */ +/* */ +/* 1139 */ newRoom.addPostrenderHandler(BlackBox.getInstance()); +/* 1140 */ newRoom.addFrameHandler(BlackBox.getInstance(), null); +/* */ +/* 1142 */ return active; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void changeChannel(String newChannel) +/* */ { +/* 1150 */ Galaxy g = this.console.getGalaxy(); +/* 1151 */ g.changeChannel(newChannel); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setUpCameras(Console c) +/* */ { +/* 1161 */ Enumeration camList = getContents(); +/* */ +/* 1163 */ for (Enumeration e = c.getParts(); e.hasMoreElements();) { +/* 1164 */ Object o = e.nextElement(); +/* 1165 */ if (((o instanceof RenderCanvas)) && (!(o instanceof AdPart))) { +/* 1166 */ ((RenderCanvas)o).setCamera(getNextCamera(camList)); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Camera getMainCamera() +/* */ { +/* 1177 */ if (this.lastCam != null) +/* */ { +/* */ +/* */ +/* 1181 */ SuperRoot o = this.lastCam.getOwner(); +/* 1182 */ if ((o == this) || ((o != null) && (o.getOwner() == this))) { +/* 1183 */ return this.lastCam; +/* */ } +/* */ } +/* 1186 */ return this.lastCam = getNextCamera(new DeepEnumeration(getContents())); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static Camera getNextCamera(Enumeration list) +/* */ { +/* 1206 */ while (list.hasMoreElements()) { +/* 1207 */ WObject o = (WObject)list.nextElement(); +/* 1208 */ if ((o instanceof Camera)) { +/* 1209 */ return (Camera)o; +/* */ } +/* */ } +/* 1212 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void transferFrom(Pilot old) +/* */ { +/* 1222 */ if (old == null) +/* 1223 */ return; +/* 1224 */ this.lastx = old.lastx; +/* 1225 */ this.lasty = old.lasty; +/* 1226 */ this.lastz = old.lastz; +/* 1227 */ this.lastdir = old.lastdir; +/* 1228 */ this.lastroom = old.lastroom; +/* 1229 */ this.positionSentTime = old.positionSentTime; +/* */ +/* 1231 */ for (Enumeration ehs = getHandlers(); ehs.hasMoreElements();) { +/* 1232 */ Object eh = ehs.nextElement(); +/* 1233 */ if ((eh instanceof MomentumBehavior)) { +/* 1234 */ ((MomentumBehavior)eh).transferFrom(old.getHandlers()); +/* */ } +/* */ } +/* 1237 */ getMainCamera().transferFrom(old.getMainCamera()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 1245 */ slideBumpHandler(b); +/* 1246 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void slideBumpHandler(BumpEventTemp b) +/* */ { +/* 1258 */ if (b.receiver != b.source) { +/* 1259 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 1264 */ Point3Temp bumpNormal = Point3Temp.make(b.bumpNormal).normalize(); +/* 1265 */ b.postBumpPath.minus(Point3Temp.make(bumpNormal).times( +/* 1266 */ b.postBumpPath.dot(bumpNormal))); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1272 */ b.postBumpPath.plus(Point3Temp.make(b.bumpNormal).times(1.0E-6F)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void makeShadow() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setConsole(Console c) +/* */ { +/* 1305 */ assert (this.console == null); +/* 1306 */ this.console = c; +/* */ +/* 1308 */ copySoul(c.getPilotSoulTemplate(), this); +/* */ } +/* */ +/* */ +/* */ +/* */ private static void saveEnum(Saver s, Enumeration e) +/* */ throws IOException +/* */ { +/* 1316 */ while (e.hasMoreElements()) { +/* 1317 */ Object o = e.nextElement(); +/* 1318 */ if (((o instanceof Persister)) && (!(o instanceof NonPersister))) +/* 1319 */ s.saveMaybeNull((Persister)o); +/* */ } +/* 1321 */ s.saveMaybeNull(null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void copySoul(WObject source, WObject target) +/* */ { +/* 1330 */ ByteArrayOutputStream buffer = new ByteArrayOutputStream(); +/* */ try +/* */ { +/* 1333 */ Saver saver = new Saver(new DataOutputStream(buffer)); +/* */ +/* 1335 */ saveEnum(saver, source.getContents()); +/* 1336 */ saveEnum(saver, source.getHandlers()); +/* 1337 */ saveEnum(saver, source.getActions()); +/* 1338 */ saveEnum(saver, source.getAttributes()); +/* */ +/* 1340 */ saver.done(); +/* */ } catch (Exception e) { +/* 1342 */ e.printStackTrace(System.out); +/* 1343 */ throw new Error(e.toString()); +/* */ } +/* */ +/* */ try +/* */ { +/* 1348 */ Restorer r = new Restorer(new DataInputStream( +/* 1349 */ new ByteArrayInputStream(buffer.toByteArray()))); +/* */ Persister p; +/* 1351 */ while ((p = r.restoreMaybeNull()) != null) { Persister p; +/* 1352 */ target.add((Transform)p); } +/* 1353 */ while ((p = r.restoreMaybeNull()) != null) +/* 1354 */ target.addHandler((SuperRoot)p); +/* 1355 */ while ((p = r.restoreMaybeNull()) != null) +/* 1356 */ target.addAction((Action)p); +/* 1357 */ while ((p = r.restoreMaybeNull()) != null) { +/* 1358 */ target.addAttribute((Attribute)p); +/* */ } +/* 1360 */ r.done(); +/* */ } catch (Exception e) { +/* 1362 */ e.printStackTrace(System.out); +/* 1363 */ throw new Error(e.toString()); +/* */ } +/* */ } +/* */ +/* */ +/* */ protected void noteUnadding(SuperRoot child) +/* */ { +/* 1370 */ if ((child instanceof WObject)) { +/* 1371 */ WObject w = (WObject)child; +/* */ +/* */ +/* */ +/* 1375 */ w.isDynamic(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 1381 */ super.noteUnadding(child); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 1389 */ Object ret = null; +/* 1390 */ switch (index - offset) { +/* */ case 0: +/* 1392 */ if (mode == 0) { +/* 1393 */ ret = new Property(this, index, "Console"); +/* 1394 */ } else if (mode == 1) +/* 1395 */ ret = this.console; +/* 1396 */ break; +/* */ +/* */ default: +/* 1399 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 1401 */ return ret; +/* */ } +/* */ +/* 1404 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 1408 */ if (this.console != null) { +/* 1409 */ System.out.println("Warning: saving pilot " + getName() + +/* 1410 */ " with soul, which won't restore correctly!"); +/* */ } +/* 1412 */ s.saveVersion(0, classCookie); +/* 1413 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 1418 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 1420 */ super.restoreState(r); +/* 1421 */ break; +/* */ +/* */ default: +/* 1424 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Pilot.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PitchDriver.java b/NET/worlds/scape/PitchDriver.java new file mode 100644 index 0000000..c5293c8 --- /dev/null +++ b/NET/worlds/scape/PitchDriver.java @@ -0,0 +1,293 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PitchDriver +/* */ extends SwitchableBehavior +/* */ implements KeyUpHandler, KeyDownHandler, FrameHandler, Persister, MomentumBehavior +/* */ { +/* */ protected float pitch_force; +/* */ protected float pitch_vel; +/* */ protected int lastTime; +/* 40 */ protected float maxdvpitch = 166.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 46 */ protected float pitch_damp = -5.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 52 */ protected float minpitch_vel = 3.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void applyFrameForce(Event e) +/* */ { +/* 63 */ if (!(e.receiver instanceof Pilot)) { +/* 64 */ return; +/* */ } +/* 66 */ Camera cam = ((Pilot)e.receiver).getMainCamera(); +/* */ +/* */ +/* 69 */ int now = e.time; +/* 70 */ float dt = (now - this.lastTime) / 1000.0F; +/* */ +/* */ +/* */ +/* 74 */ if (dt <= 0.0F) { +/* 75 */ return; +/* */ } +/* 77 */ this.lastTime = now; +/* */ +/* */ +/* */ +/* 81 */ float dTheta = this.pitch_vel * dt; +/* */ +/* */ +/* 84 */ float dv = 0.0F; +/* */ +/* 86 */ if (this.pitch_force != 0.0F) +/* */ { +/* 88 */ dv += this.pitch_force * dt; +/* */ +/* */ +/* */ +/* */ +/* 93 */ dv = this.maxdvpitch * (float)Math.atan(dv / this.maxdvpitch); +/* */ +/* 95 */ this.pitch_vel += dv; +/* 96 */ dTheta += dv * dt; +/* */ } +/* */ +/* 99 */ if (dTheta != 0.0F) { +/* 100 */ Point3Temp axis = Point3Temp.make(); +/* 101 */ float angle = cam.lookAround.getSpin(axis); +/* 102 */ if (axis.x < 0.0F) +/* 103 */ angle = -angle; +/* 104 */ if (angle + dTheta > 90.0F) { +/* 105 */ dTheta = 90.0F - angle; +/* 106 */ } else if (angle + dTheta < -90.0F) +/* 107 */ dTheta = -90.0F - angle; +/* 108 */ cam.lookAround.spin(1.0F, 0.0F, 0.0F, dTheta); +/* */ } +/* */ +/* 111 */ this.pitch_vel = ((float)(this.pitch_vel * Math.exp(this.pitch_damp * dt))); +/* 112 */ if (Math.abs(this.pitch_vel) < this.minpitch_vel) { +/* 113 */ this.pitch_vel = 0.0F; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 122 */ applyFrameForce(e); +/* 123 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void resetPitch(Event e) +/* */ { +/* 131 */ Camera cam = ((Pilot)e.receiver).getMainCamera(); +/* */ +/* 133 */ cam.lookAround.makeIdentity(); +/* */ } +/* */ +/* */ +/* 137 */ protected float pitch_key = 500.0F; +/* */ +/* */ +/* */ +/* */ public boolean handle(KeyDownEvent e) +/* */ { +/* */ float pitch; +/* */ +/* 145 */ if (e.getKey() == 58145) { +/* 146 */ pitch = this.pitch_key; } else { float pitch; +/* 147 */ if (e.getKey() == 58146) { +/* 148 */ pitch = -this.pitch_key; +/* */ } else { +/* 150 */ if (e.getKey() == 58148) { +/* 151 */ resetPitch(e); +/* */ } +/* 153 */ return true; } } +/* */ float pitch; +/* 155 */ applyFrameForce(e); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 164 */ this.pitch_force = pitch; +/* 165 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(KeyUpEvent e) +/* */ { +/* 174 */ if ((e.getKey() == 58145) || (e.getKey() == 58146)) +/* */ { +/* 176 */ applyFrameForce(e); +/* 177 */ this.pitch_force = 0.0F; +/* */ } +/* 179 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 188 */ Object ret = null; +/* 189 */ switch (index - offset) { +/* */ case 0: +/* 191 */ if (mode == 0) { +/* 192 */ ret = FloatPropertyEditor.make( +/* 193 */ new Property(this, index, "Pitch max acceleration")); +/* 194 */ } else if (mode == 1) { +/* 195 */ ret = new Float(this.maxdvpitch); +/* 196 */ } else if (mode == 2) +/* 197 */ this.maxdvpitch = ((Float)value).intValue(); +/* 198 */ break; +/* */ case 1: +/* 200 */ if (mode == 0) { +/* 201 */ ret = FloatPropertyEditor.make( +/* 202 */ new Property(this, index, "Pitch rate damping")); +/* 203 */ } else if (mode == 1) { +/* 204 */ ret = new Float(this.pitch_damp); +/* 205 */ } else if (mode == 2) +/* 206 */ this.pitch_damp = ((Float)value).intValue(); +/* 207 */ break; +/* */ case 2: +/* 209 */ if (mode == 0) { +/* 210 */ ret = FloatPropertyEditor.make( +/* 211 */ new Property(this, index, "Pitch min rate")); +/* 212 */ } else if (mode == 1) { +/* 213 */ ret = new Float(this.minpitch_vel); +/* 214 */ } else if (mode == 2) +/* 215 */ this.minpitch_vel = ((Float)value).intValue(); +/* 216 */ break; +/* */ case 3: +/* 218 */ if (mode == 0) { +/* 219 */ ret = FloatPropertyEditor.make( +/* 220 */ new Property(this, index, +/* 221 */ "Pitch rate increment for up/down arrow keys")); +/* 222 */ } else if (mode == 1) { +/* 223 */ ret = new Float(this.pitch_key); +/* 224 */ } else if (mode == 2) +/* 225 */ this.pitch_key = ((Float)value).intValue(); +/* 226 */ break; +/* */ default: +/* 228 */ ret = super.properties(index, offset + 12, mode, value); +/* */ } +/* 230 */ return ret; +/* */ } +/* */ +/* */ +/* 234 */ private static Object cookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 238 */ s.saveVersion(1, cookie); +/* 239 */ super.saveState(s); +/* 240 */ s.saveFloat(this.pitch_vel); +/* 241 */ s.saveFloat(this.maxdvpitch); +/* 242 */ s.saveFloat(this.pitch_damp); +/* 243 */ s.saveFloat(this.minpitch_vel); +/* 244 */ s.saveFloat(this.pitch_key); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 249 */ switch (r.restoreVersion(cookie)) { +/* */ case 0: +/* 251 */ r.setOldFlag(); +/* 252 */ super.restoreState(r); +/* 253 */ r.restoreFloat(); +/* 254 */ this.pitch_vel = r.restoreFloat(); +/* 255 */ this.maxdvpitch = r.restoreFloat(); +/* 256 */ this.pitch_damp = r.restoreFloat(); +/* 257 */ this.minpitch_vel = r.restoreFloat(); +/* 258 */ this.pitch_key = r.restoreFloat(); +/* 259 */ break; +/* */ case 1: +/* 261 */ super.restoreState(r); +/* 262 */ this.pitch_vel = r.restoreFloat(); +/* 263 */ this.maxdvpitch = r.restoreFloat(); +/* 264 */ this.pitch_damp = r.restoreFloat(); +/* 265 */ this.minpitch_vel = r.restoreFloat(); +/* 266 */ this.pitch_key = r.restoreFloat(); +/* 267 */ break; +/* */ default: +/* 269 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ public void transferFrom(Enumeration oldMBs) +/* */ { +/* 276 */ while (oldMBs.hasMoreElements()) { +/* 277 */ SuperRoot sr = (SuperRoot)oldMBs.nextElement(); +/* 278 */ if ((sr instanceof PitchDriver)) { +/* 279 */ PitchDriver pd = (PitchDriver)sr; +/* 280 */ this.pitch_vel = pd.pitch_vel; +/* 281 */ this.pitch_force = pd.pitch_force; +/* 282 */ this.lastTime = pd.lastTime; +/* 283 */ break; +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PitchDriver.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PitchWidget.java b/NET/worlds/scape/PitchWidget.java new file mode 100644 index 0000000..cd3dc05 --- /dev/null +++ b/NET/worlds/scape/PitchWidget.java @@ -0,0 +1,38 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class PitchWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public PitchWidget(ToolBar toolbar) +/* */ { +/* 19 */ super(toolbar, "pitch.gif", "Pitch"); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 24 */ if (Math.abs(deltax) > Math.abs(deltay)) +/* 25 */ deltay = 0.0F; +/* 26 */ Transform t = Transform.make(); +/* 27 */ applyWorldTransform(initialDrag, +/* 28 */ t.spin(getWorldAxis(1, 0, 0), -deltay)); +/* 29 */ t.recycle(); +/* 30 */ return "Pitch"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PitchWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PlaneBumpCalc.java b/NET/worlds/scape/PlaneBumpCalc.java new file mode 100644 index 0000000..967823e --- /dev/null +++ b/NET/worlds/scape/PlaneBumpCalc.java @@ -0,0 +1,146 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PlaneBumpCalc +/* */ extends BumpCalc +/* */ { +/* */ public void detectBump(BumpEventTemp b, WObject owner) +/* */ { +/* 57 */ WObject source = (WObject)b.source; +/* 58 */ Point3Temp sourceStart = source.getWorldPosition(); +/* */ +/* 60 */ Transform xfrm = owner.getObjectToWorldMatrix(); +/* 61 */ Point3Temp start = xfrm.getPosition(); +/* 62 */ Point3Temp right = owner.getPlaneExtent().times(xfrm); +/* 63 */ Point3Temp d = Point3Temp.make(right).minus(start); +/* 64 */ xfrm.recycle(); +/* */ +/* */ +/* */ +/* */ +/* 69 */ BoundBoxTemp sourceBox = source.getBoundBox(); +/* */ Point2 corner; +/* 71 */ Point2 corner; if (d.x > 0.0F) { Point2 corner; +/* 72 */ if (d.y > 0.0F) { +/* 73 */ corner = new Point2(sourceBox.lo.x, sourceBox.hi.y); +/* */ } else +/* 75 */ corner = new Point2(sourceBox.hi.x, sourceBox.hi.y); +/* */ } else { Point2 corner; +/* 77 */ if (d.y > 0.0F) { +/* 78 */ corner = new Point2(sourceBox.lo.x, sourceBox.lo.y); +/* */ } else { +/* 80 */ corner = new Point2(sourceBox.hi.x, sourceBox.lo.y); +/* */ } +/* */ } +/* 83 */ Point2 dn = new Point2(-d.y, d.x).normalize(); +/* 84 */ corner.x -= sourceStart.x; +/* 85 */ corner.y -= sourceStart.y; +/* 86 */ float dist = corner.dot(dn); +/* */ +/* 88 */ Point3Temp extent = Point3Temp.make(dn.x * dist, dn.y * dist, 0.0F); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 94 */ if (b.hitRegion(owner, Point3Temp.make(start).minus(extent), d, extent)) { +/* 95 */ return; +/* */ } +/* */ +/* 98 */ Point3Temp ccwNormal = Point3Temp.make(extent.y, -extent.x, 0.0F); +/* 99 */ d = Point3Temp.make(ccwNormal).minus(extent); +/* 100 */ Point3Temp extentL = Point3Temp.make(-d.y, d.x, 0.0F).normalize() +/* 101 */ .times(dist / 1.5F); +/* */ +/* */ +/* 104 */ Point3Temp startL = Point3Temp.make(start).minus(ccwNormal); +/* */ +/* */ +/* */ +/* 108 */ if (b.hitRegion(owner, startL, d, extentL)) { +/* 109 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 115 */ if (b.hitRegion(owner, Point3Temp.make(right).minus(extent), Point3Temp.make(-d.y, d.x, 0.0F), Point3Temp.make(-extentL.y, extentL.x, 0.0F))) {} +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 122 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 126 */ s.saveVersion(0, classCookie); +/* 127 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 132 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 134 */ super.restoreState(r); +/* 135 */ break; +/* */ default: +/* 137 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PlaneBumpCalc.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PlaybackRecordingAction.java b/NET/worlds/scape/PlaybackRecordingAction.java new file mode 100644 index 0000000..7038fde --- /dev/null +++ b/NET/worlds/scape/PlaybackRecordingAction.java @@ -0,0 +1,80 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PlaybackRecordingAction +/* */ extends Action +/* */ { +/* 14 */ private String filename = "home:record.rec"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setFilename(String m) +/* */ { +/* 22 */ this.filename = m; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqId) +/* */ { +/* 27 */ BlackBox.getInstance().play(URL.make(this.filename)); +/* 28 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 37 */ Object ret = null; +/* 38 */ switch (index - offset) { +/* */ case 0: +/* 40 */ if (mode == 0) { +/* 41 */ ret = StringPropertyEditor.make( +/* 42 */ new Property(this, index, "Filename")); +/* 43 */ } else if (mode == 1) { +/* 44 */ ret = new String(this.filename); +/* 45 */ } else if (mode == 2) +/* 46 */ this.filename = ((String)value); +/* 47 */ break; +/* */ default: +/* 49 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 51 */ return ret; +/* */ } +/* */ +/* 54 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 58 */ s.saveVersion(1, classCookie); +/* 59 */ super.saveState(s); +/* 60 */ s.saveString(this.filename); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 65 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 67 */ super.restoreState(r); +/* 68 */ this.filename = r.restoreString(); +/* 69 */ break; +/* */ default: +/* 71 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PlaybackRecordingAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point2.java b/NET/worlds/scape/Point2.java new file mode 100644 index 0000000..95a622f --- /dev/null +++ b/NET/worlds/scape/Point2.java @@ -0,0 +1,195 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Point2 +/* */ implements Persister +/* */ { +/* */ public float x; +/* */ public float y; +/* */ +/* */ public Point2() {} +/* */ +/* */ public Point2(float _x, float _y) +/* */ { +/* 33 */ set(_x, _y); +/* */ } +/* */ +/* */ public Point2(Point2 p) +/* */ { +/* 38 */ this.x = p.x; +/* 39 */ this.y = p.y; +/* */ } +/* */ +/* */ +/* */ +/* */ public Point2 copy(Point2 b) +/* */ { +/* 46 */ this.x = b.x; +/* 47 */ this.y = b.y; +/* 48 */ return this; +/* */ } +/* */ +/* */ public void set(float _x, float _y) { +/* 52 */ this.x = _x; +/* 53 */ this.y = _y; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float length() +/* */ { +/* 61 */ return (float)Math.sqrt(this.x * this.x + this.y * this.y); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point2 normalize() +/* */ { +/* 69 */ float len = length(); +/* 70 */ if (len > 0.0F) { +/* 71 */ dividedBy(len); +/* */ } +/* 73 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point2 negate() +/* */ { +/* 81 */ this.x = (-this.x); +/* 82 */ this.y = (-this.y); +/* */ +/* 84 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 plus(Point2 p) +/* */ { +/* 90 */ this.x += p.x; +/* 91 */ this.y += p.y; +/* */ +/* 93 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 plus(float v) +/* */ { +/* 99 */ this.x += v; +/* 100 */ this.y += v; +/* */ +/* 102 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 minus(float v) +/* */ { +/* 108 */ return plus(-v); +/* */ } +/* */ +/* */ +/* */ public Point2 minus(Point2 p) +/* */ { +/* 114 */ this.x -= p.x; +/* 115 */ this.y -= p.y; +/* */ +/* 117 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 times(float v) +/* */ { +/* 123 */ this.x *= v; +/* 124 */ this.y *= v; +/* */ +/* 126 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 times(Point2 p) +/* */ { +/* 132 */ this.x *= p.x; +/* 133 */ this.y *= p.y; +/* */ +/* 135 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 dividedBy(float v) +/* */ { +/* 141 */ this.x /= v; +/* 142 */ this.y /= v; +/* */ +/* 144 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point2 dividedBy(Point2 p) +/* */ { +/* 150 */ this.x /= p.x; +/* 151 */ this.y /= p.y; +/* */ +/* 153 */ return this; +/* */ } +/* */ +/* */ +/* */ public float dot(Point2 p) +/* */ { +/* 159 */ return p.x * this.x + p.y * this.y; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 164 */ return this.x + "," + this.y; +/* */ } +/* */ +/* 167 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 171 */ s.saveVersion(0, classCookie); +/* 172 */ s.saveFloat(this.x); +/* 173 */ s.saveFloat(this.y); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 178 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 180 */ this.x = r.restoreFloat(); +/* 181 */ this.y = r.restoreFloat(); +/* 182 */ break; +/* */ default: +/* 184 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point2.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point2EditorDialog.java b/NET/worlds/scape/Point2EditorDialog.java new file mode 100644 index 0000000..4c3b28c --- /dev/null +++ b/NET/worlds/scape/Point2EditorDialog.java @@ -0,0 +1,85 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Point2EditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected Point2 p; +/* */ +/* */ Point2EditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 28 */ super(parent, title); +/* 29 */ this.property = property; +/* 30 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 35 */ this.p = ((Point2)this.property.get()); +/* 36 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 41 */ return 2; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 46 */ switch (index) { +/* */ case 0: +/* 48 */ return this.p.x; +/* */ } +/* 50 */ return this.p.y; +/* */ } +/* */ +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 56 */ Point2 p = new Point2(); +/* 57 */ int count = 0; +/* 58 */ while (e.hasMoreTokens()) +/* */ try { +/* 60 */ float tmp = Float.valueOf(e.nextToken()).floatValue(); +/* 61 */ switch (count++) { +/* */ case 0: +/* 63 */ p.x = tmp; +/* 64 */ break; +/* */ case 1: +/* 66 */ p.y = tmp; +/* 67 */ break; +/* */ default: +/* 69 */ return false; +/* */ } +/* */ } catch (Exception x) { +/* 72 */ return false; +/* */ } +/* 74 */ if (count != 2) +/* 75 */ return false; +/* 76 */ this.parent.addUndoableSet(this.property, p); +/* 77 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point2EditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point2PropertyEditor.java b/NET/worlds/scape/Point2PropertyEditor.java new file mode 100644 index 0000000..1885f3e --- /dev/null +++ b/NET/worlds/scape/Point2PropertyEditor.java @@ -0,0 +1,103 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Point2PropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private Point2PropertyEditor(Property property) +/* */ { +/* 84 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 89 */ return new Point2EditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 94 */ property.setPropertyType(7); +/* 95 */ return property.setEditor(new Point2PropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point2PropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point3.java b/NET/worlds/scape/Point3.java new file mode 100644 index 0000000..b874e52 --- /dev/null +++ b/NET/worlds/scape/Point3.java @@ -0,0 +1,77 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Point3 +/* */ extends Point3Temp +/* */ implements Persister +/* */ { +/* */ public Point3() +/* */ { +/* 29 */ super(0); +/* */ } +/* */ +/* */ public Point3(float x, float y, float z) +/* */ { +/* 34 */ super(0); +/* */ +/* 36 */ this.x = x; +/* 37 */ this.y = y; +/* 38 */ this.z = z; +/* */ } +/* */ +/* */ +/* */ public Point3(Point3Temp p) +/* */ { +/* 44 */ this(p.x, p.y, p.z); +/* */ } +/* */ +/* 47 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 51 */ s.saveVersion(0, classCookie); +/* 52 */ s.saveFloat(this.x); +/* 53 */ s.saveFloat(this.y); +/* 54 */ s.saveFloat(this.z); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 59 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 61 */ this.x = r.restoreFloat(); +/* 62 */ this.y = r.restoreFloat(); +/* 63 */ this.z = r.restoreFloat(); +/* 64 */ break; +/* */ default: +/* 66 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point3.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point3EditorDialog.java b/NET/worlds/scape/Point3EditorDialog.java new file mode 100644 index 0000000..6e5fded --- /dev/null +++ b/NET/worlds/scape/Point3EditorDialog.java @@ -0,0 +1,95 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class Point3EditorDialog +/* */ extends ListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ protected Property property; +/* */ protected Point3 p; +/* */ +/* */ Point3EditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 32 */ super(parent, title); +/* 33 */ this.property = property; +/* 34 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 39 */ this.p = ((Point3)this.property.get()); +/* 40 */ super.build(); +/* */ } +/* */ +/* */ protected int getElementCount() +/* */ { +/* 45 */ return 3; +/* */ } +/* */ +/* */ protected String getElement(int index) +/* */ { +/* 50 */ switch (index) { +/* */ case 0: +/* 52 */ return this.p.x; +/* */ case 1: +/* 54 */ return this.p.y; +/* */ } +/* 56 */ return this.p.z; +/* */ } +/* */ +/* */ +/* */ protected boolean setElements(StringTokenizer e) +/* */ { +/* 62 */ Point3 p = new Point3(); +/* 63 */ int count = 0; +/* 64 */ while (e.hasMoreTokens()) { +/* */ try { +/* 66 */ float tmp = Float.valueOf(e.nextToken()).floatValue(); +/* 67 */ switch (count++) { +/* */ case 0: +/* 69 */ p.x = tmp; +/* 70 */ break; +/* */ case 1: +/* 72 */ p.y = tmp; +/* 73 */ break; +/* */ case 2: +/* 75 */ p.z = tmp; +/* 76 */ break; +/* */ default: +/* 78 */ return false; +/* */ } +/* */ } catch (Exception x) { +/* 81 */ return false; +/* */ } +/* */ } +/* 84 */ if (count != 3) +/* 85 */ return false; +/* 86 */ this.parent.addUndoableSet(this.property, p); +/* 87 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point3EditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point3PropertyEditor.java b/NET/worlds/scape/Point3PropertyEditor.java new file mode 100644 index 0000000..c89a1c0 --- /dev/null +++ b/NET/worlds/scape/Point3PropertyEditor.java @@ -0,0 +1,113 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Point3PropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private Point3PropertyEditor(Property property) +/* */ { +/* 94 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 99 */ return new Point3EditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 104 */ property.setPropertyType(8); +/* 105 */ return property.setEditor(new Point3PropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point3PropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Point3Temp.java b/NET/worlds/scape/Point3Temp.java new file mode 100644 index 0000000..9f1a54a --- /dev/null +++ b/NET/worlds/scape/Point3Temp.java @@ -0,0 +1,298 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Point3Temp +/* */ { +/* */ public float x; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float y; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float z; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 39 */ private static Recycler recycler = new Recycler(); +/* */ +/* */ static +/* */ { +/* 43 */ nativeInit(); +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ public static Point3Temp make(float x, float y, float z) +/* */ { +/* 50 */ Point3Temp p = (Point3Temp)recycler.alloc(); +/* 51 */ if (p == null) +/* */ { +/* 53 */ recycler.recycle(new Point3Temp(0)); +/* 54 */ p = (Point3Temp)recycler.alloc(); +/* */ } +/* */ +/* 57 */ p.x = x; +/* 58 */ p.y = y; +/* 59 */ p.z = z; +/* */ +/* 61 */ return p; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Point3Temp make() +/* */ { +/* 70 */ return make(0.0F, 0.0F, 0.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static Point3Temp make(Point3Temp p) +/* */ { +/* 78 */ return make(p.x, p.y, p.z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected Point3Temp(int dummy) {} +/* */ +/* */ +/* */ +/* */ public Point3Temp copy(Point3Temp b) +/* */ { +/* 90 */ set(b.x, b.y, b.z); +/* 91 */ return this; +/* */ } +/* */ +/* */ public void set(float _x, float _y, float _z) { +/* 95 */ this.x = _x; +/* 96 */ this.y = _y; +/* 97 */ this.z = _z; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float length() +/* */ { +/* 105 */ return (float)Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); +/* */ } +/* */ +/* */ public float squaredLength() +/* */ { +/* 110 */ return this.x * this.x + this.y * this.y + this.z * this.z; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public native Point3Temp times(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ +/* */ public native Point3Temp vectorTimes(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp normalize() +/* */ { +/* 128 */ float len = length(); +/* 129 */ if (len > 0.0F) { +/* 130 */ dividedBy(len); +/* */ } +/* 132 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp negate() +/* */ { +/* 140 */ this.x = (-this.x); +/* 141 */ this.y = (-this.y); +/* 142 */ this.z = (-this.z); +/* */ +/* 144 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp abs() +/* */ { +/* 152 */ this.x = Math.abs(this.x); +/* 153 */ this.y = Math.abs(this.y); +/* 154 */ this.z = Math.abs(this.z); +/* */ +/* 156 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Point3Temp getDirVector(float amount, float angle) +/* */ { +/* 166 */ angle = (float)(angle * 0.017453292519943295D); +/* 167 */ return make(-amount * (float)Math.sin(angle), +/* 168 */ amount * (float)Math.cos(angle), +/* 169 */ 0.0F); +/* */ } +/* */ +/* */ +/* */ public Point3Temp plus(Point3Temp p) +/* */ { +/* 175 */ this.x += p.x; +/* 176 */ this.y += p.y; +/* 177 */ this.z += p.z; +/* */ +/* 179 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp cross(Point3Temp p) +/* */ { +/* 185 */ float xNew = this.y * p.z - this.z * p.y; +/* 186 */ float yNew = this.z * p.x - this.x * p.z; +/* 187 */ this.z = (this.x * p.y - this.y * p.x); +/* 188 */ this.x = xNew; +/* 189 */ this.y = yNew; +/* */ +/* 191 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp plus(float v) +/* */ { +/* 197 */ this.x += v; +/* 198 */ this.y += v; +/* 199 */ this.z += v; +/* */ +/* 201 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp minus(float v) +/* */ { +/* 207 */ return plus(-v); +/* */ } +/* */ +/* */ +/* */ public Point3Temp minus(Point3Temp p) +/* */ { +/* 213 */ this.x -= p.x; +/* 214 */ this.y -= p.y; +/* 215 */ this.z -= p.z; +/* */ +/* 217 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp times(float v) +/* */ { +/* 223 */ this.x *= v; +/* 224 */ this.y *= v; +/* 225 */ this.z *= v; +/* */ +/* 227 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp times(Point3Temp p) +/* */ { +/* 233 */ this.x *= p.x; +/* 234 */ this.y *= p.y; +/* 235 */ this.z *= p.z; +/* */ +/* 237 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp dividedBy(float v) +/* */ { +/* 243 */ this.x /= v; +/* 244 */ this.y /= v; +/* 245 */ this.z /= v; +/* */ +/* 247 */ return this; +/* */ } +/* */ +/* */ +/* */ public Point3Temp dividedBy(Point3Temp p) +/* */ { +/* 253 */ this.x /= p.x; +/* 254 */ this.y /= p.y; +/* 255 */ this.z /= p.z; +/* */ +/* 257 */ return this; +/* */ } +/* */ +/* */ +/* */ public float dot(Point3Temp p) +/* */ { +/* 263 */ return p.x * this.x + p.y * this.y + p.z * this.z; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float det(Point3Temp a, Point3Temp b) +/* */ { +/* 273 */ return this.x * a.y * b.z + a.x * b.y * this.z + b.x * this.y * a.z - +/* 274 */ this.z * a.y * b.x - a.z * b.y * this.x - b.z * this.y * a.x; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean sameValue(Point3Temp p) +/* */ { +/* 282 */ if (p == null) { +/* 283 */ return false; +/* */ } +/* 285 */ return (this.x == p.x) && (this.y == p.y) && (this.z == p.z); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 290 */ return this.x + "," + this.y + "," + this.z; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Point3Temp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Polygon.java b/NET/worlds/scape/Polygon.java new file mode 100644 index 0000000..97625fe --- /dev/null +++ b/NET/worlds/scape/Polygon.java @@ -0,0 +1,143 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Polygon +/* */ extends Surface +/* */ { +/* */ protected float[] vertices; +/* */ +/* */ public Polygon(int numVertices, Material material) +/* */ { +/* 46 */ this(new float[5 * numVertices], material); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Polygon(float[] vertices, Material material) +/* */ { +/* 58 */ super(material); +/* 59 */ assert (vertices.length % 5 == 0); +/* 60 */ this.vertices = vertices; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Polygon() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setVertex(int i, float x, float y, float z, float u, float v) +/* */ { +/* 81 */ i *= 5; +/* 82 */ this.vertices[i] = x; +/* 83 */ this.vertices[(i + 1)] = y; +/* 84 */ this.vertices[(i + 2)] = z; +/* 85 */ this.vertices[(i + 3)] = u; +/* 86 */ this.vertices[(i + 4)] = v; +/* */ +/* 88 */ nativeSetVertex(i, x, y, z, u, v); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public native void nativeSetVertex(int paramInt, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void addRwChildren(WObject parent) +/* */ { +/* 103 */ addNewRwChild(parent); +/* */ +/* 105 */ for (int i = 0; i < this.vertices.length; i += 5) { +/* 106 */ addVertex(this.vertices[i], this.vertices[(i + 1)], this.vertices[(i + 2)], +/* 107 */ this.vertices[(i + 3)], this.vertices[(i + 4)]); +/* */ } +/* 109 */ doneWithEditing(); +/* */ } +/* */ +/* 112 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 116 */ s.saveVersion(0, classCookie); +/* 117 */ super.saveState(s); +/* 118 */ s.saveInt(this.vertices.length); +/* 119 */ for (int i = 0; i < this.vertices.length; i++) { +/* 120 */ s.saveFloat(this.vertices[i]); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 125 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 127 */ super.restoreState(r); +/* 128 */ int length = r.restoreInt(); +/* 129 */ this.vertices = new float[length]; +/* 130 */ for (int i = 0; i < length; i++) +/* 131 */ this.vertices[i] = r.restoreFloat(); +/* 132 */ break; +/* */ default: +/* 134 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Polygon.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Portal.java b/NET/worlds/scape/Portal.java new file mode 100644 index 0000000..32ffe91 --- /dev/null +++ b/NET/worlds/scape/Portal.java @@ -0,0 +1,1334 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Portal +/* */ extends Rect +/* */ implements BumpHandler, Prerenderable, Postrenderable, Properties, Persister, LoadedURLSelf +/* */ { +/* */ static final int UNCONNECTED = -1; +/* */ static final int INITIAL = 0; +/* */ static final int DOWNLOADING = 1; +/* */ static final int DONE = 2; +/* 186 */ private int _state = -1; +/* */ +/* */ +/* 189 */ private Portal _farSidePortal = null; +/* */ +/* */ +/* 192 */ String _farSidePortalName = null; +/* */ +/* */ +/* 195 */ private boolean _farSideIsPortal = true; +/* */ +/* 197 */ private boolean _allowDownload = true; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 203 */ String _farSideRoomName = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 210 */ private URL _farSideWorld = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 219 */ private Room _farSideRoom = null; +/* */ +/* 221 */ protected Room getFarSideRoom() { return this._farSideRoom; } +/* */ +/* */ +/* */ +/* */ private float _farx; +/* */ +/* */ +/* */ private float _fary; +/* */ +/* */ +/* */ private float _farz; +/* */ +/* */ +/* */ private float _fartheta; +/* */ +/* */ +/* */ private float _userFarx; +/* */ +/* */ +/* */ private float _userFary; +/* */ +/* */ private float _userFarz; +/* */ +/* */ private float _userFartheta; +/* */ +/* */ private boolean frozeFrameEvents; +/* */ +/* */ public Portal(float w, float h) +/* */ { +/* 250 */ super(w, h, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal(float llx, float lly, float llz, float urx, float ury, float urz) +/* */ { +/* 261 */ super(llx, lly, llz, urx, ury, urz, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setFarSideInfo(URL world, String room, String portal) +/* */ { +/* 275 */ this._farSideWorld = world; +/* 276 */ this._farSideRoomName = room; +/* 277 */ this._farSidePortalName = portal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal(Point3Temp llc, Point3Temp urc) +/* */ { +/* 286 */ super(llc, urc, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Portal findByName(Room r, String portalName) +/* */ { +/* 296 */ SuperRoot sr = SuperRoot.nameSearch( +/* 297 */ r.getDeepOwned(), +/* 298 */ portalName); +/* 299 */ if ((sr != null) && ((sr instanceof Portal))) +/* 300 */ return (Portal)sr; +/* 301 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal connectTo(Portal far) +/* */ { +/* 311 */ assert (this._state == -1); +/* 312 */ this._farSideIsPortal = true; +/* 313 */ this._farSidePortal = far; +/* 314 */ newFarSide(); +/* 315 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal connectTo(URL farworld, String farroom, Point3Temp llc, Point3Temp urc) +/* */ { +/* 327 */ return connectTo(farworld, farroom, llc.x, llc.y, llc.z, +/* 328 */ urc.x, urc.y, urc.z); +/* */ } +/* */ +/* */ +/* */ public Portal connectTo(Room r, Point3Temp llc, Point3Temp urc) +/* */ { +/* 334 */ System.out.println("Warning! Old style Portal.connectTo called!"); +/* 335 */ Thread.dumpStack(); +/* */ +/* 337 */ assert (this._state == -1); +/* 338 */ this._farSideWorld = r.getWorld().getSourceURL(); +/* 339 */ this._farSideRoomName = r.getName(); +/* 340 */ setFarSideRoom(r); +/* 341 */ this._farx = (this._userFarx = urc.x); +/* 342 */ this._fary = (this._userFary = urc.y); +/* 343 */ this._farz = (this._userFarz = llc.z); +/* 344 */ this._userFartheta = +/* 345 */ ((float)(Math.atan2(llc.y - urc.y, llc.x - urc.x) * 180.0D / 3.141592653589793D)); +/* 346 */ this._fartheta = this._userFartheta; +/* 347 */ this._state = 2; +/* 348 */ this._farSideIsPortal = false; +/* */ +/* 350 */ setTransform(); +/* 351 */ updateVisible(); +/* 352 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal connectTo(URL farworld, String farroom, float llx, float lly, float llz, float urx, float ury, float urz) +/* */ { +/* 365 */ float theta = (float)(Math.atan2(lly - ury, llx - urx) * 180.0D / 3.141592653589793D); +/* 366 */ return connectTo(farworld, farroom, urx, ury, llz, theta); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal connectTo(URL farworld, String farroom, float x, float y, float z, float theta) +/* */ { +/* 384 */ assert (this._state == -1); +/* 385 */ this._farSideWorld = farworld; +/* 386 */ this._farSideRoomName = farroom; +/* 387 */ this._farx = (this._userFarx = x); +/* 388 */ this._fary = (this._userFary = y); +/* 389 */ this._farz = (this._userFarz = z); +/* 390 */ this._fartheta = (this._userFartheta = theta); +/* 391 */ this._farSideIsPortal = false; +/* 392 */ reset(); +/* 393 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal remotify() +/* */ { +/* 403 */ RPAction rpa = new RPAction(); +/* 404 */ addAction(rpa); +/* 405 */ addHandler(new SameRoomSensor(rpa)); +/* 406 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void findFarSidePortal(boolean showmessage) +/* */ { +/* 414 */ if (this._farSideIsPortal) { +/* 415 */ if (this._farSidePortalName == null) { +/* 416 */ this._state = -1; +/* */ } else { +/* 418 */ this._farSidePortal = null; +/* */ +/* 420 */ Vector portals = this._farSideRoom.getOutgoingPortals(); +/* 421 */ int len = portals.size(); +/* 422 */ for (int i = 0; i < len; i++) { +/* 423 */ Portal p = (Portal)portals.elementAt(i); +/* 424 */ if (p.getName().equals(this._farSidePortalName)) { +/* 425 */ this._farSidePortal = p; +/* 426 */ break; +/* */ } +/* */ } +/* */ +/* 430 */ if (this._farSidePortal == null) { +/* 431 */ if (showmessage) { +/* 432 */ Object[] arguments = { new String(getName()), +/* 433 */ new String(this._farSideWorld), +/* 434 */ new String(this._farSideRoomName), +/* 435 */ new String(this._farSidePortalName) }; +/* 436 */ Console.println(MessageFormat.format( +/* 437 */ Console.message("Portal-doesnt"), arguments)); +/* */ } +/* 439 */ this._state = -1; +/* */ } +/* */ } +/* */ +/* 443 */ if (this._farSidePortal != null) +/* 444 */ newFarSide(); +/* */ } else { +/* 446 */ this._farSidePortal = null; +/* 447 */ this._farx = this._userFarx; +/* 448 */ this._fary = this._userFary; +/* 449 */ this._farz = this._userFarz; +/* 450 */ this._fartheta = this._userFartheta; +/* 451 */ this._p2pxform = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ public void reset() +/* */ { +/* 458 */ reset(true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void reset(boolean showmessage) +/* */ { +/* 477 */ setFarSideRoom(null); +/* 478 */ if ((this._farSideRoomName != null) && ((this.flags & 0x40000) == 0)) { +/* 479 */ if (this._farSideWorld == null) { +/* 480 */ Room r = getRoom(); +/* 481 */ if (r != null) { +/* 482 */ World w = r.getWorld(); +/* 483 */ if (w != null) { +/* 484 */ setFarSideRoom(w.getRoom(this._farSideRoomName)); +/* */ } +/* */ } +/* 487 */ if (this._farSideRoom != null) { +/* 488 */ findFarSidePortal(showmessage); +/* */ } else { +/* 490 */ this._state = -1; +/* 491 */ this._farSidePortal = null; +/* 492 */ if (showmessage) { +/* 493 */ Object[] arguments = { new String(getName()), +/* 494 */ new String(getRoom()), +/* 495 */ new String(this._farSideRoomName), +/* 496 */ new String(this._farSidePortalName) }; +/* 497 */ Console.println(MessageFormat.format( +/* 498 */ Console.message("Room-doesnt"), arguments)); +/* */ } +/* */ } +/* */ } +/* */ else { +/* 503 */ if (this._farSidePortalName == null) +/* 504 */ this._farSidePortal = null; +/* 505 */ this._state = 0; +/* */ } +/* */ } +/* */ else { +/* 509 */ this._state = -1; +/* */ } +/* 511 */ setTransform(); +/* 512 */ updateVisible(); +/* */ } +/* */ +/* */ public void discard() { +/* 516 */ Portal far = this._farSidePortal; +/* 517 */ setFarSideRoom(null); +/* */ +/* */ +/* 520 */ this._state = 0; +/* */ +/* 522 */ super.discard(); +/* */ +/* 524 */ if ((far != null) && (far.getRoom() != null) && (this._farSideWorld != null)) { +/* 525 */ far.reset(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void recomputeFarPosition() +/* */ { +/* 535 */ setFarSideRoom(this._farSidePortal.getRoom()); +/* 536 */ if (this._farSideRoom != null) +/* 537 */ this._farSideRoomName = this._farSideRoom.getName(); +/* 538 */ this._farSidePortalName = this._farSidePortal.getName(); +/* 539 */ Point3Temp farext = Point3Temp.make(1.0F, 0.0F, 1.0F) +/* 540 */ .vectorTimes(this._farSidePortal); +/* 541 */ Point3Temp farlrc = this._farSidePortal.getPosition(); +/* 542 */ if ((this.flags & 0x4) == 0) { +/* 543 */ farlrc.x += farext.x; +/* 544 */ farlrc.y += farext.y; +/* */ } +/* */ +/* 547 */ this._farx = farlrc.x; +/* 548 */ this._fary = farlrc.y; +/* 549 */ this._farz = farlrc.z; +/* */ +/* */ +/* */ +/* 553 */ this._fartheta = ((-this._farSidePortal.getYaw() + 180.0F) % 360.0F); +/* */ +/* 555 */ this._farChangeNum = this._farSidePortal._changeNum; +/* */ +/* 557 */ this._p2pxform = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Portal biconnect(Portal far) +/* */ { +/* 565 */ connectTo(far); +/* 566 */ far.connectTo(this); +/* 567 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void disconnect() +/* */ { +/* 576 */ this._farSideWorld = null; +/* 577 */ this._farSideRoomName = null; +/* 578 */ setFarSideRoom(null); +/* 579 */ this._farSidePortal = null; +/* 580 */ this._farSideIsPortal = true; +/* 581 */ this._farSidePortalName = null; +/* 582 */ this._state = -1; +/* 583 */ updateVisible(); +/* 584 */ discardTransform(); +/* */ } +/* */ +/* */ +/* */ public void bidisconnect() +/* */ { +/* 590 */ this._farSidePortal.disconnect(); +/* 591 */ disconnect(); +/* */ } +/* */ +/* */ +/* */ public boolean connected() +/* */ { +/* 597 */ return (this._farSidePortal != null) || ( +/* 598 */ (this._farSideRoomName != null) && (!this._farSideIsPortal)); +/* */ } +/* */ +/* */ public boolean active() +/* */ { +/* 603 */ return this._state == 2; +/* */ } +/* */ +/* */ public boolean unconnected() +/* */ { +/* 608 */ return this._state == -1; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean remote() +/* */ { +/* 616 */ return this._farSideWorld != null; +/* */ } +/* */ +/* */ public Portal farSide() +/* */ { +/* 621 */ return this._farSideIsPortal ? this._farSidePortal : null; +/* */ } +/* */ +/* */ public Room farSideRoom() +/* */ { +/* 626 */ return this._farSideRoom; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 632 */ private void setFarSideRoom(Room far) { this._farSideRoom = far; } +/* */ +/* */ protected void noteAddingTo(SuperRoot s) { +/* 635 */ addToRoom(s); +/* 636 */ super.noteAddingTo(s); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void addToRoom(SuperRoot s) +/* */ { +/* 644 */ if ((s instanceof WObject)) { +/* 645 */ Room r = ((WObject)s).getRoom(); +/* 646 */ if (r != null) +/* 647 */ r.addOutgoingPortal(this); +/* */ } +/* */ } +/* */ +/* */ public void detach() { +/* 652 */ Room r = getRoom(); +/* 653 */ if (r != null) +/* 654 */ r.removeOutgoingPortal(this); +/* 655 */ super.detach(); +/* */ } +/* */ +/* */ public String farRoom() +/* */ { +/* 660 */ return this._farSideRoomName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public URL farWorld() +/* */ { +/* 669 */ return this._farSideWorld; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform p2pXform() +/* */ { +/* 682 */ return this._p2pxform; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 689 */ private Transform _p2pxform = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void addRwChildren(WObject parent) +/* */ { +/* 700 */ if ((this._farSidePortal != null) && ((this._farSidePortal instanceof TwoWayPortal)) && +/* 701 */ (!this._farSidePortal.isActive())) +/* */ { +/* */ +/* */ +/* 705 */ Main.register(new MainCallback() { +/* */ public void mainCallback() { +/* 707 */ Portal.this.detach(); +/* 708 */ Main.unregister(this); +/* */ } +/* */ }); +/* */ } +/* */ +/* 713 */ super.addRwChildren(parent); +/* */ +/* 715 */ updateVisible(); +/* 716 */ setTransform(); +/* */ +/* */ +/* 719 */ getRoom().prependPrerenderHandler(this); +/* 720 */ getRoom().prependPostrenderHandler(this); +/* */ } +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 726 */ getRoom().removePrerenderHandler(this); +/* 727 */ getRoom().removePostrenderHandler(this); +/* */ +/* 729 */ super.markVoid(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 738 */ private int _changeNum = 0; +/* 739 */ private int _farChangeNum = -1; +/* */ +/* */ static BumpCalc standardPassthroughBumpCalc; +/* */ +/* */ +/* */ protected void noteTransformChange() +/* */ { +/* 746 */ this._changeNum += 1; +/* 747 */ super.noteTransformChange(); +/* 748 */ discardTransform(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void discardTransform() +/* */ { +/* 772 */ if (this._p2pxform != null) +/* */ { +/* 774 */ this._p2pxform = null; +/* 775 */ if (this._farSidePortal != null) { +/* 776 */ this._farSidePortal.discardTransform(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ static +/* */ { +/* 753 */ nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 791 */ standardPassthroughBumpCalc = new PassthroughBumpCalc(); +/* */ +/* */ +/* 794 */ standardPassthroughBumpCalc.setName("defaultPassthroughBumpCalc"); +/* */ } +/* */ +/* */ +/* */ public BumpCalc getBumpCalc(BumpEventTemp b) +/* */ { +/* 800 */ if ((this._farSidePortal != null) && +/* 801 */ ((b.source instanceof Camera)) && ( +/* 802 */ ((this.flags & 0x4) != 0) || +/* 803 */ (!this._farSidePortal.active()) || +/* 804 */ (this._farSidePortal._p2pxform == null) || +/* 805 */ (!this._farSidePortal.getVisible()))) { +/* 806 */ return super.getBumpCalc(b); +/* */ } +/* 808 */ if (this.bumpCalc == null) { +/* 809 */ if (this._farSideRoomName == null) { +/* 810 */ return standardPassthroughBumpCalc; +/* */ } +/* 812 */ if ((connected()) && ((this.flags & 0x40000) == 0)) { +/* 813 */ if ((this._farSideRoom == null) && +/* 814 */ (this._farSideIsPortal) && +/* 815 */ (this._farSidePortal != null)) { +/* 816 */ setFarSideRoom(this._farSidePortal.getRoom()); +/* */ } +/* 818 */ if ((this._farSideRoom != null) && (this._farSideRoom.isActive())) { +/* 819 */ return standardPassthroughBumpCalc; +/* */ } +/* */ } +/* 822 */ return super.getBumpCalc(b); +/* */ } +/* */ +/* 825 */ return this.bumpCalc; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 832 */ if ((this._farSidePortal != null) && +/* 833 */ ((b.source instanceof Camera)) && ( +/* 834 */ ((this.flags & 0x4) != 0) || +/* 835 */ (!this._farSidePortal.active()) || +/* 836 */ (this._farSidePortal._p2pxform == null) || +/* 837 */ (!this._farSidePortal.getVisible()))) { +/* 838 */ return true; +/* */ } +/* 840 */ portalBumpHandler(b); +/* 841 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void portalBumpHandler(BumpEventTemp b) +/* */ { +/* 851 */ if ((b.target != this) || (this._state != 2)) { +/* 852 */ if ((this._state == 1) && (this._farSideWorld != null) && +/* 853 */ (!this._farSideWorld.isRemote()) && (!this.frozeFrameEvents)) { +/* 854 */ this.frozeFrameEvents = true; +/* 855 */ Console.setFreezeFrameEvents(true); +/* */ } +/* */ +/* 858 */ return; +/* */ } +/* */ +/* */ +/* 862 */ if ((this._farSideRoom == null) && +/* 863 */ (this._farSideIsPortal) && (this._farSidePortal != null)) +/* 864 */ setFarSideRoom(this._farSidePortal.getRoom()); +/* 865 */ if ((this._farSideRoom == null) || (!this._farSideRoom.isActive())) { +/* 866 */ return; +/* */ } +/* */ +/* */ +/* 870 */ if (this._p2pxform == null) { +/* 871 */ setTransform(); +/* 872 */ if (this._p2pxform == null) { +/* 873 */ return; +/* */ } +/* */ } +/* */ +/* 877 */ b.postBumpRoom = this._farSideRoom; +/* */ +/* 879 */ Transform t = ((WObject)b.source).getObjectToWorldMatrix(); +/* 880 */ b.postBumpPosition.setTransform(t); +/* 881 */ t.recycle(); +/* 882 */ b.postBumpPosition.moveBy(b.path).post(this._p2pxform); +/* */ +/* */ +/* 885 */ b.postBumpPath = new Point3(b.fullPath).times(1.0F - b.fraction) +/* 886 */ .vectorTimes(this._p2pxform); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 895 */ Object ret = null; +/* 896 */ switch (index - offset) { +/* */ case 0: +/* 898 */ if (mode == 0) { +/* 899 */ ret = URLPropertyEditor.make(new Property(this, index, +/* 900 */ "Destination World URL (null means this world)") +/* 901 */ .allowSetNull(), +/* 902 */ "world"); +/* 903 */ } else if (mode == 1) { +/* 904 */ ret = this._farSideWorld; +/* 905 */ } else if (mode == 2) { +/* 906 */ this._farSideWorld = ((URL)value); +/* */ +/* 908 */ reset(); +/* 909 */ triggerLoad(); +/* */ } +/* 911 */ break; +/* */ case 1: +/* 913 */ if (mode == 0) { +/* 914 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 915 */ "Destination Room Name").allowSetNull()); +/* 916 */ } else if (mode == 1) { +/* 917 */ ret = this._farSideRoomName == null ? "" : this._farSideRoomName; +/* 918 */ } else if (mode == 2) { +/* 919 */ this._farSideRoomName = ((String)value); +/* 920 */ if ("".equals(this._farSideRoomName)) +/* 921 */ this._farSideRoomName = null; +/* 922 */ reset(); +/* 923 */ triggerLoad(); +/* */ } +/* 925 */ break; +/* */ case 2: +/* 927 */ if (mode == 0) { +/* 928 */ ret = BooleanPropertyEditor.make( +/* 929 */ new Property(this, index, +/* 930 */ "Connect to a portal"), +/* 931 */ "Use location and orientation", +/* 932 */ "Use portal"); +/* */ } +/* 934 */ else if (mode == 1) { +/* 935 */ ret = new Boolean(this._farSideIsPortal); +/* 936 */ } else if (mode == 2) { +/* 937 */ boolean tmp = ((Boolean)value).booleanValue(); +/* 938 */ this._farSideIsPortal = tmp; +/* 939 */ reset(); +/* 940 */ triggerLoad(); +/* */ } +/* 942 */ break; +/* */ case 3: +/* 944 */ if (mode == 0) { +/* 945 */ ret = BooleanPropertyEditor.make( +/* 946 */ new Property(this, index, +/* 947 */ "Download if world not present"), +/* 948 */ "Never download", +/* 949 */ "Allow download"); +/* */ } +/* 951 */ else if (mode == 1) { +/* 952 */ ret = new Boolean(this._allowDownload); +/* 953 */ } else if (mode == 2) { +/* 954 */ boolean tmp = ((Boolean)value).booleanValue(); +/* 955 */ this._allowDownload = tmp; +/* */ } +/* 957 */ break; +/* */ case 4: +/* 959 */ if (mode == 0) { +/* 960 */ ret = new Property(this, index, "Destination Portal Name"); +/* 961 */ if (this._farSideIsPortal) { +/* 962 */ ret = StringPropertyEditor.make((Property)ret); +/* */ } +/* 964 */ } else if (mode == 1) { +/* 965 */ ret = this._farSidePortalName == null ? "" : this._farSidePortalName; +/* 966 */ } else if (mode == 2) { +/* 967 */ this._farSidePortalName = ((String)value); +/* 968 */ if ("".equals(this._farSidePortalName)) +/* 969 */ this._farSidePortalName = null; +/* 970 */ reset(); +/* 971 */ triggerLoad(); +/* */ } +/* 973 */ break; +/* */ case 5: +/* 975 */ if (mode == 0) { +/* 976 */ ret = new Property(this, index, "Destination position"); +/* 977 */ if (!this._farSideIsPortal) { +/* 978 */ ret = Point3PropertyEditor.make((Property)ret); +/* */ } +/* 980 */ } else if (mode == 1) { +/* 981 */ ret = new Point3(this._userFarx, this._userFary, this._userFarz); +/* 982 */ } else if (mode == 2) { +/* 983 */ Point3 p = (Point3)value; +/* 984 */ this._farx = (this._userFarx = p.x); +/* 985 */ this._fary = (this._userFary = p.y); +/* 986 */ this._farz = (this._userFarz = p.z); +/* 987 */ reset(); +/* 988 */ triggerLoad(); +/* */ } +/* 990 */ break; +/* */ case 6: +/* 992 */ if (mode == 0) { +/* 993 */ ret = new Property(this, index, +/* 994 */ "Destination orientation (degrees, clockwise from North)"); +/* 995 */ if (!this._farSideIsPortal) { +/* 996 */ ret = FloatPropertyEditor.make((Property)ret, 0.0F, 360.0F); +/* */ } +/* 998 */ } else if (mode == 1) { +/* 999 */ ret = new Float(this._userFartheta); +/* 1000 */ } else if (mode == 2) { +/* 1001 */ this._fartheta = (this._userFartheta = ((Float)value).floatValue()); +/* 1002 */ reset(); +/* 1003 */ triggerLoad(); +/* */ } +/* 1005 */ break; +/* */ case 7: +/* 1007 */ if (mode == 0) { +/* 1008 */ ret = BooleanPropertyEditor.make( +/* 1009 */ new Property(this, index, +/* 1010 */ "Mirrored"), +/* 1011 */ "Normal", +/* 1012 */ "Mirrored"); +/* */ } +/* 1014 */ else if (mode == 1) { +/* 1015 */ ret = new Boolean((this.flags & 0x4) != 0); +/* 1016 */ } else if (mode == 2) { +/* 1017 */ if (((Boolean)value).booleanValue()) { +/* 1018 */ this.flags |= 0x4; +/* */ } else +/* 1020 */ this.flags &= 0xFFFFFFFB; +/* 1021 */ reset(); +/* 1022 */ triggerLoad(); +/* */ } +/* 1024 */ break; +/* */ default: +/* 1026 */ ret = super.properties(index, offset + 8, mode, value); +/* */ } +/* 1028 */ return ret; +/* */ } +/* */ +/* */ +/* */ private void newFarSide() +/* */ { +/* 1034 */ this._farSidePortalName = this._farSidePortal.getName(); +/* 1035 */ if ((this._state == -1) && ((this.flags & 0x40000) == 0)) { +/* 1036 */ this._state = 2; +/* */ } +/* 1038 */ recomputeFarPosition(); +/* 1039 */ setTransform(); +/* 1040 */ updateVisible(); +/* */ } +/* */ +/* 1043 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 1047 */ Portal tmp = null; +/* 1048 */ if ((this._farSideWorld != null) || ( +/* 1049 */ (this._farSidePortal != null) && ((!this._farSidePortal.isActive()) || +/* 1050 */ ((this._farSidePortal instanceof NonPersister))))) +/* */ { +/* 1052 */ tmp = this._farSidePortal; +/* 1053 */ this._farSidePortal = null; +/* */ } +/* 1055 */ s.saveVersion(9, classCookie); +/* 1056 */ super.saveState(s); +/* 1057 */ s.saveBoolean(this._farSideIsPortal); +/* 1058 */ s.saveBoolean(this._allowDownload); +/* 1059 */ s.saveString(this._farSidePortalName); +/* 1060 */ s.saveMaybeNull(this._farSidePortal); +/* 1061 */ URL.save(s, this._farSideWorld); +/* 1062 */ s.saveString(this._farSideRoomName); +/* 1063 */ s.saveFloat(this._userFarx); +/* 1064 */ s.saveFloat(this._userFary); +/* 1065 */ s.saveFloat(this._userFarz); +/* 1066 */ s.saveFloat(this._userFartheta); +/* 1067 */ if (tmp != null) { +/* 1068 */ this._farSidePortal = tmp; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void superRestoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 1077 */ restoreWObjectState(r); +/* 1078 */ setMaterial(new Material(Color.black)); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 1084 */ float x = 0.0F;float y = 0.0F;float z = 0.0F; +/* 1085 */ int vers = r.restoreVersion(classCookie); +/* 1086 */ switch (vers) { +/* */ case 0: +/* */ case 1: +/* */ case 2: +/* */ case 3: +/* */ case 4: +/* */ case 5: +/* */ case 6: +/* */ case 7: +/* 1095 */ r.setOldFlag(); +/* 1096 */ superRestoreState(r); +/* */ +/* 1098 */ if (vers < 6) { +/* 1099 */ if (vers == 0) +/* 1100 */ r.restoreInt(); +/* 1101 */ x = r.restoreFloat(); +/* 1102 */ y = r.restoreFloat(); +/* 1103 */ z = r.restoreFloat(); +/* 1104 */ scale(x, 1.0F, z); +/* */ } +/* */ +/* 1107 */ if (r.restoreBoolean()) { +/* 1108 */ this.flags |= 0x4; +/* */ } +/* 1110 */ if (vers >= 4) +/* 1111 */ this._farSidePortalName = r.restoreString(); +/* 1112 */ this._farSidePortal = ((Portal)r.restoreMaybeNull()); +/* */ +/* 1114 */ if (vers == 1) { +/* 1115 */ String n = r.restoreString(); +/* 1116 */ if (!"".equals(n)) +/* 1117 */ setName(n); +/* 1118 */ } else if (vers >= 3) { +/* 1119 */ if (vers >= 7) { +/* 1120 */ this._farSideWorld = URL.restore(r); +/* */ } else +/* 1122 */ this._farSideWorld = URL.restore(r, ".world"); +/* 1123 */ this._farSideRoomName = r.restoreString(); +/* 1124 */ this._farx = r.restoreFloat(); +/* 1125 */ this._fary = r.restoreFloat(); +/* 1126 */ this._farz = r.restoreFloat(); +/* 1127 */ this._fartheta = r.restoreFloat(); +/* */ +/* 1129 */ Material initialCover = Material.restore(r); +/* 1130 */ Material downloadCover = Material.restore(r); +/* 1131 */ if (initialCover != null) { +/* 1132 */ setMaterial(initialCover); +/* */ +/* 1134 */ if ((downloadCover != null) && ( +/* 1135 */ (initialCover.textureName == null) || +/* */ +/* 1137 */ (!initialCover.textureName.equals(downloadCover.textureName)))) { +/* 1138 */ System.out.println( +/* 1139 */ "Both initial and download covers, " + +/* 1140 */ initialCover.textureName + " and " + +/* 1141 */ downloadCover.textureName + ", in " + +/* 1142 */ getName() + " -- using initial."); +/* */ } +/* */ } else { +/* 1145 */ setMaterial(downloadCover); +/* */ } +/* */ +/* 1148 */ if (vers >= 5) +/* 1149 */ this._farSideIsPortal = r.restoreBoolean(); +/* */ } +/* 1151 */ break; +/* */ case 8: +/* */ case 9: +/* 1154 */ super.restoreState(r); +/* 1155 */ this._farSideIsPortal = r.restoreBoolean(); +/* 1156 */ if (vers >= 9) +/* 1157 */ this._allowDownload = r.restoreBoolean(); +/* 1158 */ this._farSidePortalName = r.restoreString(); +/* 1159 */ this._farSidePortal = ((Portal)r.restoreMaybeNull()); +/* 1160 */ this._farSideWorld = URL.restore(r); +/* 1161 */ this._farSideRoomName = r.restoreString(); +/* 1162 */ this._farx = r.restoreFloat(); +/* 1163 */ this._fary = r.restoreFloat(); +/* 1164 */ this._farz = r.restoreFloat(); +/* 1165 */ this._fartheta = r.restoreFloat(); +/* 1166 */ break; +/* */ default: +/* 1168 */ throw new TooNewException(); +/* */ } +/* */ +/* 1171 */ if ((vers <= 4) && (this._farSideRoomName != null) && (this._farSidePortal == null) && +/* 1172 */ (this._farSidePortalName == null)) +/* */ { +/* 1174 */ this._farSideIsPortal = false; +/* */ } +/* */ +/* 1177 */ this._userFarx = this._farx; +/* 1178 */ this._userFary = this._fary; +/* 1179 */ this._userFarz = this._farz; +/* 1180 */ this._userFartheta = this._fartheta; +/* */ } +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 1185 */ super.postRestore(version); +/* 1186 */ if (getOwner() == null) +/* 1187 */ return; +/* 1188 */ addToRoom(getOwner()); +/* */ +/* 1190 */ if (this._farSidePortal == null) { +/* 1191 */ reset(); +/* */ } else +/* 1193 */ newFarSide(); +/* */ } +/* */ +/* */ public String toString() { +/* */ String to; +/* */ String to; +/* 1199 */ if (this._state == -1) { +/* 1200 */ to = "(not connected)"; +/* */ } else { String to; +/* 1202 */ if (this._farSideWorld != null) { +/* 1203 */ to = this._farSideWorld.toString(); +/* */ } else +/* 1205 */ to = ""; +/* 1206 */ if (this._farSideRoom != null) +/* 1207 */ to = to + "#" + this._farSideRoomName; +/* 1208 */ if (this._farSidePortalName != null) +/* 1209 */ to = to + "#" + this._farSidePortalName; +/* */ } +/* 1211 */ return super.toString() + "[Connected To " + to + "]"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Portal triggerLoad() +/* */ { +/* 1220 */ if ((this._farSideWorld != null) && (this._farSideRoomName != null)) +/* */ { +/* 1222 */ if ((this._farSidePortal != null) && (!this._farSidePortal.isActive())) { +/* 1223 */ reset(); +/* */ } +/* 1225 */ if (this._state == 0) { +/* 1226 */ this._state = 1; +/* 1227 */ World.load(this._farSideWorld, this); +/* */ } +/* */ } +/* 1230 */ return this; +/* */ } +/* */ +/* */ public void loadedURLSelf(URLSelf o, URL url, String err) +/* */ { +/* 1235 */ if (this.frozeFrameEvents) { +/* 1236 */ this.frozeFrameEvents = false; +/* 1237 */ Console.setFreezeFrameEvents(false); +/* */ } +/* */ +/* */ +/* */ +/* 1242 */ if (this._state != 1) { +/* 1243 */ return; +/* */ } +/* 1245 */ if ((err != null) || (!(o instanceof World))) +/* */ { +/* 1247 */ if (err == null) +/* */ { +/* 1249 */ err = "doesn't contain a World"; +/* 1250 */ o.decRef(); +/* */ } +/* */ +/* 1253 */ String readable = TeleportAction.getReadableNameOfWorld(url); +/* 1254 */ this._state = -1; +/* */ +/* 1256 */ if ((this._allowDownload) && (!World.isProscribed(url, false))) { +/* 1257 */ Object[] arguments = { new String(readable) }; +/* 1258 */ Console.println(MessageFormat.format( +/* 1259 */ Console.message("Dont-have-world"), arguments)); +/* */ +/* 1261 */ String packageName = TeleportAction.getPackageNameOfWorld(url); +/* */ +/* */ +/* */ +/* 1265 */ if (packageName != null) { +/* 1266 */ NetUpdate.loadWorld(packageName, false); +/* */ } +/* */ } +/* */ } else { +/* 1270 */ World w = (World)o; +/* 1271 */ setFarSideRoom(w.getRoom(this._farSideRoomName)); +/* 1272 */ if (this._farSideRoom != null) { +/* 1273 */ this._state = 2; +/* 1274 */ findFarSidePortal(true); +/* */ } else { +/* 1276 */ Object[] arguments = { new String(this._farSideRoomName), +/* 1277 */ new String(this._farSideWorld) }; +/* 1278 */ Console.println(MessageFormat.format( +/* 1279 */ Console.message("Cant-find-remote"), arguments)); +/* 1280 */ this._state = -1; +/* */ } +/* */ } +/* */ +/* 1284 */ updateVisible(); +/* */ } +/* */ +/* */ public Portal() {} +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ protected native void updateVisible(); +/* */ +/* */ native void setTransform(); +/* */ +/* */ public native void prerender(Camera paramCamera); +/* */ +/* */ public native void postrender(Camera paramCamera); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Portal.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PosableAction.java b/NET/worlds/scape/PosableAction.java new file mode 100644 index 0000000..6fd70ae --- /dev/null +++ b/NET/worlds/scape/PosableAction.java @@ -0,0 +1,102 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PosableAction +/* */ extends Action +/* */ { +/* 22 */ private String action = "wave"; +/* */ +/* */ +/* */ public PosableAction() {} +/* */ +/* */ +/* */ public PosableAction(String action) +/* */ { +/* 30 */ this.action = action; +/* 31 */ this.rightMenuLabel = action; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 36 */ SuperRoot o = getOwner(); +/* 37 */ if ((o instanceof PosableShape)) { +/* 38 */ ((PosableShape)o).animate(this.action); +/* 39 */ } else if ((o instanceof Drone)) { +/* 40 */ ((Drone)o).animate(this.action); +/* 41 */ } else if ((o instanceof Pilot)) { +/* 42 */ ((Pilot)o).animate(this.action); +/* */ } +/* 44 */ return null; +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 51 */ Object ret = null; +/* 52 */ switch (index - offset) { +/* */ case 0: +/* 54 */ if (mode == 0) { +/* 55 */ ret = StringPropertyEditor.make( +/* 56 */ new Property(this, index, "Action Name")); +/* 57 */ } else if (mode == 1) { +/* 58 */ ret = new String(this.action); +/* 59 */ } else if (mode == 2) { +/* 60 */ this.action = ((String)value); +/* */ } +/* 62 */ break; +/* */ default: +/* 64 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 66 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 70 */ return super.toString() + "[action " + this.action + "]"; +/* */ } +/* */ +/* */ +/* 74 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 78 */ s.saveVersion(0, classCookie); +/* 79 */ super.saveState(s); +/* */ +/* 81 */ s.saveString(this.action); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 86 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 88 */ super.restoreState(r); +/* 89 */ this.action = r.restoreString(); +/* 90 */ break; +/* */ +/* */ default: +/* 93 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PosableAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PosableDrone.java b/NET/worlds/scape/PosableDrone.java new file mode 100644 index 0000000..2bcf4b2 --- /dev/null +++ b/NET/worlds/scape/PosableDrone.java @@ -0,0 +1,327 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BBAnimateDroneCommand; +/* */ import NET.worlds.console.BlackBox; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.IOException; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PosableDrone +/* */ extends Drone +/* */ implements FrameHandler +/* */ { +/* 71 */ static boolean droneLoaderStarted = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 77 */ static { threadDroneLoads = IniFile.gamma().getIniInt("ThreadDroneLoading", 0) == 1; } +/* 78 */ static PosableDroneLoader droneLoader = new PosableDroneLoader(); +/* */ +/* */ +/* 81 */ private PosableShape pendingShape = null; +/* */ +/* */ public void SetPendingShape(PosableShape ps) { +/* 84 */ this.pendingShape = ps; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent evt) { +/* 88 */ if (this.pendingShape != null) +/* */ { +/* 90 */ PosableShape ps = getInternalPosableShape(); +/* 91 */ if (ps != null) { +/* 92 */ ps.detach(); +/* */ } +/* */ +/* */ +/* 96 */ add(this.pendingShape); +/* */ +/* */ +/* */ +/* 100 */ this.pendingShape = null; +/* */ } +/* */ +/* 103 */ return super.handle(evt); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public PosableDrone(ObjID objID, WorldServer serv, URL url) +/* */ { +/* 111 */ super(objID, serv); +/* 112 */ makeFigure(url); +/* */ } +/* */ +/* */ public PosableDrone(ObjID objID, WorldServer serv) { +/* 116 */ super(objID, serv); +/* 117 */ loadInit(); +/* */ } +/* */ +/* */ +/* */ public PosableDrone() {} +/* */ +/* */ public void loadInit() +/* */ { +/* 125 */ makeFigure(PosableShape.getDefaultURL()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized URL getPosableShapeURL() +/* */ { +/* 134 */ PosableShape ps = getInternalPosableShape(); +/* 135 */ if (ps == null) { +/* 136 */ return null; +/* */ } +/* 138 */ return ps.getURL(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Drone setAvatarNow(URL url) +/* */ { +/* 146 */ if ((!shouldBeMuted()) && ((url.endsWith(".rwx")) || (url.endsWith(".rwg")))) +/* */ { +/* 148 */ if (shouldBeForcedHuman()) { +/* 149 */ url = PosableShape.getHuman(url); +/* */ } +/* */ +/* 152 */ url = PosableShape.getPermitted(url, getWorld()); +/* */ +/* 154 */ PosableShape ps = getInternalPosableShape(); +/* */ +/* 156 */ if (ps != null) { +/* 157 */ if (url.equals(ps.getURL())) { +/* 158 */ return this; +/* */ } +/* 160 */ ps.detach(); +/* */ } +/* 162 */ makeFigure(url); +/* 163 */ return this; +/* */ } +/* 165 */ return super.setAvatarNow(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void makeFigure(URL url) +/* */ { +/* 185 */ boolean isPilot = false; +/* 186 */ if ((Console.getActive() != null) && +/* 187 */ (Console.getActive().getPilot() != null) && +/* 188 */ (Console.getActive().getPilot().hasContents())) { +/* 189 */ isPilot = Console.getActive().getPilot().contentsContain(this); +/* */ } +/* */ +/* */ +/* */ +/* 194 */ if (!isPilot) { +/* 195 */ isPilot = isPilotDrone(url); +/* */ } +/* 197 */ boolean loadAsynchronously = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ try +/* */ { +/* 206 */ if (!PosableDroneLoader.avatarExistsLocally(url)) { +/* 207 */ loadAsynchronously = true; +/* */ } else { +/* 209 */ loadAsynchronously = (!isPilot) && +/* 210 */ (!url.toString().equals(PosableShape.getDefaultURL().toString())); +/* */ } +/* */ } catch (MalformedURLException e) { +/* 213 */ loadAsynchronously = false; +/* */ } +/* */ +/* 216 */ if ((loadAsynchronously) && (threadDroneLoads)) { +/* 217 */ if (!droneLoaderStarted) { +/* 218 */ droneLoaderStarted = true; +/* 219 */ Thread t = new Thread(droneLoader, "DroneLoaderDaemon"); +/* 220 */ t.setDaemon(true); +/* 221 */ t.setPriority(1); +/* 222 */ t.start(); +/* */ } +/* */ +/* 225 */ droneLoader.load(this, url); +/* */ } else { +/* */ PosableShape ps; +/* */ PosableShape ps; +/* 229 */ if (VehicleShape.isVehicle(url)) { +/* 230 */ ps = new VehicleShape(url); +/* */ } else +/* 232 */ ps = new PosableShape(url); +/* 233 */ ps.setVisible(true); +/* 234 */ ps.setBumpable(false); +/* */ +/* 236 */ if (!isPilotDrone(url)) { +/* 237 */ ps.enableLOD(true); +/* */ } +/* 239 */ add(ps); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public PosableShape getInternalPosableShape() +/* */ { +/* 248 */ for (Enumeration e = getContents(); e.hasMoreElements();) { +/* 249 */ Object o = e.nextElement(); +/* 250 */ if ((o instanceof PosableShape)) +/* 251 */ return (PosableShape)o; +/* */ } +/* 253 */ return null; +/* */ } +/* */ +/* */ public boolean isPilotDrone(URL url) { +/* 257 */ if ((Console.getActive() != null) && +/* 258 */ (Console.getActive().pendingPilot.equals(url.toString()))) +/* */ { +/* 260 */ return true; +/* */ } +/* */ +/* */ +/* 264 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public float animate(String action) +/* */ { +/* 272 */ super.animate(action); +/* */ +/* 274 */ BlackBox.getInstance().submitEvent( +/* 275 */ new BBAnimateDroneCommand(getName(), action)); +/* */ +/* 277 */ PosableShape ps = getInternalPosableShape(); +/* 278 */ if (ps != null) { +/* 279 */ return ps.animate(action); +/* */ } +/* 281 */ return 0.0F; +/* */ } +/* */ +/* */ public Vector getAnimationList() { +/* 285 */ PosableShape ps = getInternalPosableShape(); +/* 286 */ if (ps != null) +/* 287 */ return ps.getAnimationList(); +/* 288 */ return super.getAnimationList(); +/* */ } +/* */ +/* */ +/* */ +/* 293 */ private static Object classCookie = new Object(); +/* */ public static boolean threadDroneLoads; +/* */ +/* 296 */ public void saveState(Saver s) throws IOException { s.saveVersion(2, classCookie); +/* 297 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 301 */ int vers = r.restoreVersion(classCookie); +/* 302 */ switch (vers) { +/* */ case 0: +/* */ case 1: +/* 305 */ if (vers == 0) { +/* 306 */ restoreStateDrone(r); +/* */ } else +/* 308 */ super.restoreState(r); +/* 309 */ r.setOldFlag(); +/* 310 */ makeFigure(URL.make("avatar:" + r.restoreString() + ".rwx")); +/* 311 */ break; +/* */ +/* */ case 2: +/* 314 */ super.restoreState(r); +/* 315 */ break; +/* */ +/* */ default: +/* 318 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PosableDrone.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PosableDroneLoader.java b/NET/worlds/scape/PosableDroneLoader.java new file mode 100644 index 0000000..e74879a --- /dev/null +++ b/NET/worlds/scape/PosableDroneLoader.java @@ -0,0 +1,261 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Archive; +/* */ import NET.worlds.network.URL; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PosableDroneLoader +/* */ implements Runnable +/* */ { +/* */ static final boolean debug = false; +/* */ DroneLoader loader; +/* 156 */ private static boolean useCachedFiles = ; +/* */ private Vector droneList; +/* */ +/* */ PosableDroneLoader() { +/* 160 */ this.droneList = new Vector(); +/* */ } +/* */ +/* 163 */ public static boolean usingCache() { return useCachedFiles; } +/* */ +/* */ public static PendingDrone makePendingDrone(PosableDrone _drone, URL _url) +/* */ { +/* 167 */ if (useCachedFiles) { +/* 168 */ return new PendingCacheDrone(_drone, _url); +/* */ } +/* 170 */ return new PendingDrone(_drone, _url); +/* */ } +/* */ +/* */ public void load(PosableDrone _drone, URL _url) +/* */ { +/* 175 */ PendingDrone pd = makePendingDrone(_drone, _url); +/* */ +/* 177 */ this.droneList.addElement(pd); +/* */ +/* */ +/* 180 */ if (this.loader != null) { this.loader.wakeUp(); +/* */ } +/* */ } +/* */ +/* */ public boolean isPending(PosableDrone _drone, URL _url) +/* */ { +/* 186 */ Vector listCopy = (Vector)this.droneList.clone(); +/* 187 */ Enumeration enums = listCopy.elements(); +/* 188 */ while (enums.hasMoreElements()) +/* */ { +/* 190 */ PendingDrone pd = (PendingDrone)enums.nextElement(); +/* 191 */ if (pd.getUrl().toString().equals(_url.toString())) +/* */ { +/* 193 */ if (pd.getDrone().toString().equals(_drone.toString())) +/* 194 */ return true; +/* */ } +/* */ } +/* 197 */ return false; +/* */ } +/* */ +/* */ public void run() +/* */ { +/* 202 */ this.loader = new DroneLoader(); +/* */ +/* */ for (;;) +/* */ { +/* 206 */ this.loader.load(this.droneList); +/* */ } +/* */ } +/* */ +/* */ public static String getAvatarBaseName(URL pUrl) +/* */ { +/* 212 */ String s = null; +/* */ +/* */ +/* 215 */ int dot = pUrl.getAbsolute().indexOf('.'); +/* 216 */ if (dot != -1) +/* */ { +/* 218 */ s = pUrl.getAbsolute().substring(7, dot); +/* */ } +/* */ +/* 221 */ return s; +/* */ } +/* */ +/* */ +/* */ public static boolean avatarExistsLocally(URL pUrl) +/* */ throws MalformedURLException +/* */ { +/* 228 */ if (useCachedFiles) { +/* 229 */ return false; +/* */ } +/* */ +/* 232 */ if (pUrl.toString().equals(PosableShape.getDefaultURL().toString())) +/* */ { +/* 234 */ return true; +/* */ } +/* */ +/* 237 */ if (!pUrl.getAbsolute().substring(0, 7).equals("avatar:")) { +/* 238 */ throw new MalformedURLException("Not an avatar URL"); +/* */ } +/* 240 */ String s = getAvatarBaseName(pUrl); +/* */ +/* 242 */ if (s == null) { +/* 243 */ throw new MalformedURLException("No file extension"); +/* */ } +/* 245 */ URL realFile = URL.make(pUrl, s + ".bod"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 253 */ return Archive.exists(realFile.unalias()); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PosableDroneLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PosableShape.java b/NET/worlds/scape/PosableShape.java new file mode 100644 index 0000000..db036c9 --- /dev/null +++ b/NET/worlds/scape/PosableShape.java @@ -0,0 +1,2679 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.AvMenu; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.core.ServerTableManager; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.core.Timer; +/* */ import NET.worlds.core.TimerCallback; +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.io.RandomAccessFile; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PosableShape +/* */ extends Shape +/* */ implements FrameHandler, Prerenderable, MouseDownHandler, ShapeLoaderListener, TimerCallback +/* */ { +/* 145 */ protected int figureType = -1; +/* 146 */ private float closestView = 10000.0F; +/* */ +/* */ private int farViewCount; +/* */ +/* */ private Vector animationList; +/* */ +/* */ private boolean COG; +/* */ +/* 154 */ private boolean setPrepFigure = true; +/* */ +/* */ +/* 157 */ private boolean runPrepFigure = this.setPrepFigure; +/* */ +/* */ +/* */ private static URL defaultURL; +/* */ +/* */ +/* */ public static URL getDefaultURL() +/* */ { +/* 165 */ return defaultURL; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 173 */ protected DroneAnimator animator = null; +/* */ +/* */ public PosableShape(URL url) { +/* 176 */ setURL(url); +/* */ } +/* */ +/* */ public PosableShape(URL url, boolean isAW) +/* */ { +/* 181 */ this.setPrepFigure = isAW; +/* */ +/* */ +/* 184 */ this.runPrepFigure = this.setPrepFigure; +/* */ +/* 186 */ setURL(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void loadInit() +/* */ { +/* 194 */ setURL(defaultURL); +/* */ } +/* */ +/* */ public void markVoid() +/* */ throws ClassCastException +/* */ { +/* 200 */ if (this.animator != null) { +/* 201 */ this.animator.endanimations(); +/* 202 */ if (this.figureType != -1) +/* 203 */ this.animator.delayedDeltype(this.figureType); +/* */ } +/* 205 */ this.animator = null; +/* */ +/* 207 */ getRoom().removePrerenderHandler(this); +/* */ +/* 209 */ super.markVoid(); +/* */ } +/* */ +/* */ public synchronized void recursiveAddRwChildren(WObject parent) +/* */ { +/* 214 */ if (hasClump()) { +/* 215 */ return; +/* */ } +/* 217 */ super.recursiveAddRwChildren(parent); +/* */ +/* 219 */ getRoom().addPrerenderHandler(this); +/* */ +/* */ +/* 222 */ if ((isFullyLoaded()) && (this.figureType != -1)) { +/* 223 */ DroneAnimator.addtype(this.figureType); +/* 224 */ if (this.runPrepFigure) +/* 225 */ DroneAnimator.prepFigure(this, this.COG); +/* 226 */ this.animator = new DroneAnimator(); +/* */ } +/* */ } +/* */ +/* 230 */ private boolean recomputeHeight = false; +/* */ private Shape subparts; +/* */ public static Color[] colorTable; +/* */ private int scanPos; +/* */ private static Material origMat; +/* */ +/* 236 */ public void notifyShapeLoaded(Shape s) { this.recomputeHeight = true; } +/* */ +/* */ public Transform getObjectToWorldMatrix() +/* */ { +/* 240 */ if (this.clumpID != 0) { +/* 241 */ return getJointedObjectToWorldMatrix(Transform.make()); +/* */ } +/* 243 */ return super.getObjectToWorldMatrix(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static int getFigureType(URL url) +/* */ { +/* 253 */ String bodyType = getBodyType(url); +/* 254 */ return bodyType == null ? -1 : DroneAnimator.getnameindex(bodyType); +/* */ } +/* */ +/* */ public static int getFigureType(String bodyType) { +/* 258 */ bodyType = getBodyType(bodyType); +/* 259 */ return bodyType == null ? -1 : DroneAnimator.getnameindex(bodyType); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void download(URL pUrl) +/* */ { +/* 270 */ PendingDrone pd = PosableDroneLoader.makePendingDrone(null, pUrl); +/* */ +/* */ +/* */ +/* */ +/* 275 */ Enumeration e = getComponentAvatars(pd.getUrl()); +/* 276 */ if (e != null) { +/* 277 */ while (e.hasMoreElements()) { +/* 278 */ String avURL = (String)e.nextElement(); +/* */ +/* */ +/* */ +/* */ +/* 283 */ pd.download(URL.make(avURL)); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public synchronized void setURL(URL newName) +/* */ { +/* 290 */ if ((newName == this.url) || ((newName != null) && (newName.equals(this.url)))) { +/* 291 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 296 */ if ((newName == null) || (!newName.toString().startsWith("avatar:lod"))) { +/* 297 */ if (newName != null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 304 */ download(newName); +/* */ +/* 306 */ int newType = getFigureType(newName); +/* 307 */ if (newType != this.figureType) { +/* 308 */ if (this.animator != null) { +/* 309 */ this.animator.endanimations(); +/* 310 */ if (this.figureType != -1) +/* 311 */ this.animator.delayedDeltype(this.figureType); +/* */ } +/* 313 */ this.animator = null; +/* */ +/* 315 */ this.figureType = newType; +/* */ +/* 317 */ this.animationList = null; +/* */ } +/* */ } +/* */ +/* 321 */ setBaseLODURL(newName); +/* 322 */ if ((forceLODLevel != -1) && (this.numDetailLevels > 0) && (this.doLOD)) { +/* 323 */ setLOD(0.0F); +/* 324 */ return; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 333 */ removeSubparts(); +/* */ +/* 335 */ if ((newName != null) && (newName.getAbsolute().startsWith("avatar:"))) { +/* */ try { +/* 337 */ createSubparts(newName); +/* */ } catch (MalformedURLException e) { +/* 339 */ System.out.println("Received bogus PosableShape URL: " + +/* 340 */ newName); +/* 341 */ return; +/* */ } +/* */ } +/* */ +/* 345 */ super.setURL(newName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String base64; +/* */ +/* */ +/* */ private static String[] permittedList; +/* */ +/* */ +/* */ private static String[] faceList; +/* */ +/* */ +/* */ private static String[] humanList; +/* */ +/* */ +/* */ private static String[] secretList; +/* */ +/* */ +/* */ private static Hashtable permittedHash; +/* */ +/* */ +/* */ private static Vector permittedNames; +/* */ +/* */ +/* */ private static Vector faceNames; +/* */ +/* */ +/* */ private static Hashtable humanHash; +/* */ +/* */ +/* */ private static Hashtable> worldHash; +/* */ +/* */ +/* */ private static Hashtable secretNames; +/* */ +/* */ +/* */ private static Hashtable faceTextures; +/* */ +/* */ +/* */ private String scanName(String s) +/* */ { +/* 389 */ int start = this.scanPos; +/* */ char c; +/* 391 */ while ((((c = s.charAt(this.scanPos)) >= 'a') && (c <= 'z')) || (c == '_')) { char c; +/* 392 */ this.scanPos += 1; } +/* 393 */ return s.substring(start, this.scanPos); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String readName(String s, int pos) +/* */ { +/* 401 */ int start = pos; +/* */ try { +/* */ char c; +/* */ do { do { char c; +/* 405 */ pos++; +/* 404 */ } while (((c = s.charAt(pos)) >= 'a') && (c <= 'z')); } while (c == '_'); +/* */ } +/* */ catch (StringIndexOutOfBoundsException localStringIndexOutOfBoundsException) {} +/* */ +/* 408 */ return s.substring(start, pos); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int scanInt(String s) +/* */ { +/* 418 */ int val = 0; +/* 419 */ char c; for (; ((c = s.charAt(this.scanPos)) >= '0') && (c <= '9'); this.scanPos += 1) { char c; +/* 420 */ val = 10 * val + (c - '0'); } +/* 421 */ return val; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static Material scanTexture(String name, int frame) +/* */ { +/* 435 */ if (frame <= 0) { +/* 436 */ name = "avatar:" + name + ".cmp"; +/* */ } else { +/* 438 */ name = "avatar:" + name + frame + "s*.mov"; +/* */ } +/* 440 */ Material m = new Material(0.32F, 0.55F, 0.0F, colorTable[3], null, 1.0F, +/* 441 */ true, false); +/* 442 */ m.loadTexture(URL.make(name)); +/* */ +/* 444 */ return m; +/* */ } +/* */ +/* */ public static Material readTexture(String s, int p) +/* */ { +/* 449 */ int frame = 0; +/* 450 */ char c; for (; ((c = s.charAt(p)) >= '0') && (c <= '9'); p++) { char c; +/* 451 */ frame = 10 * frame + (c - '0'); +/* */ } +/* 453 */ return scanTexture(readName(s, p), frame); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isValidTexture(String s) +/* */ { +/* 461 */ int len = s.length(); +/* */ +/* */ +/* */ +/* */ +/* 466 */ for (int i = 0; i < len; i++) { char c; +/* 467 */ if (((c = s.charAt(i)) < '0') || (c > '9')) +/* */ break; +/* */ } +/* 470 */ for (; i < len; i++) { char c; +/* 471 */ if ((((c = s.charAt(i)) < 'a') || (c > 'z')) && (c != '_')) +/* 472 */ return false; +/* */ } +/* 474 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static int scanBase64(char c) +/* */ { +/* 484 */ int i = base64.indexOf(c); +/* 485 */ if (i < 0) +/* 486 */ return 0; +/* 487 */ return i; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Material readColor(String s, int p) +/* */ { +/* 504 */ char c = s.charAt(p++); +/* 505 */ Material m = null; +/* */ +/* 507 */ if (c == '_') { +/* 508 */ int color = s.charAt(p++) - 'A'; +/* 509 */ if ((color < 0) || (color >= colorTable.length)) { +/* 510 */ m = origMat; +/* */ } else +/* 512 */ m = new Material(0.32F, 0.55F, 0.0F, colorTable[color], null, +/* 513 */ 1.0F, true, false); +/* */ } else { +/* 515 */ int r = 4 * scanBase64(c); +/* 516 */ int g = 4 * scanBase64(s.charAt(p++)); +/* 517 */ int b = 4 * scanBase64(s.charAt(p++)); +/* 518 */ m = new Material(0.32F, 0.55F, 0.0F, new Color(r, g, b), null, 1.0F, +/* 519 */ true, false); +/* */ } +/* */ +/* 522 */ return m; +/* */ } +/* */ +/* */ private Material scanColor(String s) { +/* 526 */ Material m = readColor(s, this.scanPos); +/* 527 */ if (s.charAt(this.scanPos) == '_') { +/* 528 */ this.scanPos += 2; +/* */ } else +/* 530 */ this.scanPos += 3; +/* 531 */ return m; +/* */ } +/* */ +/* */ +/* */ +/* */ private float getScale(char c) +/* */ { +/* 538 */ if ((c >= 'a') && (c <= 'z')) +/* 539 */ return 1.0F - (c - 'a' + 1) * 0.025615385F; +/* 540 */ if ((c >= 'A') && (c <= 'Z')) { +/* 541 */ return 1.0F / (1.0F - (c - 'A' + 1) * 0.025615385F); +/* */ } +/* 543 */ return 1.0F; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Material getMat(char c, Vector mats) +/* */ { +/* 553 */ int matNum = c - 'a'; +/* 554 */ if (matNum < mats.size()) { +/* 555 */ Material m = (Material)mats.elementAt(matNum); +/* 556 */ if (m == origMat) { +/* 557 */ return origMat; +/* */ } +/* 559 */ return (Material)m.clone(); +/* */ } +/* */ +/* 562 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Shape getLimb(String s, String bodyType, int pos, int partNum, Shape parent, Vector mats, boolean loadNow) +/* */ { +/* 578 */ int end = s.length() - 4; +/* */ +/* 580 */ if (bodyType == null) +/* */ { +/* 582 */ if ((parent instanceof PosableShape)) { +/* 583 */ bodyType = ""; +/* */ } else { +/* 585 */ bodyType = Shape.getBodBase(parent.getURL()); +/* */ +/* 587 */ if (parent.getURL().toString().indexOf("lod/") != -1) { +/* 588 */ bodyType = "lod/" + bodyType; +/* */ } +/* */ } +/* */ } +/* */ +/* 593 */ Shape shape = new Shape(); +/* 594 */ Shape subshape = shape; +/* 595 */ shape.setURL(URL.make("avatar:" + bodyType + partNum / 10 + partNum % +/* 596 */ 10 + ".bod")); +/* */ +/* 598 */ int clumpsUsed = 0; +/* 599 */ Material lastMat = null; +/* 600 */ int delay = 0; +/* 601 */ int lastTime = 0; +/* 602 */ String actName = null; +/* 603 */ boolean haveAddedChange = false; +/* */ +/* 605 */ if (pos > 0) { +/* 606 */ this.scanPos = (pos + 1); +/* */ do { +/* 608 */ char c = s.charAt(this.scanPos++); +/* 609 */ if ((c >= 'A') && (c <= 'Z')) { +/* 610 */ if (c == 'G') { +/* 611 */ int num = scanInt(s); +/* 612 */ if ((num <= 0) || (num > 99)) +/* 613 */ num = partNum; +/* 614 */ bodyType = scanName(s); +/* */ +/* */ +/* 617 */ if (bodyType.equals("")) { +/* */ break; +/* */ } +/* 620 */ subshape.setURL( +/* 621 */ URL.make("avatar:" + bodyType + num / 10 + num % +/* 622 */ 10 + ".bod")); +/* 623 */ } else if (c == 'S') +/* */ { +/* 625 */ char xScale = s.charAt(this.scanPos++); +/* 626 */ char yScale = s.charAt(this.scanPos++); +/* 627 */ char zScale = s.charAt(this.scanPos++); +/* */ +/* 629 */ if ((xScale == 'Z') && (yScale == 'Z') && +/* 630 */ (zScale == 'Z')) { +/* 631 */ this.runPrepFigure = false; +/* */ } +/* */ +/* 634 */ subshape.scale(getScale(xScale), getScale(yScale), +/* 635 */ getScale(zScale)); +/* 636 */ } else if (c != 'Q') +/* */ { +/* 638 */ if (c == 'C') { +/* 639 */ if (!$assertionsDisabled) throw new AssertionError(); +/* 640 */ } else if (c == 'D') +/* */ { +/* 642 */ delay += (int)(1000.0D * (Math.pow(1.0932D, +/* 643 */ scanBase64(s.charAt(this.scanPos++))) - 0.8999999761581421D)); +/* 644 */ } else if (c == 'A') { +/* 645 */ actName = scanName(s); +/* */ +/* */ +/* 648 */ this.animationList = null; +/* 649 */ } else if ((c == 'T') || (c == 'C')) +/* */ { +/* 651 */ System.out.println("Illegal av " + this.url); +/* */ } +/* */ else { +/* 654 */ this.scanPos -= 1; +/* 655 */ break; +/* */ } +/* 657 */ } } else if (c >= 'a') +/* */ { +/* 659 */ Material m = getMat(c, mats); +/* 660 */ if (m != null) { +/* 661 */ if (delay == 0) +/* 662 */ delay = 50; +/* 663 */ lastTime += delay; +/* */ +/* */ +/* */ +/* */ +/* 668 */ if (lastMat != null) { +/* 669 */ if (!haveAddedChange) { +/* 670 */ haveAddedChange = true; +/* 671 */ addChange(lastTime - delay, lastMat, subshape); +/* */ } +/* */ +/* 674 */ addChange(lastTime, m, subshape); +/* */ } +/* 676 */ if (m != origMat) +/* 677 */ subshape.setMaterial(m); +/* 678 */ lastMat = m; +/* 679 */ delay = 0; +/* */ } +/* 681 */ } else { if ((c < '0') || (c > '9')) break; +/* 682 */ this.scanPos -= 1; +/* 683 */ int clumpNum = scanInt(s) - clumpsUsed; +/* 684 */ clumpsUsed++; +/* */ +/* 686 */ subshape = new SubclumpShape(); +/* 687 */ subshape.setURL(URL.make("system:subclump" + clumpNum)); +/* 688 */ shape.add(subshape); +/* */ +/* 690 */ lastMat = null; +/* 691 */ haveAddedChange = false; +/* 692 */ lastTime = 0; +/* 693 */ delay = 0; +/* */ +/* */ } +/* */ +/* */ } +/* 698 */ while (this.scanPos <= end); +/* 699 */ this.scanPos = end; +/* 700 */ return parent; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 706 */ if (bodyType.equals("")) { +/* 707 */ return parent; +/* */ } +/* 709 */ shape.addLoadListener(this); +/* */ +/* 711 */ if ((ProgressiveAdder.get().enabled()) && (!loadNow)) { +/* 712 */ ProgressiveAdder.get().scheduleForAdd(parent, shape); +/* */ } else { +/* 714 */ parent.add(shape); +/* */ } +/* 716 */ if (this.subparts == null) { +/* 717 */ this.subparts = shape; +/* */ } +/* 719 */ return shape; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void addChange(int when, Material mat, Shape s) +/* */ { +/* 727 */ TimedMatChange t = new TimedMatChange(); +/* 728 */ t.when = when; +/* 729 */ t.mat = mat; +/* 730 */ t.limb = s; +/* 731 */ mat.setKeepLoaded(true); +/* */ +/* */ +/* 734 */ int i = 0; +/* 735 */ if (this.expressionChanges == null) { +/* 736 */ this.expressionChanges = new Vector(); +/* 737 */ this.expressionStart = Std.getRealTime(); +/* 738 */ this.nextChange = 0; +/* */ } else { +/* 740 */ for (i = this.expressionChanges.size(); i > 0; i--) { +/* 741 */ TimedMatChange o = +/* 742 */ (TimedMatChange)this.expressionChanges.elementAt(i - 1); +/* 743 */ if (when >= o.when) { +/* */ break; +/* */ } +/* */ } +/* */ } +/* 748 */ this.expressionChanges.insertElementAt(t, i); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Enumeration getComponentAvatars(URL pUrl) +/* */ { +/* 757 */ if (pUrl == null) { +/* 758 */ return null; +/* */ } +/* 760 */ Vector v = new Vector(); +/* */ +/* 762 */ String urlString = pUrl.getAbsolute(); +/* 763 */ if ((!urlString.startsWith("avatar:")) || (!urlString.endsWith(".rwg"))) { +/* 764 */ return null; +/* */ } +/* 766 */ String baseAv = urlString.substring(7, urlString.indexOf('.')); +/* 767 */ v.addElement("avatar:" + baseAv + ".rwg"); +/* */ +/* 769 */ int pos = urlString.indexOf('.'); +/* 770 */ int len = urlString.length() - 4; +/* 771 */ while (pos < len) { +/* 772 */ char c = urlString.charAt(pos++); +/* 773 */ if ((c >= 'A') && (c <= 'Z')) { +/* 774 */ switch (c) { +/* */ case 'C': +/* 776 */ c = urlString.charAt(pos++); +/* 777 */ if (c == '_') { +/* 778 */ pos++; +/* */ } else +/* 780 */ pos += 2; +/* 781 */ break; +/* */ case 'D': +/* 783 */ pos++; +/* 784 */ break; +/* */ case 'S': +/* 786 */ pos += 3; +/* 787 */ break; +/* */ +/* */ case 'A': +/* */ case 'Q': +/* */ case 'T': +/* */ break; +/* */ +/* */ +/* */ case 'G': +/* 796 */ while (pos < len) +/* */ { +/* 798 */ c = urlString.charAt(pos); +/* 799 */ if ((c < '0') || (c > '9')) +/* */ break; +/* 801 */ pos++; +/* */ } +/* */ +/* */ +/* 805 */ String bodyType = ""; +/* */ +/* 807 */ while (pos < len) +/* */ { +/* 809 */ c = urlString.charAt(pos); +/* */ +/* 811 */ if ((c >= '0') && (c <= '9')) { +/* */ break; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 820 */ if ((c < 'a') || (c > 'z')) { +/* */ break; +/* */ } +/* 823 */ bodyType = bodyType + c; +/* 824 */ pos++; +/* */ } +/* */ +/* 827 */ if ((bodyType != "") && (bodyType.length() > 1)) +/* */ { +/* */ +/* 830 */ v.addElement("avatar:" + bodyType + ".rwg"); +/* */ } +/* */ +/* */ break; +/* */ } +/* */ +/* */ } +/* */ } +/* 838 */ return v.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static int skipLimb(String s, int pos) +/* */ { +/* 849 */ int len = s.length() - 4; +/* 850 */ while (pos < len) { +/* 851 */ char c = s.charAt(pos++); +/* 852 */ if ((c >= 'A') && (c <= 'Z')) {} +/* 853 */ switch (c) { +/* */ case 'C': +/* 855 */ c = s.charAt(pos++); +/* 856 */ if (c == '_') { +/* 857 */ pos++; +/* */ } else +/* 859 */ pos += 2; +/* 860 */ break; +/* */ case 'D': +/* 862 */ pos++; +/* 863 */ break; +/* */ case 'S': +/* 865 */ pos += 3; +/* 866 */ break; +/* */ case 'A': +/* */ case 'G': +/* */ case 'Q': +/* */ case 'T': +/* */ break; +/* */ default: +/* 873 */ return pos - 1; +/* */ +/* 875 */ continue; if (((c < 'a') || (c > 'z')) && ((c < '0') || (c > '9'))) { +/* */ break label178; +/* */ } +/* */ } +/* */ } +/* */ label178: +/* 881 */ return -1; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String findStarts(String s, int end, int[] offs, String bodyType, Vector mats) +/* */ { +/* 893 */ String lastTextureName = bodyType; +/* */ +/* 895 */ while (this.scanPos < end) { +/* 896 */ char section = s.charAt(this.scanPos); +/* 897 */ if ((section < 'A') || (section > 'Z')) { +/* 898 */ return s; +/* */ } +/* 900 */ offs[(section - 'A')] = (this.scanPos++); +/* */ +/* */ +/* 903 */ while (this.scanPos < end) { +/* 904 */ char c = s.charAt(this.scanPos++); +/* 905 */ if ((c >= 'A') && (c <= 'Z')) { +/* 906 */ if (c == 'G') +/* */ { +/* 908 */ scanInt(s); +/* 909 */ scanName(s); +/* 910 */ } else if (c == 'S') +/* */ { +/* 912 */ this.scanPos += 3; +/* 913 */ } else if (c != 'Q') +/* */ { +/* 915 */ if ((c == 'C') || (c == 'T')) { +/* 916 */ int start = this.scanPos - 1; +/* */ +/* */ +/* */ +/* 920 */ char letter = (char)(97 + mats.size()); +/* */ +/* */ Material mat; +/* */ +/* */ Material mat; +/* 925 */ if (c == 'C') { +/* 926 */ mat = scanColor(s); +/* */ } +/* */ else { +/* 929 */ int num = scanInt(s); +/* */ +/* */ +/* */ +/* 933 */ String name = scanName(s); +/* 934 */ if (name.equals("")) { +/* 935 */ name = lastTextureName; +/* */ } else +/* 937 */ lastTextureName = name; +/* 938 */ mat = scanTexture(name, num); +/* */ } +/* 940 */ mats.addElement(mat); +/* */ +/* 942 */ s = s.substring(0, start) + 'Q' + letter + +/* 943 */ s.substring(this.scanPos); +/* 944 */ int cutLen = this.scanPos - start - 2; +/* 945 */ this.scanPos -= cutLen; +/* 946 */ end -= cutLen; +/* 947 */ } else if (c == 'D') +/* */ { +/* 949 */ this.scanPos += 1; +/* 950 */ } else if (c == 'A') { +/* 951 */ scanName(s); +/* */ } +/* */ else { +/* 954 */ this.scanPos -= 1; +/* 955 */ break; +/* */ } +/* 957 */ } } else if ((c < '0') || (c > '9')) +/* */ { +/* 959 */ if ((c < 'a') || (c > 'z')) +/* */ { +/* 961 */ return s.substring(0, this.scanPos - 1) + ".rwg"; +/* */ } +/* */ } +/* */ } +/* */ } +/* 966 */ return s; +/* */ } +/* */ +/* */ static +/* */ { +/* 162 */ defaultURL = URL.make("avatar:aura.0PG.rwg"); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 350 */ colorTable = new Color[] { new Color(0, 0, 0), +/* 351 */ new Color(51, 102, 204), +/* 352 */ new Color(234, 162, 115), +/* 353 */ new Color(255, 102, 51), +/* 354 */ new Color(255, 153, 204), +/* 355 */ new Color(139, 232, 0), +/* 356 */ new Color(43, 131, 0), +/* 357 */ new Color(51, 51, 153), +/* 358 */ new Color(145, 51, 204), +/* 359 */ new Color(153, 204, 255), +/* 360 */ new Color(204, 51, 102), +/* 361 */ new Color(0, 204, 102), +/* 362 */ new Color(255, 204, 102), +/* 363 */ new Color(102, 102, 102), +/* 364 */ new Color(254, 123, 26), +/* 365 */ new Color(255, 51, 153), +/* 366 */ new Color(188, 51, 204), +/* 367 */ new Color(204, 0, 38), +/* 368 */ new Color(118, 0, 0), +/* 369 */ new Color(153, 102, 51), +/* 370 */ new Color(196, 196, 196), +/* 371 */ new Color(204, 153, 255), +/* 372 */ new Color(255, 255, 255), +/* 373 */ new Color(255, 179, 2), +/* 374 */ new Color(247, 227, 2), +/* 375 */ new Color(255, 255, 153) }; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 428 */ origMat = new Material(null); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 477 */ base64 = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+"; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 982 */ permittedList = ServerTableManager.instance() +/* 983 */ .getTable("permittedList"); +/* */ +/* */ +/* */ +/* 987 */ faceList = ServerTableManager.instance().getTable( +/* 988 */ "faceList"); +/* */ +/* 990 */ humanList = ServerTableManager.instance().getTable( +/* 991 */ "humanList"); +/* */ +/* */ +/* 994 */ secretList = ServerTableManager.instance() +/* 995 */ .getTable("secretList"); +/* */ +/* 997 */ permittedHash = new Hashtable(); +/* 998 */ permittedNames = new Vector(); +/* 999 */ faceNames = new Vector(); +/* 1000 */ humanHash = new Hashtable(); +/* 1001 */ worldHash = new Hashtable(); +/* 1002 */ secretNames = new Hashtable(); +/* 1003 */ faceTextures = new Hashtable(); +/* */ +/* */ +/* 1006 */ if (!NetUpdate.isInternalVersion()) { +/* 1007 */ for (int i = 0; i < secretList.length; i++) { +/* 1008 */ secretNames.put(secretList[i], secretList[i]); +/* */ } +/* */ } +/* */ +/* 1012 */ for (int i = 0; i < permittedList.length; i += 2) { +/* 1013 */ if (secretNames.get(permittedList[i]) == null) { +/* 1014 */ permittedNames.addElement(permittedList[i]); +/* 1015 */ if (permittedList[(i + 1)].indexOf("DgT") >= 0) { +/* 1016 */ faceNames.addElement(permittedList[i]); +/* */ } +/* */ } +/* 1019 */ if (permittedList[(i + 1)] != null) { +/* 1020 */ permittedHash.put(permittedList[i], permittedList[(i + 1)]); +/* */ } +/* */ } +/* 1023 */ for (int i = 1; i < humanList.length; i += 2) { +/* 1024 */ humanHash.put(humanList[(i - 1)], humanList[i]); +/* */ } +/* 1026 */ for (int i = 0; i < faceList.length; i += 2) { +/* 1027 */ faceTextures.put(faceList[i], faceList[(i + 1)]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public static Vector getPermittedNames() +/* */ { +/* 1035 */ return permittedNames; +/* */ } +/* */ +/* */ +/* */ +/* */ public static String[] getPermittedList() +/* */ { +/* 1042 */ return permittedList; +/* */ } +/* */ +/* 1045 */ static boolean gotServerAvatarList = false; +/* 1046 */ static boolean serverAvatarListError = false; +/* */ +/* */ private Enumeration animations; +/* */ +/* */ public static void downloadPermittedNames() +/* */ { +/* 1052 */ if (gotServerAvatarList) { +/* 1053 */ return; +/* */ } +/* 1055 */ serverAvatarListError = false; +/* */ +/* */ +/* 1058 */ WorldServer w = Pilot.getActive().getServer(); +/* 1059 */ if ((w != null) && (w.getGalaxy() != null)) { +/* 1060 */ String avatarList = Console.getActive().getScriptServer() + +/* 1061 */ "getavlist.pl?u=" + w.getGalaxy().getChatname(); +/* */ +/* 1063 */ if (w.getGalaxy().getSerialNum() != null) { +/* 1064 */ avatarList = avatarList + "&s=" + w.getGalaxy().getSerialNum(); +/* */ } +/* */ +/* 1067 */ URL avatarListURL = URL.make(avatarList); +/* 1068 */ CacheFile cf = Cache.getFile(avatarListURL, true); +/* 1069 */ cf.waitUntilLoaded(); +/* 1070 */ if (!cf.error()) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1079 */ permittedNames.removeAllElements(); +/* 1080 */ humanHash.clear(); +/* 1081 */ worldHash.clear(); +/* */ try +/* */ { +/* 1084 */ RandomAccessFile f = new RandomAccessFile( +/* 1085 */ cf.getLocalName(), "r"); +/* 1086 */ while (f.getFilePointer() < f.length()) { +/* 1087 */ String line = f.readLine(); +/* */ +/* */ +/* 1090 */ if (!line.startsWith("//")) +/* */ { +/* 1092 */ StringTokenizer st = new StringTokenizer(line); +/* 1093 */ if (st.countTokens() > 2) { +/* 1094 */ String name = st.nextToken(); +/* 1095 */ permittedNames.addElement(name); +/* 1096 */ String gender = st.nextToken(); +/* 1097 */ if ((gender.equals("m")) || (gender.equals("f"))) +/* 1098 */ humanHash.put(name, gender); +/* 1099 */ Vector worldList = new Vector(); +/* 1100 */ while (st.hasMoreTokens()) { +/* 1101 */ worldList.addElement(st.nextToken()); +/* */ } +/* 1103 */ worldHash.put(name, worldList); +/* */ } +/* */ } +/* */ } +/* 1107 */ f.close(); +/* */ } catch (Exception e) { +/* 1109 */ System.out.println("Error parsing avatar list: " + +/* 1110 */ e.toString()); +/* 1111 */ serverAvatarListError = true; +/* 1112 */ return; +/* */ } +/* */ +/* 1115 */ gotServerAvatarList = true; +/* */ +/* */ +/* */ +/* */ +/* 1120 */ Console c = Console.getActive(); +/* 1121 */ if ((c instanceof DefaultConsole)) { +/* 1122 */ DefaultConsole dc = (DefaultConsole)c; +/* 1123 */ dc.getAvatarMenu().rebuildVIPMenu(); +/* */ } +/* */ +/* */ +/* */ +/* 1128 */ if (c.getPilot() != null) { +/* 1129 */ c.getPilot().resetAvatarNow(); +/* */ } +/* */ +/* */ +/* */ +/* 1134 */ AvMenu.rebuildHeadList(); +/* */ } else { +/* 1136 */ serverAvatarListError = true; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static URL getPermitted(URL in, World world) +/* */ { +/* 1146 */ if (in.endsWith(".mov")) { +/* 1147 */ return in; +/* */ } +/* */ +/* 1150 */ if (NetUpdate.isInternalVersion()) { +/* 1151 */ return in; +/* */ } +/* 1153 */ if ((!gotServerAvatarList) && (!serverAvatarListError)) +/* */ { +/* 1155 */ return in; +/* */ } +/* */ +/* 1158 */ if (serverAvatarListError) +/* */ { +/* */ +/* */ +/* 1162 */ if (validateAvatar(in.getAbsolute())) { +/* 1163 */ return in; +/* */ } +/* 1165 */ return getDefAv(); +/* */ } +/* */ +/* */ +/* */ +/* 1170 */ Enumeration e = getComponentAvatars(in); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1183 */ while ((e != null) && (e.hasMoreElements())) { +/* 1184 */ String baseAv = (String)e.nextElement(); +/* */ +/* 1186 */ String s = getBodyType(URL.make(baseAv)); +/* 1187 */ if (s == null) +/* */ { +/* */ +/* 1190 */ return getDefAv(); +/* */ } +/* */ +/* 1193 */ Vector allowedWorlds = (Vector)worldHash.get(s); +/* 1194 */ if (allowedWorlds == null) +/* */ { +/* */ +/* 1197 */ return getDefAv(); +/* */ } +/* */ +/* 1200 */ boolean worldOK = false; +/* 1201 */ Enumeration we = allowedWorlds.elements(); +/* 1202 */ while (we.hasMoreElements()) { +/* 1203 */ String thisWorld = (String)we.nextElement(); +/* 1204 */ if (thisWorld == null) { +/* 1205 */ return getDefAv(); +/* */ } +/* 1207 */ if (thisWorld.equals("all")) { +/* 1208 */ worldOK = true; +/* 1209 */ break; +/* */ } +/* */ +/* */ +/* */ +/* 1214 */ thisWorld = thisWorld.replace('_', ' ').toLowerCase().trim(); +/* */ +/* 1216 */ if (world != null) { +/* 1217 */ if (thisWorld.equals(world.toString().toLowerCase().trim())) { +/* 1218 */ worldOK = true; +/* 1219 */ break; +/* */ } +/* */ } else { +/* 1222 */ worldOK = true; +/* */ } +/* */ } +/* */ +/* 1226 */ if (!worldOK) { +/* 1227 */ return getDefAv(); +/* */ } +/* */ } +/* 1230 */ return in; +/* */ } +/* */ +/* */ +/* */ +/* */ public static Vector getFaceNames() +/* */ { +/* 1237 */ return faceNames; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static URL getAvURL(String bodyType) +/* */ { +/* 1245 */ Object newName = permittedHash.get(bodyType); +/* 1246 */ if ((newName instanceof String)) { +/* 1247 */ return URL.make("avatar:" + (String)newName); +/* */ } +/* 1249 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ public static boolean validateAvatar(String av) +/* */ { +/* 1256 */ System.out.println("Validating " + av); +/* 1257 */ String baseAv = getBodyType(URL.make(av)); +/* 1258 */ if (baseAv == null) +/* 1259 */ return false; +/* 1260 */ if (permittedHash.get(baseAv) != null) { +/* 1261 */ return true; +/* */ } +/* 1263 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String convertLODToParent(String bodyType) +/* */ { +/* 1271 */ String result = bodyType; +/* */ +/* 1273 */ if (result.startsWith("lod/")) +/* */ { +/* 1275 */ result = result.substring(4, result.length() - 1); +/* */ } +/* 1277 */ return result; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String getBodyType(URL url) +/* */ { +/* 1285 */ if (url == null) { +/* 1286 */ return null; +/* */ } +/* */ +/* 1289 */ String str = url.getAbsolute(); +/* */ +/* 1291 */ if ((!str.startsWith("avatar:")) || ((!str.endsWith(".rwg")) && +/* 1292 */ (!str.endsWith(".RWG"))) || (str.charAt(7) == '.')) { +/* 1293 */ return null; +/* */ } +/* 1295 */ int pos = str.indexOf(".", 7); +/* 1296 */ String bodyType = str.substring(7, pos).toLowerCase(); +/* 1297 */ bodyType = convertLODToParent(bodyType); +/* 1298 */ if (str.charAt(pos + 1) != '0') +/* */ { +/* 1300 */ bodyType = getBodyType(bodyType); +/* */ } +/* */ +/* 1303 */ return bodyType; +/* */ } +/* */ +/* */ static URL getDefAv() +/* */ { +/* 1308 */ return URL.make(IniFile.override().getIniString("DefaultArticAv", +/* 1309 */ "avatar:willy.rwg")); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static URL getHuman(URL url) +/* */ { +/* 1321 */ if (url.endsWith(".mov")) { +/* 1322 */ return HoloDrone.getHuman(url); +/* */ } +/* 1324 */ String s = getBodyType(url); +/* 1325 */ if (s == null) { +/* 1326 */ return getDefAv(); +/* */ } +/* 1328 */ String gender = (String)humanHash.get(s); +/* 1329 */ if (gender == null) { +/* 1330 */ return getDefAv(); +/* */ } +/* 1332 */ URL def = URL.make("avatar:" + s + ".rwg"); +/* */ +/* */ +/* 1335 */ String str = url.getAbsolute(); +/* 1336 */ int pos = str.indexOf(".0EC_"); +/* 1337 */ if ((pos < 0) || (str.length() < pos + 7) || +/* 1338 */ ("_AC".indexOf(str.charAt(pos + 5)) < 0)) { +/* 1339 */ return def; +/* */ } +/* */ +/* 1342 */ if ((gender.equals("m")) && (str.indexOf("yank") >= 0) && ( +/* 1343 */ (!str.regionMatches(pos + 6, "TyankshirtC_", 0, 12)) || +/* */ +/* 1345 */ (!str.regionMatches(pos + 19, "C-2bTyankstripe", 0, 15)))) { +/* 1346 */ return def; +/* */ } +/* */ +/* */ +/* 1350 */ pos = str.lastIndexOf("HDgT2"); +/* 1351 */ if ((pos < 0) || (str.length() < pos + 7)) { +/* 1352 */ return def; +/* */ } +/* 1354 */ String faceGender = (String)humanHash.get(readName(str, pos + 5)); +/* 1355 */ if ((faceGender == null) || (!faceGender.equals(gender))) { +/* 1356 */ return def; +/* */ } +/* */ +/* 1359 */ pos = str.lastIndexOf("NS"); +/* 1360 */ if ((pos < 0) || (str.length() < pos + 3) || +/* 1361 */ ("0abcdABCD".indexOf(str.charAt(pos + 2)) < 0)) { +/* 1362 */ return def; +/* */ } +/* */ +/* 1365 */ pos += 5; +/* 1366 */ if (str.length() < pos + 2) { +/* 1367 */ return def; +/* */ } +/* 1369 */ if (str.charAt(pos) == 'G') { +/* 1370 */ String headGender = (String)humanHash.get(readName(str, +/* 1371 */ pos + 1)); +/* 1372 */ if ((headGender == null) || (!headGender.equals(gender))) { +/* 1373 */ return def; +/* */ } +/* */ } +/* 1376 */ return url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public URL getHuman() +/* */ { +/* 1384 */ return getHuman(getURL()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static String getBodyType(String basename) +/* */ { +/* 1392 */ String str = (String)permittedHash.get(basename); +/* 1393 */ if (str != null) { +/* 1394 */ basename = str.substring(0, str.indexOf(".")); +/* */ } +/* 1396 */ return basename; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static int getMatPosition(String str, char type) +/* */ { +/* 1405 */ int index = "abcdef".indexOf(type); +/* 1406 */ if (index >= 0) { +/* 1407 */ int p = str.indexOf(".0E"); +/* 1408 */ if (p >= 0) { +/* 1409 */ p += 3; +/* */ +/* 1411 */ for (int i = 0; i < index; i++) +/* 1412 */ p = skipMat(str, p); +/* */ } +/* 1414 */ return p; +/* */ } +/* 1416 */ int p = str.indexOf(".0E"); +/* 1417 */ if (p >= 0) { +/* 1418 */ p += 2; +/* 1419 */ while (p >= 0) { +/* 1420 */ if (str.charAt(p++) == type) { +/* 1421 */ return p; +/* */ } +/* 1423 */ p = skipLimb(str, p); +/* */ } +/* */ } +/* 1426 */ return p; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static String getCurrentAvCustomizable() +/* */ { +/* 1437 */ URL av = Pilot.getActive().getSourceURL(); +/* */ +/* 1439 */ String str = av.getAbsolute(); +/* */ +/* 1441 */ if ((!str.startsWith("avatar:")) || ((!str.endsWith(".rwg")) && +/* 1442 */ (!str.endsWith(".RWG"))) || (str.charAt(7) == '.')) { +/* 1443 */ Console.println(Console.message("non-cust-av")); +/* 1444 */ return null; +/* */ } +/* */ +/* 1447 */ int pos = str.indexOf(".", 7); +/* */ +/* 1449 */ if (!str.regionMatches(pos, ".0E", 0, 3)) +/* */ { +/* 1451 */ av = getAvURL(str.substring(7, pos).toLowerCase()); +/* 1452 */ if (av == null) +/* */ { +/* 1454 */ if (!str.substring(pos).equalsIgnoreCase(".rwg")) { +/* 1455 */ Console.println(Console.message("cant-cust-av")); +/* 1456 */ return null; +/* */ } +/* */ +/* 1459 */ str = +/* */ +/* */ +/* 1462 */ "avatar:" + str.substring(7, pos) + ".0EC__C__C__C__C__C__" + "PeBbLcMcOaRcUcVaWeXeYIeJeK" + "NS000QaHDgT2tonyT3T2T1Q0f.rwg"; +/* */ } else { +/* 1464 */ str = av.getAbsolute(); +/* */ } +/* */ } +/* 1467 */ return str; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static int skipMat(String s, int i) +/* */ { +/* 1475 */ char c = s.charAt(i); +/* 1476 */ int matEnd = i; +/* 1477 */ if (c == 'C') { +/* 1478 */ c = s.charAt(i + 1); +/* 1479 */ if (c == '_') { +/* 1480 */ matEnd = i + 3; +/* */ } else +/* 1482 */ matEnd = i + 4; +/* 1483 */ } else if (c == 'T') { +/* 1484 */ matEnd = i + 1; +/* 1485 */ for (;;) { matEnd++; if ((c = s.charAt(matEnd)) >= '0') if (c > '9') break; +/* */ } +/* 1487 */ do { matEnd++; if ((c = s.charAt(matEnd)) < 'a') break; } while (c <= 'z'); +/* */ } +/* 1489 */ else if ((c >= 'a') && (c <= 'z')) { +/* 1490 */ matEnd = i + 1; +/* */ } +/* 1492 */ return matEnd; +/* */ } +/* */ +/* */ public static String getFace(String bodyType) { +/* 1496 */ Object face = faceTextures.get(bodyType); +/* 1497 */ if (face != null) { +/* 1498 */ return (String)face; +/* */ } +/* */ +/* 1501 */ return "1" + bodyType; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void createSubparts(URL url) +/* */ throws MalformedURLException +/* */ { +/* 1510 */ String str = url.getAbsolute(); +/* 1511 */ int len = str.length(); +/* */ +/* 1513 */ String bodyType = null; +/* */ +/* */ +/* 1516 */ this.runPrepFigure = this.setPrepFigure; +/* */ +/* */ +/* 1519 */ if ((!str.startsWith("avatar:")) || ((!str.endsWith(".rwg")) && +/* 1520 */ (!str.endsWith(".RWG"))) || (str.charAt(7) == '.')) { +/* 1521 */ this.scanPos = 0; +/* 1522 */ str = ".rwg"; +/* 1523 */ bodyType = "aura"; +/* */ } else { +/* 1525 */ this.scanPos = str.indexOf(".", 7); +/* 1526 */ bodyType = str.substring(7, this.scanPos).toLowerCase(); +/* */ +/* 1528 */ if (str.charAt(this.scanPos + 1) != '0') { +/* 1529 */ this.scanPos = (len - 4); +/* */ +/* */ +/* 1532 */ Object newName = permittedHash.get(bodyType); +/* 1533 */ if (newName != null) { +/* 1534 */ str = (String)newName; +/* 1535 */ this.scanPos = 0; +/* 1536 */ bodyType = scanName(str); +/* 1537 */ if (str.charAt(this.scanPos) != '.') +/* 1538 */ throw new MalformedURLException(); +/* 1539 */ if (str.charAt(this.scanPos + 1) != '0') +/* 1540 */ throw new MalformedURLException(); +/* 1541 */ this.scanPos += 2; +/* */ } +/* */ } else { +/* 1544 */ this.scanPos += 2; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 1550 */ Vector mats = new Vector(); +/* */ +/* */ +/* 1553 */ int[] offsets = new int[26]; +/* 1554 */ str = findStarts(str, str.length() - 4, offsets, bodyType, mats); +/* */ +/* 1556 */ if (this.subparts != null) { +/* 1557 */ throw new MalformedURLException(); +/* */ } +/* */ +/* */ +/* 1561 */ Shape groi = getLimb(str, bodyType, offsets[15], 1, this, mats, true); +/* */ +/* 1563 */ Shape back = getLimb(str, null, offsets[1], 2, groi, mats, false); +/* 1564 */ Shape neck = getLimb(str, null, offsets[13], 3, back, mats, false); +/* 1565 */ Shape head = getLimb(str, null, offsets[7], 4, neck, mats, false); +/* 1566 */ Shape lupa = getLimb(str, null, offsets[11], 11, back, mats, false); +/* 1567 */ Shape lfor = getLimb(str, null, offsets[12], 12, lupa, mats, false); +/* 1568 */ Shape lhan = getLimb(str, null, offsets[14], 13, lfor, mats, false); +/* 1569 */ Shape rupa = getLimb(str, null, offsets[17], 6, back, mats, false); +/* 1570 */ Shape rfor = getLimb(str, null, offsets[20], 7, rupa, mats, false); +/* 1571 */ Shape rhan = getLimb(str, null, offsets[21], 8, rfor, mats, false); +/* 1572 */ Shape lthi = getLimb(str, null, offsets[8], 19, groi, mats, false); +/* 1573 */ Shape lcal = getLimb(str, null, offsets[9], 20, lthi, mats, false); +/* 1574 */ Shape lfoo = getLimb(str, null, offsets[10], 21, lcal, mats, false); +/* 1575 */ Shape rthi = getLimb(str, null, offsets[22], 15, groi, mats, false); +/* 1576 */ Shape rcal = getLimb(str, null, offsets[23], 16, rthi, mats, false); +/* 1577 */ Shape rfoo = getLimb(str, null, offsets[24], 17, rcal, mats, false); +/* 1578 */ Shape tail = getLimb(str, null, offsets[25], 24, groi, mats, false); +/* */ } +/* */ +/* */ protected void removeSubparts() +/* */ { +/* 1583 */ if (this.subparts != null) { +/* 1584 */ this.subparts.discard(); +/* 1585 */ this.subparts = null; +/* 1586 */ this.actions = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void prerender(Camera cam) +/* */ { +/* 1598 */ if (!getVisible()) { +/* 1599 */ return; +/* */ } +/* 1601 */ Point3Temp p = inCamSpace(cam); +/* */ +/* */ +/* */ +/* 1605 */ boolean v = (p != null) && (p.z > 1.0F) && (p.x < p.z) && (-p.x < p.z); +/* */ +/* */ +/* */ +/* */ +/* 1610 */ if (v) { +/* 1611 */ if (this.closestView > p.z) +/* 1612 */ this.closestView = p.z; +/* 1613 */ if ((p.z > 700.0F) && +/* 1614 */ (++this.farViewCount > 10)) { +/* 1615 */ if (this.closestView > 400.0F) +/* 1616 */ this.closestView = 400.0F; +/* 1617 */ this.farViewCount = 0; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float animate(String action) +/* */ { +/* 1628 */ if (this.animator != null) +/* */ { +/* */ +/* 1631 */ if (action.length() == 1) { +/* 1632 */ char lower = action.toLowerCase().charAt(0); +/* 1633 */ char upper = action.toUpperCase().charAt(0); +/* 1634 */ Vector al = getAnimationList(); +/* 1635 */ int len = al.size(); +/* 1636 */ for (int i = 0; i < len; i++) { +/* 1637 */ String[] actionAliases = ServerTableManager.instance() +/* 1638 */ .getTable("actionAliases"); +/* */ +/* 1640 */ String displayName = (String)al.elementAt(i); +/* */ +/* 1642 */ if (actionAliases != null) { +/* 1643 */ for (int j = 0; j < actionAliases.length; j += 2) +/* */ { +/* 1645 */ if (displayName.toLowerCase().equals(actionAliases[j].toLowerCase())) { +/* 1646 */ displayName = actionAliases[(j + 1)]; +/* 1647 */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* 1652 */ char c = displayName.charAt(0); +/* 1653 */ if ((c == lower) || (c == upper)) { +/* 1654 */ action = (String)al.elementAt(i); +/* 1655 */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* 1660 */ return performAnimationSequence(action); +/* */ } +/* */ +/* */ +/* 1664 */ return 0.0F; +/* */ } +/* */ +/* */ +/* */ public void timerDone() +/* */ { +/* 1670 */ if (this.animations.hasMoreElements()) { +/* 1671 */ String nextAnim = (String)this.animations.nextElement(); +/* 1672 */ float time = this.animator.getAnimationTime(this.figureType, nextAnim); +/* 1673 */ this.animator.animate(this.figureType, nextAnim, Std.getRealTime()); +/* 1674 */ Timer tm = new Timer(time, this); +/* 1675 */ tm.start(); +/* */ } +/* */ } +/* */ +/* */ private float performAnimationSequence(String action) { +/* 1680 */ float totalTime = 0.0F; +/* */ +/* 1682 */ Vector vanimations = new Vector(); +/* */ +/* 1684 */ StringTokenizer tok = new StringTokenizer(action, "&\t\n\r"); +/* 1685 */ while (tok.hasMoreTokens()) { +/* 1686 */ String subAction = tok.nextToken(); +/* 1687 */ totalTime += this.animator.getAnimationTime(this.figureType, subAction); +/* 1688 */ vanimations.addElement(subAction); +/* */ } +/* */ +/* 1691 */ this.animations = vanimations.elements(); +/* */ +/* 1693 */ timerDone(); +/* */ +/* 1695 */ return totalTime; +/* */ } +/* */ +/* */ public Vector getAnimationList() { +/* 1699 */ if (this.animationList != null) { +/* 1700 */ return this.animationList; +/* */ } +/* 1702 */ this.animationList = DroneAnimator.getActionList(this.figureType); +/* 1703 */ return this.animationList; +/* */ } +/* */ +/* 1706 */ private boolean doLOD = false; +/* */ protected int expressionStart; +/* */ +/* 1709 */ public void enableLOD(boolean flag) { this.doLOD = flag; } +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 1715 */ return false; +/* */ } +/* */ +/* */ +/* */ public boolean handle(FrameEvent fe) +/* */ { +/* 1721 */ float dist = this.closestView; +/* 1722 */ this.closestView = 10000.0F; +/* */ +/* 1724 */ if ((this.animator == null) || (dist > 900.0F) || (!hasClump())) { +/* 1725 */ return true; +/* */ } +/* 1727 */ if (this.recomputeHeight) { +/* 1728 */ if (this.runPrepFigure) +/* 1729 */ DroneAnimator.prepFigure(this, this.COG); +/* 1730 */ this.recomputeHeight = false; +/* */ } +/* */ +/* */ +/* 1734 */ if ((this.doLOD) && +/* 1735 */ (setLOD(dist))) { +/* 1736 */ return true; +/* */ } +/* */ +/* 1739 */ int time = Std.getRealTime(); +/* */ +/* */ +/* */ +/* */ +/* 1744 */ Transform t = getObjectToWorldMatrix(); +/* */ +/* 1746 */ this.animator.moveto(this.figureType, (short)(int)t.getX(), (short)(int)t.getY(), +/* 1747 */ (short)(int)t.getZ(), (short)(int)-t.getYaw(), time - 1); +/* */ +/* */ +/* */ +/* 1751 */ this.animator.update(null, this, time, t.getScaleX(), dist > 700.0F); +/* 1752 */ t.recycle(); +/* */ +/* */ +/* 1755 */ if (this.expressionStart > 0) +/* */ { +/* 1757 */ time -= this.expressionStart; +/* */ do { +/* 1759 */ TimedMatChange t = +/* 1760 */ (TimedMatChange)this.expressionChanges.elementAt(this.nextChange); +/* 1761 */ if (time < t.when) { +/* */ break; +/* */ } +/* */ +/* 1765 */ if (t.mat != origMat) { +/* 1766 */ t.limb.setMaterial(t.mat); +/* */ } +/* 1768 */ } while (++this.nextChange < this.expressionChanges.size()); +/* */ +/* 1770 */ this.nextChange = 0; +/* */ +/* */ +/* */ +/* 1774 */ this.expressionStart += time; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 1780 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected int nextChange; +/* */ +/* */ +/* */ +/* */ +/* */ protected Vector expressionChanges; +/* */ +/* */ +/* */ +/* */ +/* 1797 */ private static Object classCookie = new Object(); +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException +/* */ { +/* 1801 */ Object ret = null; +/* 1802 */ switch (index - offset) { +/* */ case 0: +/* 1804 */ if (mode == 0) { +/* 1805 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1806 */ "Center of Gravity"), "No", "Yes"); +/* 1807 */ } else if (mode == 1) { +/* 1808 */ ret = new Boolean(this.COG); +/* 1809 */ } else if (mode == 2) { +/* 1810 */ this.COG = ((Boolean)value).booleanValue(); +/* */ +/* 1812 */ URL u = getURL(); +/* 1813 */ setURL(defaultURL); +/* 1814 */ setURL(u); +/* */ } +/* 1816 */ break; +/* */ default: +/* 1818 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 1820 */ return ret; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 1824 */ s.saveVersion(1, classCookie); +/* 1825 */ s.saveBoolean(this.COG); +/* */ +/* 1827 */ if (this.subparts != null) { +/* 1828 */ this.subparts.detach(); +/* 1829 */ super.saveState(s); +/* 1830 */ add(this.subparts); +/* */ } else { +/* 1832 */ super.saveState(s); +/* */ } +/* */ } +/* */ +/* 1836 */ public void restoreState(Restorer r) throws IOException, TooNewException { switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 1838 */ this.COG = r.restoreBoolean(); +/* */ case 0: +/* 1840 */ super.restoreState(r); +/* 1841 */ break; +/* */ +/* */ default: +/* 1844 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public String toString() { +/* 1849 */ return getName(); +/* */ } +/* */ +/* */ public PosableShape() {} +/* */ +/* */ class TimedMatChange +/* */ { +/* */ Shape limb; +/* */ Material mat; +/* */ int when; +/* */ +/* */ TimedMatChange() {} +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PosableShape.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Postrenderable.java b/NET/worlds/scape/Postrenderable.java new file mode 100644 index 0000000..572b1ce --- /dev/null +++ b/NET/worlds/scape/Postrenderable.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface Postrenderable +{ + public abstract void postrender(Camera paramCamera); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Postrenderable.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PostspinBehavior.java b/NET/worlds/scape/PostspinBehavior.java new file mode 100644 index 0000000..918076d --- /dev/null +++ b/NET/worlds/scape/PostspinBehavior.java @@ -0,0 +1,141 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PostspinBehavior +/* */ extends SpinBehavior +/* */ implements FrameHandler +/* */ { +/* */ private float xCenter; +/* */ private float yCenter; +/* */ private float zCenter; +/* */ +/* */ public PostspinBehavior(float x, float y, float z, float cycleTime) +/* */ { +/* 28 */ this(x, y, z, 0.0F, 0.0F, 1.0F, cycleTime); +/* */ } +/* */ +/* */ +/* */ public PostspinBehavior(float x, float y, float z, float ax, float ay, float az) +/* */ { +/* 34 */ this(x, y, z, ax, ay, az, 5.0F); +/* */ } +/* */ +/* */ +/* */ public PostspinBehavior(float x, float y, float z, float ax, float ay, float az, float cycleTime) +/* */ { +/* 40 */ super(cycleTime, ax, ay, az); +/* 41 */ this.xCenter = x; +/* 42 */ this.yCenter = y; +/* 43 */ this.zCenter = z; +/* */ } +/* */ +/* */ +/* */ +/* */ public PostspinBehavior() {} +/* */ +/* */ +/* */ +/* 52 */ public float getXCenter() { return this.xCenter; } +/* 53 */ public float getYCenter() { return this.yCenter; } +/* 54 */ public float getZCenter() { return this.zCenter; } +/* */ +/* */ +/* 57 */ public Point3Temp getCenter() { return Point3Temp.make(this.xCenter, this.yCenter, this.zCenter); } +/* */ +/* 59 */ public void setXCenter(float c) { this.xCenter = c; } +/* 60 */ public void setYCenter(float c) { this.yCenter = c; } +/* 61 */ public void setZCenter(float c) { this.zCenter = c; } +/* */ +/* */ public void setCenter(Point3Temp center) { +/* 64 */ this.xCenter = center.x; +/* 65 */ this.yCenter = center.y; +/* 66 */ this.zCenter = center.z; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 71 */ if ((this.enabled) && (this.cycleTime > 0.0F)) +/* */ { +/* 73 */ e.receiver.moveBy(-this.xCenter, -this.yCenter, -this.zCenter); +/* 74 */ e.receiver.postspin(this.ax, this.ay, this.az, 0.36F * e.dt / this.cycleTime); +/* 75 */ e.receiver.moveBy(this.xCenter, this.yCenter, this.zCenter); +/* */ } +/* 77 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 86 */ Object ret = null; +/* 87 */ switch (index - offset) { +/* */ case 0: +/* 89 */ if (mode == 0) { +/* 90 */ ret = Point3PropertyEditor.make( +/* 91 */ new Property(this, index, "Center")); +/* 92 */ } else if (mode == 1) { +/* 93 */ ret = new Point3(getCenter()); +/* 94 */ } else if (mode == 2) +/* 95 */ setCenter((Point3)value); +/* 96 */ break; +/* */ default: +/* 98 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 100 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 105 */ return +/* */ +/* */ +/* 108 */ super.toString() + "[center " + getCenter() + ", axis " + getAxis() + ", cycleTime " + this.cycleTime + ", enabled " + this.enabled + "]"; +/* */ } +/* */ +/* 111 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 115 */ s.saveVersion(0, classCookie); +/* 116 */ super.saveState(s); +/* 117 */ s.saveFloat(this.xCenter); +/* 118 */ s.saveFloat(this.yCenter); +/* 119 */ s.saveFloat(this.zCenter); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 124 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 126 */ super.restoreState(r); +/* 127 */ this.xCenter = r.restoreFloat(); +/* 128 */ this.yCenter = r.restoreFloat(); +/* 129 */ this.zCenter = r.restoreFloat(); +/* 130 */ break; +/* */ default: +/* 132 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PostspinBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Prerenderable.java b/NET/worlds/scape/Prerenderable.java new file mode 100644 index 0000000..135deec --- /dev/null +++ b/NET/worlds/scape/Prerenderable.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface Prerenderable +{ + public abstract void prerender(Camera paramCamera); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Prerenderable.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PrintAction.java b/NET/worlds/scape/PrintAction.java new file mode 100644 index 0000000..e35e842 --- /dev/null +++ b/NET/worlds/scape/PrintAction.java @@ -0,0 +1,116 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PrintAction +/* */ extends Action +/* */ { +/* 21 */ String txt = null; +/* */ +/* */ +/* */ +/* */ +/* */ public PrintAction() {} +/* */ +/* */ +/* */ +/* */ public PrintAction(String text) +/* */ { +/* 32 */ this.txt = text; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 41 */ String msg = this.txt; +/* */ +/* 43 */ if (msg == null) { +/* 44 */ msg = getName() + "Has-no-text"; +/* */ } +/* 46 */ Console.println(msg); +/* */ +/* 48 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 59 */ Object ret = null; +/* 60 */ switch (index - offset) { +/* */ case 0: +/* 62 */ if (mode == 0) { +/* 63 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 64 */ "Text Out")); +/* 65 */ } else if (mode == 1) { +/* 66 */ ret = this.txt; +/* 67 */ } else if (mode == 2) +/* 68 */ this.txt = ((String)value); +/* 69 */ break; +/* */ default: +/* 71 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 73 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 80 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 84 */ s.saveVersion(0, classCookie); +/* 85 */ super.saveState(s); +/* 86 */ s.saveString(this.txt); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 92 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 94 */ super.restoreState(r); +/* 95 */ this.txt = r.restoreString(); +/* 96 */ break; +/* */ default: +/* 98 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 108 */ return super.toString() + "[" + this.txt + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PrintAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file 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 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 diff --git a/NET/worlds/scape/PropAdder.java b/NET/worlds/scape/PropAdder.java new file mode 100644 index 0000000..608332e --- /dev/null +++ b/NET/worlds/scape/PropAdder.java @@ -0,0 +1,120 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PropAdder +/* */ implements LibraryDrop +/* */ { +/* */ protected VectorProperty property; +/* */ +/* */ protected PropAdder(VectorProperty property) +/* */ { +/* 45 */ this.property = property; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static VectorProperty make(VectorProperty property) +/* */ { +/* 54 */ return property.setAdder(new PropAdder(property)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public PolledDialog add(EditTile parent, String title) +/* */ { +/* 66 */ if (!$assertionsDisabled) throw new AssertionError(); +/* 67 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasAddDialog() +/* */ { +/* 77 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean checkObject(Object obj) +/* */ { +/* 89 */ return this.property.addTest(obj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean libraryDrop(EditTile target, Object obj, boolean isPaste, boolean doDrop) +/* */ { +/* 99 */ if (checkObject(obj)) { +/* 100 */ if (doDrop) { +/* 101 */ if (isPaste) { +/* 102 */ target.addUndoablePaste(this.property, obj); +/* */ } else { +/* 104 */ target.addUndoableAdd(this.property, obj, true); +/* */ } +/* */ +/* 107 */ return (!(obj instanceof SuperRoot)) || +/* 108 */ (((SuperRoot)obj).getOwner() != null); +/* */ } +/* 110 */ return true; +/* */ } +/* 112 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropAdder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PropEditor.java b/NET/worlds/scape/PropEditor.java new file mode 100644 index 0000000..deee243 --- /dev/null +++ b/NET/worlds/scape/PropEditor.java @@ -0,0 +1,51 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class PropEditor +/* */ implements LibraryDrop +/* */ { +/* */ protected Property property; +/* */ +/* */ protected PropEditor(Property property) +/* */ { +/* 32 */ this.property = property; +/* */ } +/* */ +/* */ +/* */ +/* */ public abstract PolledDialog edit(EditTile paramEditTile, String paramString); +/* */ +/* */ +/* */ +/* */ public boolean libraryDrop(EditTile target, Object obj, boolean isPaste, boolean doDrop) +/* */ { +/* 43 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PropList.java b/NET/worlds/scape/PropList.java new file mode 100644 index 0000000..898eab1 --- /dev/null +++ b/NET/worlds/scape/PropList.java @@ -0,0 +1,150 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.List; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PropList +/* */ extends List +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private Object obj; +/* */ private Vector properties; +/* 31 */ private static String[] sortOrder = { +/* 32 */ "Name", +/* 33 */ "Tilesize", +/* 34 */ "Transform", +/* 35 */ "From", +/* 36 */ "To", +/* 37 */ "Extent", +/* 38 */ "Bumpable", +/* 39 */ "Collision Extent", +/* 40 */ "Visible", +/* 41 */ "Optimizable", +/* 42 */ "DrawFirstOnIntersection", +/* 43 */ "DrawOrderUnimportant" }; +/* */ +/* */ +/* */ public static void setPreferences(String[] prefs) +/* */ { +/* 48 */ sortOrder = prefs; +/* */ } +/* */ +/* */ static +/* */ { +/* 53 */ int numUserPreferences = +/* 54 */ IniFile.gamma().getIniInt("PropertyOrderCount", -1); +/* 55 */ if (numUserPreferences >= 0) { +/* 56 */ sortOrder = new String[numUserPreferences]; +/* 57 */ for (int i = 0; i < numUserPreferences; i++) +/* 58 */ sortOrder[i] = +/* 59 */ IniFile.gamma().getIniString("PropertyOrder" + i, ""); +/* */ } +/* */ } +/* */ +/* */ public Object getObject() { +/* 64 */ return this.obj; +/* */ } +/* */ +/* */ public void setObject(Object obj) { +/* 68 */ int selected = getSelectedIndex(); +/* 69 */ if (obj != this.obj) +/* 70 */ selected = -1; +/* 71 */ this.obj = obj; +/* 72 */ int count = getItemCount(); +/* 73 */ if (count != 0) +/* */ { +/* 75 */ removeAll(); +/* */ } +/* */ +/* 78 */ Vector unsorted = new Vector(); +/* 79 */ EnumProperties e = new EnumProperties(obj); +/* 80 */ for (count = 0; e.hasMoreElements(); count++) { +/* 81 */ Property p = (Property)e.nextElement(); +/* 82 */ if ((!(p instanceof VectorProperty)) && ( +/* 83 */ (p.getEditor() != null) || +/* 84 */ (!(p.get() instanceof Properties)))) { +/* 85 */ unsorted.addElement(p); +/* */ } +/* */ } +/* */ +/* 89 */ this.properties = new Vector(unsorted.size()); +/* 90 */ for (int sortItem = 0; sortItem < sortOrder.length; sortItem++) +/* */ { +/* 92 */ String s = sortOrder[sortItem]; +/* */ +/* 94 */ int size = unsorted.size(); +/* 95 */ for (int i = 0; i < size; i++) { +/* 96 */ Property p = (Property)unsorted.elementAt(i); +/* 97 */ if (p.getName().equals(s)) { +/* 98 */ this.properties.addElement(p); +/* 99 */ unsorted.removeElementAt(i); +/* 100 */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 106 */ int size = unsorted.size(); +/* 107 */ for (int i = 0; i < size; i++) { +/* 108 */ this.properties.addElement((Property)unsorted.elementAt(i)); +/* */ } +/* */ +/* 111 */ size = this.properties.size(); +/* 112 */ for (int i = 0; i < size; i++) { +/* 113 */ Property prop = (Property)this.properties.elementAt(i); +/* 114 */ addItem(prop.getName() + " (" + prop.getPropertyType() + ")" + +/* 115 */ " (" + prop.get() + ")"); +/* */ } +/* */ +/* */ +/* */ +/* 120 */ count = getItemCount(); +/* 121 */ if ((count != 0) && (selected != -1)) { +/* 122 */ if (selected >= count) +/* 123 */ selected = count - 1; +/* 124 */ select(selected); +/* */ } +/* */ } +/* */ +/* */ public Property getSelectedProperty() +/* */ { +/* 130 */ int i = getSelectedIndex(); +/* 131 */ if (i != -1) +/* 132 */ return (Property)this.properties.elementAt(i); +/* 133 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public void addItem(String s) +/* */ { +/* 139 */ if (s.length() > 128) { +/* 140 */ s = s.substring(0, 125) + "..."; +/* */ } +/* 142 */ super.addItem(s); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropList.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PropPropEditor.java b/NET/worlds/scape/PropPropEditor.java new file mode 100644 index 0000000..cc2188a --- /dev/null +++ b/NET/worlds/scape/PropPropEditor.java @@ -0,0 +1,110 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class PropPropEditor +/* */ extends PropEditor +/* */ { +/* */ private boolean _nullHandling; +/* */ private SuperRoot _target; +/* */ +/* */ private PropPropEditor(Property property, SuperRoot target, boolean nullHandling) +/* */ { +/* 82 */ super(property); +/* 83 */ this._target = target; +/* 84 */ this._nullHandling = nullHandling; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 89 */ return new PropPropEditorDialog(parent, title, this.property, this._target, +/* 90 */ this._nullHandling); +/* */ } +/* */ +/* */ public static Property make(Property property, SuperRoot target) +/* */ { +/* 95 */ return property.setEditor(new PropPropEditor(property, target, false)); +/* */ } +/* */ +/* */ +/* */ public static Property make(Property property, SuperRoot target, boolean nullHandling) +/* */ { +/* 101 */ return property.setEditor(new PropPropEditor(property, target, +/* 102 */ nullHandling)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropPropEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PropPropEditorDialog.java b/NET/worlds/scape/PropPropEditorDialog.java new file mode 100644 index 0000000..819eef2 --- /dev/null +++ b/NET/worlds/scape/PropPropEditorDialog.java @@ -0,0 +1,79 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class PropPropEditorDialog +/* */ extends ListChooserDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ private SuperRoot _target; +/* */ +/* */ +/* */ +/* */ +/* */ private Property _property; +/* */ +/* */ +/* */ +/* */ +/* */ private boolean _nullHandling; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ PropPropEditorDialog(EditTile parent, String title, Property property, SuperRoot target, boolean nullHandling) +/* */ { +/* 34 */ super(parent, title); +/* 35 */ this._target = target; +/* 36 */ this._property = property; +/* 37 */ this._nullHandling = nullHandling; +/* 38 */ ready(); +/* */ } +/* */ +/* */ protected String getEntry(int index) +/* */ { +/* 43 */ Property p = null; +/* */ try { +/* 45 */ p = (Property)this._target.properties(index, 0, 0, null); +/* */ } +/* */ catch (NoSuchPropertyException localNoSuchPropertyException) {} +/* 48 */ return p == null ? null : p.getName(); +/* */ } +/* */ +/* */ protected int getSelected() +/* */ { +/* 53 */ if (this._property == null) +/* 54 */ return -1; +/* 55 */ Property val = (Property)this._property.get(); +/* 56 */ if (val == null) +/* 57 */ return -1; +/* 58 */ return val.getIndex(); +/* */ } +/* */ +/* */ protected boolean setValue(String text, int index) +/* */ { +/* 63 */ if ((index == -1) && (!this._nullHandling)) +/* 64 */ return false; +/* 65 */ Object val = null; +/* */ try { +/* 67 */ val = this._target.properties(index, 0, 0, null); +/* */ } catch (NoSuchPropertyException nspe) { +/* 69 */ if (!$assertionsDisabled) throw new AssertionError(); } +/* 70 */ this._parent.addUndoableSet(this._property, val); +/* 71 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropPropEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/PropTreeNode.java b/NET/worlds/scape/PropTreeNode.java new file mode 100644 index 0000000..fe564f9 --- /dev/null +++ b/NET/worlds/scape/PropTreeNode.java @@ -0,0 +1,175 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.TreeNode; +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class PropTreeNode +/* */ extends TreeNode +/* */ { +/* */ private Object obj; +/* 27 */ private boolean allowSorting = true; +/* */ +/* */ public PropTreeNode(Object obj) +/* */ { +/* 31 */ super(null); +/* 32 */ this.obj = obj; +/* 33 */ assert (obj != null); +/* */ } +/* */ +/* */ public PropTreeNode(Object obj, TreeNode parent) +/* */ { +/* 38 */ super(parent); +/* 39 */ this.obj = obj; +/* 40 */ assert (obj != null); +/* */ } +/* */ +/* */ public boolean shouldSort() +/* */ { +/* 45 */ return this.allowSorting; +/* */ } +/* */ +/* */ public Vector getChildren() +/* */ { +/* 50 */ Vector ret = null; +/* 51 */ Object obj = this.obj; +/* 52 */ if ((obj instanceof VectorProperty)) { +/* 53 */ VectorProperty vp = (VectorProperty)obj; +/* 54 */ this.allowSorting = vp.shouldSort(); +/* 55 */ ret = new Vector(); +/* */ +/* 57 */ Vector v = (Vector)vp.get(); +/* 58 */ if (v != null) { +/* 59 */ int count = v.size(); +/* 60 */ for (int i = 0; i < count; i++) { +/* 61 */ Object child = v.elementAt(i); +/* 62 */ if (child == null) { +/* 63 */ System.out.println("Error: VectorProperty " + +/* 64 */ vp.getName() + " of " + +/* 65 */ vp.getOwner() + " was null."); +/* */ } else { +/* 67 */ ret.addElement(new PropTreeNode(child, this)); +/* */ } +/* */ } +/* */ } +/* */ } else { +/* 72 */ if ((obj instanceof Property)) +/* 73 */ obj = ((Property)obj).get(); +/* 74 */ if ((obj instanceof Properties)) { +/* 75 */ ret = new Vector(); +/* 76 */ EnumProperties e = new EnumProperties(obj); +/* 77 */ while (e.hasMoreElements()) { +/* 78 */ Property p = (Property)e.nextElement(); +/* 79 */ if (((p instanceof VectorProperty)) || ( +/* 80 */ (p.getEditor() == null) && +/* 81 */ ((p.get() instanceof Properties)))) +/* 82 */ ret.addElement(new PropTreeNode(p, this)); +/* */ } +/* */ } +/* */ } +/* 86 */ return ret; +/* */ } +/* */ +/* */ public Object getObject() +/* */ { +/* 91 */ return this.obj; +/* */ } +/* */ +/* */ public boolean displayAsTitle() +/* */ { +/* 96 */ return ((this.obj instanceof VectorProperty)) || ((this.obj instanceof Property)); +/* */ } +/* */ +/* */ public boolean canEdit() +/* */ { +/* 101 */ return false; +/* */ } +/* */ +/* */ public VectorProperty getContainingVectorProperty() +/* */ { +/* 106 */ Object obj = this.obj; +/* 107 */ TreeNode e = getParent(); +/* 108 */ if (((obj instanceof VectorProperty)) || ( +/* 109 */ (e != null) && (((obj = e.getObject()) instanceof VectorProperty)))) +/* 110 */ return (VectorProperty)obj; +/* 111 */ return null; +/* */ } +/* */ +/* */ public PropAdder getAdder() +/* */ { +/* 116 */ VectorProperty vec = getContainingVectorProperty(); +/* 117 */ if (vec != null) +/* 118 */ return vec.getAdder(); +/* 119 */ return null; +/* */ } +/* */ +/* */ public String getContainerName() +/* */ { +/* 124 */ return getContainingVectorProperty().getName(); +/* */ } +/* */ +/* */ public boolean canAdd() +/* */ { +/* 129 */ PropAdder adder = getAdder(); +/* 130 */ return (adder != null) && (adder.hasAddDialog()); +/* */ } +/* */ +/* */ +/* */ public boolean canDelete() +/* */ { +/* 136 */ TreeNode e = getParent(); +/* 137 */ Object obj; return (e != null) && ( +/* 138 */ ((((obj = e.getObject()) instanceof VectorProperty)) && +/* 139 */ (((VectorProperty)obj).getAdder() != null)) || ( +/* 140 */ (((obj = getObject()) instanceof Property)) && +/* 141 */ (((Property)obj).canSetNull()) && +/* 142 */ (((Property)obj).get() != null))); +/* */ } +/* */ +/* */ public Undoable delete(boolean isCut) +/* */ { +/* 147 */ assert (canDelete()); +/* 148 */ Object o = getParent().getObject(); +/* 149 */ if ((o instanceof VectorProperty)) { +/* 150 */ VectorProperty owner = (VectorProperty)o; +/* */ +/* 152 */ Vector v = (Vector)owner.get(); +/* 153 */ int i = v.indexOf(this.obj); +/* 154 */ assert (i != -1); +/* 155 */ return isCut ? new UndoablCut(owner, i) : +/* 156 */ new UndoablDelete(owner, i); +/* */ } +/* 158 */ return new UndoablSet((Property)getObject(), null); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 163 */ if ((this.obj instanceof SuperRoot)) +/* 164 */ return ((SuperRoot)this.obj).getName(); +/* 165 */ if ((this.obj instanceof Property)) +/* 166 */ return ((Property)this.obj).getName(); +/* 167 */ return this.obj.toString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PropTreeNode.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Properties.java b/NET/worlds/scape/Properties.java new file mode 100644 index 0000000..cb79e03 --- /dev/null +++ b/NET/worlds/scape/Properties.java @@ -0,0 +1,22 @@ +package NET.worlds.scape; + +public abstract interface Properties +{ + public static final int ENUM = 0; + public static final int GET = 1; + public static final int SET = 2; + public static final int ADD = 3; + public static final int DEL = 4; + public static final int ADD_TEST = 5; + + public abstract Object properties(int paramInt1, int paramInt2, int paramInt3, Object paramObject) + throws NoSuchPropertyException; + + public abstract Object propertyParent(); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Properties.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Property.java b/NET/worlds/scape/Property.java new file mode 100644 index 0000000..cf9fa88 --- /dev/null +++ b/NET/worlds/scape/Property.java @@ -0,0 +1,286 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Property +/* */ { +/* */ protected Properties owner; +/* */ public static final int BOOL_TYPE = 0; +/* */ public static final int INT_TYPE = 1; +/* */ public static final int FLOAT_TYPE = 2; +/* */ public static final int STRING_TYPE = 3; +/* */ public static final int COLOR_TYPE = 4; +/* */ public static final int ENUM_TYPE = 5; +/* */ public static final int FLOAT_ARRAY_TYPE = 6; +/* */ public static final int POINT2_TYPE = 7; +/* */ public static final int POINT3_TYPE = 8; +/* */ public static final int TRANSFORM_TYPE = 9; +/* */ public static final int URL_TYPE = 10; +/* */ protected int index; +/* */ protected String name; +/* 65 */ protected int propertyType = 3; +/* */ +/* */ +/* */ +/* */ protected PropEditor editor; +/* */ +/* */ +/* */ +/* 73 */ public boolean helpExists = false; +/* */ +/* 75 */ protected boolean canSetNull = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Property(Properties owner, int index, String name) +/* */ { +/* 90 */ this.owner = owner; +/* 91 */ this.index = index; +/* 92 */ this.name = name; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Property(Properties owner, int index, String name, boolean haveHelp) +/* */ { +/* 101 */ this.owner = owner; +/* 102 */ this.index = index; +/* 103 */ this.name = name; +/* 104 */ this.helpExists = haveHelp; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Property setEditor(PropEditor editor) +/* */ { +/* 117 */ this.editor = editor; +/* 118 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public PropEditor getEditor() +/* */ { +/* 127 */ return this.editor; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Property allowSetNull() +/* */ { +/* 136 */ this.canSetNull = true; +/* 137 */ return this; +/* */ } +/* */ +/* */ public boolean canSetNull() { +/* 141 */ return this.canSetNull; +/* */ } +/* */ +/* */ public String getName() { +/* 145 */ return this.name; +/* */ } +/* */ +/* */ public int getIndex() +/* */ { +/* 150 */ return this.index; +/* */ } +/* */ +/* */ public Properties getOwner() { +/* 154 */ return this.owner; +/* */ } +/* */ +/* */ +/* */ public Object get() +/* */ { +/* 160 */ return operate(1, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object set(Object obj) +/* */ { +/* 173 */ return operate(2, obj); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean equals(Object obj) +/* */ { +/* 183 */ return ((obj instanceof Property)) && (((Property)obj).owner == this.owner) && +/* 184 */ (((Property)obj).index == this.index); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int hashCode() +/* */ { +/* 193 */ return this.owner.hashCode() ^ this.index; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected Object operate(int func, Object value) +/* */ { +/* 209 */ if (Main.isMainThread()) +/* 210 */ return safeOperate(func, value); +/* 211 */ return new CallbackPropertyOperator(this, func, value).getValue(); +/* */ } +/* */ +/* */ +/* */ +/* */ Object safeOperate(int func, Object value) +/* */ { +/* */ try +/* */ { +/* 220 */ Object ret = this.owner.properties(this.index, 0, func, value); +/* 221 */ if ((func > 1) && (func < 5) && +/* 222 */ ((this.owner instanceof SuperRoot))) +/* 223 */ ((SuperRoot)this.owner).markEdited(); +/* 224 */ return ret; +/* */ } catch (NoSuchPropertyException e) { +/* 226 */ if (!$assertionsDisabled) throw new AssertionError(); } +/* 227 */ return null; +/* */ } +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 233 */ return getName(); +/* */ } +/* */ +/* */ +/* 237 */ public void setPropertyType(int type) { this.propertyType = type; } +/* */ +/* */ public String getPropertyType() { String retVal; +/* */ String retVal; +/* */ String retVal; +/* 242 */ String retVal; String retVal; String retVal; String retVal; String retVal; String retVal; String retVal; String retVal; switch (this.propertyType) { +/* */ case 0: +/* 244 */ retVal = "Boolean"; +/* 245 */ break; +/* */ case 1: +/* 247 */ retVal = "Integer"; +/* 248 */ break; +/* */ case 2: +/* 250 */ retVal = "Float"; +/* 251 */ break; +/* */ case 3: +/* 253 */ retVal = "String"; +/* 254 */ break; +/* */ case 4: +/* 256 */ retVal = "Color"; +/* 257 */ break; +/* */ case 5: +/* 259 */ retVal = "Enumeration"; +/* 260 */ break; +/* */ case 6: +/* 262 */ retVal = "Float Array"; +/* 263 */ break; +/* */ case 7: +/* 265 */ retVal = "2D Point"; +/* 266 */ break; +/* */ case 8: +/* 268 */ retVal = "3D Point"; +/* 269 */ break; +/* */ case 9: +/* 271 */ retVal = "Transform"; +/* 272 */ break; +/* */ default: +/* 274 */ retVal = "URL"; +/* */ } +/* */ +/* */ +/* 278 */ return retVal; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Property.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ProximitySensor.java b/NET/worlds/scape/ProximitySensor.java new file mode 100644 index 0000000..956d926 --- /dev/null +++ b/NET/worlds/scape/ProximitySensor.java @@ -0,0 +1,212 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ProximitySensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* */ public ProximitySensor(Action a) +/* */ { +/* 34 */ if (a != null) { +/* 35 */ addAction(a); +/* */ } +/* */ } +/* */ +/* */ +/* 40 */ private boolean _wasin = false; +/* 41 */ private Point3 _start = new Point3(0.0F, 0.0F, 0.0F); +/* 42 */ private Point3 _end = new Point3(1.0F, 1.0F, 1.0F); +/* 43 */ private boolean _triggerin = true; +/* 44 */ private boolean _triggerout = false; +/* 45 */ private boolean _silentTeleport = false; +/* */ private Room _lastRoom; +/* */ +/* */ public ProximitySensor() {} +/* */ +/* 50 */ public boolean handle(FrameEvent e) { SuperRoot owner = getOwner(); +/* 51 */ if (!(owner instanceof WObject)) +/* 52 */ return true; +/* 53 */ WObject wo = (WObject)owner; +/* 54 */ Pilot pilot = Pilot.getActive(); +/* 55 */ Room room = pilot.getRoom(); +/* 56 */ boolean teleport = room != this._lastRoom; +/* 57 */ this._lastRoom = room; +/* */ +/* 59 */ Point3Temp pos = pilot.getPosition(); +/* */ +/* 61 */ BoundBoxTemp bbt = BoundBoxTemp.make(Point3Temp.make(this._start).times(wo), +/* 62 */ Point3Temp.make(this._end).times(wo)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 68 */ if ((pilot.getRoom() == wo.getRoom()) && (bbt.contains(pos))) +/* */ { +/* 70 */ if (!this._wasin) { +/* 71 */ this._wasin = true; +/* */ +/* 73 */ if ((this._triggerin) && ((!teleport) || (!this._silentTeleport))) { +/* 74 */ trigger(e); +/* */ } +/* */ +/* */ } +/* */ } +/* 79 */ else if (this._wasin) { +/* 80 */ this._wasin = false; +/* */ +/* 82 */ if ((this._triggerout) && ((!teleport) || (!this._silentTeleport))) { +/* 83 */ trigger(e); +/* */ } +/* */ } +/* 86 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 95 */ Object ret = null; +/* 96 */ switch (index - offset) { +/* */ case 0: +/* 98 */ if (mode == 0) { +/* 99 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 100 */ "Start")); +/* */ } +/* 102 */ else if (mode == 1) { +/* 103 */ ret = new Point3(this._start); +/* 104 */ } else if (mode == 2) +/* 105 */ this._start = ((Point3)value); +/* 106 */ break; +/* */ case 1: +/* 108 */ if (mode == 0) { +/* 109 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 110 */ "End")); +/* */ } +/* 112 */ else if (mode == 1) { +/* 113 */ ret = new Point3(this._end); +/* 114 */ } else if (mode == 2) +/* 115 */ this._end = ((Point3)value); +/* 116 */ break; +/* */ case 2: +/* 118 */ if (mode == 0) { +/* 119 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 120 */ "Trigger on entry"), "Don't trigger when entered", +/* 121 */ "Trigger when entered"); +/* */ } +/* 123 */ else if (mode == 1) { +/* 124 */ ret = new Boolean(this._triggerin); +/* 125 */ } else if (mode == 2) +/* 126 */ this._triggerin = ((Boolean)value).booleanValue(); +/* 127 */ break; +/* */ case 3: +/* 129 */ if (mode == 0) { +/* 130 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 131 */ "Trigger on exit"), "Don't trigger when exited", +/* 132 */ "Trigger when exited"); +/* */ } +/* 134 */ else if (mode == 1) { +/* 135 */ ret = new Boolean(this._triggerout); +/* 136 */ } else if (mode == 2) +/* 137 */ this._triggerout = ((Boolean)value).booleanValue(); +/* 138 */ break; +/* */ case 4: +/* 140 */ if (mode == 0) { +/* 141 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 142 */ "Teleport trigger"), "Don't trigger on teleports", +/* 143 */ "Trigger on teleports"); +/* */ } +/* 145 */ else if (mode == 1) { +/* 146 */ ret = new Boolean(!this._silentTeleport); +/* 147 */ } else if (mode == 2) +/* 148 */ this._silentTeleport = (!((Boolean)value).booleanValue()); +/* 149 */ break; +/* */ default: +/* 151 */ ret = super.properties(index, offset + 5, mode, value); +/* */ } +/* */ +/* 154 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 161 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 165 */ s.saveVersion(2, classCookie); +/* 166 */ super.saveState(s); +/* 167 */ s.saveBoolean(this._triggerin); +/* 168 */ s.saveBoolean(this._triggerout); +/* 169 */ s.saveBoolean(this._silentTeleport); +/* 170 */ s.save(this._start); +/* 171 */ s.save(this._end); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 176 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 178 */ super.restoreState(r); +/* 179 */ this._triggerin = r.restoreBoolean(); +/* 180 */ this._triggerout = r.restoreBoolean(); +/* 181 */ this._silentTeleport = r.restoreBoolean(); +/* 182 */ this._start = ((Point3)r.restore()); +/* 183 */ this._end = ((Point3)r.restore()); +/* 184 */ break; +/* */ case 1: +/* 186 */ super.restoreState(r); +/* 187 */ this._triggerin = r.restoreBoolean(); +/* 188 */ this._triggerout = r.restoreBoolean(); +/* 189 */ this._start = ((Point3)r.restore()); +/* 190 */ this._end = ((Point3)r.restore()); +/* 191 */ break; +/* */ default: +/* 193 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 203 */ return +/* 204 */ super.toString() + "[" + (this._triggerin ? "I" : " ") + (this._triggerout ? "O" : " ") + this._start + " to " + this._end + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ProximitySensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RPAction.java b/NET/worlds/scape/RPAction.java new file mode 100644 index 0000000..915f7ca --- /dev/null +++ b/NET/worlds/scape/RPAction.java @@ -0,0 +1,39 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RPAction +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 28 */ if ((getOwner() instanceof Portal)) { +/* 29 */ ((Portal)getOwner()).triggerLoad(); +/* */ } +/* 31 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RPAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Rect.java b/NET/worlds/scape/Rect.java new file mode 100644 index 0000000..4a9488c --- /dev/null +++ b/NET/worlds/scape/Rect.java @@ -0,0 +1,703 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Rect +/* */ extends Surface +/* */ implements MouseDownHandler, FrameHandler, Prerenderable +/* */ { +/* */ public Rect(float w, float h, Material material) +/* */ { +/* 76 */ super(material); +/* */ +/* */ +/* 79 */ scale(w, h, h); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Rect(float x, float y, float z, Material material) +/* */ { +/* 88 */ super(material); +/* 89 */ setFarCorner(Point3Temp.make(x, y, z)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Rect(float llx, float lly, float llz, float urx, float ury, float urz, Material material) +/* */ { +/* 98 */ super(material); +/* 99 */ moveBy(llx, lly, llz); +/* 100 */ setFarCorner(Point3Temp.make(urx, ury, urz)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Rect(Point3Temp llc, Point3Temp urc, Material material) +/* */ { +/* 108 */ this(llc.x, llc.y, llc.z, urc.x, urc.y, urc.z, material); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean setFarCornerHelper(Transform t, Point3Temp newCorner) +/* */ { +/* 149 */ t.scale(1.0F / t.getScaleX(), 1.0F / t.getScaleY(), 1.0F / t.getScaleZ()); +/* */ +/* */ +/* */ +/* 153 */ Point3Temp lookRight = Point3Temp.make(1.0F, 0.0F, 0.0F).vectorTimes(t); +/* 154 */ Point3Temp lookOut = Point3Temp.make(0.0F, 1.0F, 0.0F).vectorTimes(t); +/* 155 */ Point3Temp lookUp = Point3Temp.make(0.0F, 0.0F, 1.0F).vectorTimes(t); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 161 */ Point3Temp newEndOffset = Point3Temp.make(newCorner).minus( +/* 162 */ t.getPosition()); +/* 163 */ float x = newEndOffset.dot(lookRight); +/* 164 */ float y = newEndOffset.dot(lookOut); +/* 165 */ float z = newEndOffset.dot(lookUp); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 171 */ if (z >= 0.0F) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 180 */ if ((x != 0.0F) || (y != 0.0F)) { +/* 181 */ t.spin(0.0F, 0.0F, 1.0F, (float)(Math.atan2(y, x) * 180.0D / 3.141592653589793D)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 192 */ t.scale((float)Math.sqrt(x * x + y * y), z, z); +/* 193 */ return true; +/* */ } +/* 195 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean setFarCorner(Point3Temp newCorner) +/* */ { +/* 203 */ Transform t = getTransform(); +/* 204 */ if (setFarCornerHelper(t, newCorner)) { +/* 205 */ setTransform(t); +/* 206 */ t.recycle(); +/* 207 */ return true; +/* */ } +/* 209 */ t.recycle(); +/* 210 */ Console.println(Console.message("cant-rot-rect")); +/* 211 */ return false; +/* */ } +/* */ +/* */ +/* */ public Point3Temp getFarCorner() +/* */ { +/* 217 */ Point3Temp ret = Point3Temp.make(1.0F, 0.0F, 1.0F); +/* */ +/* 219 */ if (hasClump()) { +/* 220 */ Transform t = getObjectToWorldMatrix(); +/* 221 */ ret.times(t); +/* 222 */ t.recycle(); +/* */ } else { +/* 224 */ ret.times(this); +/* */ } +/* 226 */ return ret; +/* */ } +/* */ +/* */ +/* */ public Point3Temp getFarCornerLocal() +/* */ { +/* 232 */ Point3Temp ret = Point3Temp.make(1.0F, 0.0F, 1.0F); +/* */ +/* 234 */ if (hasClump()) { +/* 235 */ Transform t = getTransform(); +/* 236 */ ret.times(t); +/* 237 */ t.recycle(); +/* */ } else { +/* 239 */ ret.times(this); +/* */ } +/* 241 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setNearCorner(Point3Temp from) +/* */ { +/* 249 */ Point3Temp oldEnd = getFarCornerLocal(); +/* 250 */ Point3Temp oldStart = getPosition(); +/* 251 */ moveTo(from); +/* 252 */ if (!setFarCorner(oldEnd)) { +/* 253 */ moveTo(oldStart); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp getPlaneExtent() +/* */ { +/* 262 */ return Point3Temp.make(1.0F, 0.0F, 1.0F); +/* */ } +/* */ +/* 265 */ static BumpCalc standardPlaneBumpCalc = new PlaneBumpCalc(); +/* */ +/* */ static { +/* 268 */ standardPlaneBumpCalc.setName("defaultPlaneBumpCalc"); +/* */ } +/* */ +/* */ +/* */ +/* */ public BumpCalc getBumpCalc(BumpEventTemp b) +/* */ { +/* 275 */ if (this.bumpCalc == null) +/* 276 */ return standardPlaneBumpCalc; +/* 277 */ return this.bumpCalc; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point2 getTileSize() +/* */ { +/* 285 */ return new Point2(this.u != 1.0F ? getScaleX() / this.u : 0.0F, this.v != 1.0F ? getScaleZ() / +/* 286 */ this.v : 0.0F); +/* */ } +/* */ +/* */ void setUV(float u, float v) +/* */ { +/* 291 */ setTileSize(getScaleX() / u, getScaleZ() / v); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Rect setTileSize(float tx, float ty) +/* */ { +/* 299 */ this.u = (tx == 0.0F ? 1.0F : getScaleX() / tx); +/* 300 */ this.v = (ty == 0.0F ? 1.0F : getScaleZ() / ty); +/* */ +/* 302 */ reclump(); +/* */ +/* 304 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setTileOffset(Point2 p) +/* */ { +/* 312 */ this.uOff = (getScaleX() == 0.0F ? 0.0F : p.x / getScaleX()); +/* 313 */ this.vOff = (getScaleZ() == 0.0F ? 0.0F : p.y / getScaleZ()); +/* 314 */ reclump(); +/* */ } +/* */ +/* */ public Point2 getTileOffset() { +/* 318 */ return new Point2(this.uOff * getScaleX(), this.vOff * getScaleZ()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Rect floor(float x, float y, Material m) +/* */ { +/* 331 */ return (Rect)new Rect(x, y, m).setBumpable(false).postspin(1.0F, 0.0F, 0.0F, +/* 332 */ -90.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Rect floor(float llx, float lly, float z, float urx, float ury, Material m) +/* */ { +/* 341 */ return (Rect)floor(urx - llx, ury - lly, m).moveBy(llx, lly, z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static Rect ceiling(float x, float y, Material m) +/* */ { +/* 349 */ return (Rect)new Rect(x, y, m).setBumpable(false) +/* 350 */ .postspin(1.0F, 0.0F, 0.0F, 90.0F).moveBy(0.0F, y, 0.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Rect ceiling(float llx, float lly, float z, float urx, float ury, Material m) +/* */ { +/* 359 */ return (Rect)ceiling(urx - llx, ury - lly, m).moveBy(llx, lly, z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Rect hang(float pllx, float pllz, float purx, float purz, Material pic) +/* */ { +/* 377 */ Rect r = (Rect)new Rect((purx - pllx) / getScaleX(), (purz - pllz) / +/* 378 */ getScaleZ(), pic).moveBy(pllx / getScaleX(), 0.0F, +/* 379 */ pllz / getScaleZ()).post(this); +/* */ +/* */ +/* */ +/* 383 */ return (Rect)r.premoveBy(0.0F, -1.0F / r.getScale().length(), 0.0F); +/* */ } +/* */ +/* 386 */ Billboard _billboardAttribute = null; +/* 387 */ VideoTexture _videoAttribute = null; +/* */ +/* */ public VideoTexture getVideoAttribute() { +/* 390 */ return this._videoAttribute; +/* */ } +/* */ +/* */ public Billboard getBillboardAttribute() { +/* 394 */ return this._billboardAttribute; +/* */ } +/* */ +/* 397 */ boolean visible = false; +/* */ +/* */ public boolean handle(MouseDownEvent event) +/* */ { +/* 401 */ if ((this._billboardAttribute != null) && +/* 402 */ ((event.key & 0x1) == '\001')) { +/* 403 */ Point2 pt = deproject(); +/* 404 */ this._billboardAttribute.billboardClicked(pt); +/* */ } +/* */ +/* */ +/* 408 */ return false; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent f) { +/* 412 */ if ((this._billboardAttribute != null) && (getVisible()) && +/* 413 */ (this.visible)) { +/* 414 */ this._billboardAttribute.billboardFrame(f); +/* */ } +/* */ +/* */ +/* 418 */ if ((this._videoAttribute != null) && (getVisible()) && +/* 419 */ (this.visible)) { +/* 420 */ this._videoAttribute.videoFrame(f); +/* */ } +/* */ +/* */ +/* 424 */ this.visible = false; +/* */ +/* 426 */ return false; +/* */ } +/* */ +/* */ public void prerender(Camera cam) { +/* 430 */ if ((this._billboardAttribute != null) || (this._videoAttribute != null)) { +/* 431 */ Point3Temp p = inCamSpace(cam); +/* */ +/* */ +/* */ +/* 435 */ boolean v = (p != null) && (p.z > 1.0F) && (p.x < p.z) && (-p.x < p.z); +/* */ +/* 437 */ if (v) { +/* 438 */ this.visible = true; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected Point2 deproject() +/* */ { +/* 448 */ Console c = Console.getActive(); +/* */ +/* */ Point3Temp worldClick; +/* 451 */ if ((c instanceof DefaultConsole)) { +/* 452 */ DefaultConsole dc = (DefaultConsole)c; +/* 453 */ worldClick = dc.getRender().getCamera().lastPickSpot(); +/* */ } else { +/* 455 */ return new Point2(-1.0F, -1.0F); +/* */ } +/* */ +/* */ Point3Temp worldClick; +/* 459 */ Point3Temp vWorld = Point3Temp.make(worldClick); +/* 460 */ vWorld.minus(getObjectToWorldMatrix().getPosition()); +/* */ +/* */ +/* 463 */ Transform inv = getObjectToWorldMatrix().invert(); +/* 464 */ Point3Temp vObj = Point3Temp.make(vWorld).vectorTimes(inv); +/* 465 */ inv.recycle(); +/* */ +/* */ +/* 468 */ Point2 rectPt = new Point2(); +/* */ +/* */ +/* 471 */ rectPt.set(vObj.x, vObj.z); +/* */ +/* 473 */ return rectPt; +/* */ } +/* */ +/* */ +/* */ +/* 478 */ protected float u = 1.0F; protected float v = 1.0F; +/* */ +/* */ protected float uOff; +/* */ protected float vOff; +/* */ +/* */ protected void addRwChildren(WObject container) +/* */ { +/* 485 */ addNewRwChild(container); +/* */ +/* */ +/* 488 */ float uo = this.uOff; +/* 489 */ if (uo != 0.0F) { +/* 490 */ uo *= this.u; +/* 491 */ uo = (float)(uo - 2.0D * Math.floor(uo / 2.0F)); +/* */ } +/* */ +/* 494 */ float vo = this.vOff; +/* 495 */ if (vo != 0.0F) { +/* 496 */ vo *= this.v; +/* 497 */ vo = (float)(vo - 2.0D * Math.floor(vo / 2.0F)); +/* */ } +/* */ +/* 500 */ addVertex(0.0F, 0.0F, 0.0F, uo, this.v + vo); +/* 501 */ addVertex(1.0F, 0.0F, 0.0F, this.u + uo, this.v + vo); +/* 502 */ addVertex(1.0F, 0.0F, 1.0F, this.u + uo, vo); +/* 503 */ addVertex(0.0F, 0.0F, 1.0F, uo, vo); +/* */ +/* 505 */ doneWithEditing(); +/* */ +/* 507 */ if (!(this instanceof Portal)) +/* 508 */ getRoom().addPrerenderHandler(this); +/* */ } +/* */ +/* */ protected void markVoid() { +/* 512 */ if (!(this instanceof Portal)) +/* 513 */ getRoom().removePrerenderHandler(this); +/* 514 */ super.markVoid(); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 522 */ Object ret = null; +/* 523 */ switch (index - offset) { +/* */ case 0: +/* 525 */ if (mode == 0) { +/* 526 */ ret = Point2PropertyEditor.make(new Property(this, index, +/* 527 */ "Tile Size")); +/* 528 */ } else if (mode == 1) { +/* 529 */ ret = getTileSize(); +/* 530 */ } else if (mode == 2) { +/* 531 */ Point2 p = (Point2)value; +/* 532 */ if ((p.x < 0.0F) || (p.y < 0.0F)) { +/* 533 */ Console.println(Console.message("Tile-size")); +/* */ } else { +/* 535 */ setTileSize(p.x, p.y); +/* */ } +/* */ } +/* 538 */ break; +/* */ case 1: +/* 540 */ if (mode == 0) { +/* 541 */ ret = Point2PropertyEditor.make(new Property(this, index, +/* 542 */ "Tile Origin")); +/* 543 */ } else if (mode == 1) { +/* 544 */ ret = getTileOffset(); +/* 545 */ } else if (mode == 2) +/* 546 */ setTileOffset((Point2)value); +/* 547 */ break; +/* */ case 2: +/* 549 */ if (mode == 0) { +/* 550 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 551 */ "From")); +/* 552 */ } else if (mode == 1) { +/* 553 */ ret = new Point3(getPosition()); +/* 554 */ } else if (mode == 2) +/* 555 */ setNearCorner((Point3)value); +/* 556 */ break; +/* */ case 3: +/* 558 */ if (mode == 0) { +/* 559 */ ret = +/* 560 */ Point3PropertyEditor.make(new Property(this, index, "To")); +/* 561 */ } else if (mode == 1) { +/* 562 */ ret = new Point3(getFarCornerLocal()); +/* 563 */ } else if (mode == 2) +/* 564 */ setFarCorner((Point3)value); +/* 565 */ break; +/* */ case 4: +/* 567 */ if (mode == 0) { +/* 568 */ ret = Point2PropertyEditor.make(new Property(this, index, +/* 569 */ "Extent")); +/* 570 */ } else if (mode == 1) { +/* 571 */ ret = new Point2(getScaleX(), getScaleZ()); +/* 572 */ } else if (mode == 2) { +/* 573 */ float zScale = ((Point2)value).y / getScaleZ(); +/* 574 */ scale(((Point2)value).x / getScaleX(), zScale, zScale); +/* */ } +/* 576 */ break; +/* */ case 5: +/* 578 */ if (mode == 0) { +/* 579 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 580 */ "Flip Alternate U"), "No", "Yes"); +/* 581 */ } else if (mode == 1) { +/* 582 */ ret = new Boolean(getUFlip()); +/* 583 */ } else if (mode == 2) { +/* 584 */ setUFlip(((Boolean)value).booleanValue()); +/* 585 */ reclump(); +/* */ } +/* 587 */ break; +/* */ case 6: +/* 589 */ if (mode == 0) { +/* 590 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 591 */ "Flip Alternate V"), "No", "Yes"); +/* 592 */ } else if (mode == 1) { +/* 593 */ ret = new Boolean(getVFlip()); +/* 594 */ } else if (mode == 2) { +/* 595 */ setVFlip(((Boolean)value).booleanValue()); +/* 596 */ reclump(); +/* */ } +/* 598 */ break; +/* */ case 7: +/* 600 */ if (mode == 0) { +/* 601 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 602 */ "Unused"), "No", "Yes"); +/* 603 */ } else if (mode == 1) { +/* 604 */ ret = new Boolean(getMouseOver()); +/* 605 */ } else if (mode == 2) { +/* 606 */ setMouseOver(((Boolean)value).booleanValue()); +/* */ } +/* 608 */ break; +/* */ default: +/* 610 */ ret = super.properties(index, offset + 8, mode, value); +/* */ } +/* 612 */ return ret; +/* */ } +/* */ +/* 615 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 618 */ s.saveVersion(4, classCookie); +/* 619 */ super.saveState(s); +/* 620 */ s.saveFloat(this.u); +/* 621 */ s.saveFloat(this.v); +/* 622 */ s.saveFloat(this.uOff); +/* 623 */ s.saveFloat(this.vOff); +/* 624 */ s.saveBoolean(false); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 628 */ int vers = r.restoreVersion(classCookie); +/* 629 */ switch (vers) { +/* */ case 4: +/* 631 */ super.restoreState(r); +/* 632 */ this.u = r.restoreFloat(); +/* 633 */ this.v = r.restoreFloat(); +/* 634 */ this.uOff = r.restoreFloat(); +/* 635 */ this.vOff = r.restoreFloat(); +/* 636 */ r.restoreBoolean(); +/* 637 */ break; +/* */ case 3: +/* 639 */ super.restoreState(r); +/* 640 */ this.u = r.restoreFloat(); +/* 641 */ this.v = r.restoreFloat(); +/* 642 */ this.uOff = r.restoreFloat(); +/* 643 */ this.vOff = r.restoreFloat(); +/* 644 */ break; +/* */ case 2: +/* 646 */ super.restoreState(r); +/* 647 */ this.u = r.restoreFloat(); +/* 648 */ this.v = r.restoreFloat(); +/* 649 */ break; +/* */ case 0: +/* */ case 1: +/* 652 */ super.restoreState(r); +/* 653 */ float x = r.restoreFloat(); +/* 654 */ float y = r.restoreFloat(); +/* 655 */ float z = r.restoreFloat(); +/* 656 */ r.restoreFloat(); +/* 657 */ r.restoreFloat(); +/* 658 */ r.restoreFloat(); +/* 659 */ this.u = r.restoreFloat(); +/* 660 */ this.v = r.restoreFloat(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 669 */ spin(0.0F, 0.0F, 1.0F, (float)(Math.atan2(y, x) * 180.0D / 3.141592653589793D)); +/* 670 */ scale((float)Math.sqrt(x * x + y * y), z, z); +/* 671 */ break; +/* */ default: +/* 673 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public String toString() { +/* 678 */ return +/* 679 */ super.toString() + "[" + getPosition() + "->" + getFarCornerLocal() + "]"; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean acceptsLeftClicks() +/* */ { +/* 686 */ if ((this._billboardAttribute != null) && +/* 687 */ (this._billboardAttribute.getIsAdBanner())) { +/* 688 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 693 */ return getMouseOver(); +/* */ } +/* */ +/* */ Rect() {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Rect.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RectPatch.java b/NET/worlds/scape/RectPatch.java new file mode 100644 index 0000000..9c880c5 --- /dev/null +++ b/NET/worlds/scape/RectPatch.java @@ -0,0 +1,534 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RectPatch +/* */ extends WObject +/* */ implements FloorPatch +/* */ { +/* */ public float xDim; +/* */ public float yDim; +/* 47 */ public float[] z = { 0.0F, 0.0F, 0.0F, 0.0F }; +/* */ +/* */ public Material mat; +/* */ +/* 51 */ public float xTile = 1.0F; +/* 52 */ public float xTileOffset = 0.0F; +/* 53 */ public float yTile = 1.0F; +/* 54 */ public float yTileOffset = 0.0F; +/* 55 */ public Polygon[] t = new Polygon[4]; +/* */ +/* */ +/* */ +/* */ +/* */ public RectPatch(float x, float y) +/* */ { +/* 62 */ setVisible(true); +/* 63 */ setBumpable(false); +/* 64 */ this.xDim = x; +/* 65 */ this.yDim = y; +/* 66 */ setMaterial(new Material(Color.gray)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public RectPatch() +/* */ { +/* 76 */ this.xDim = 1.0F; +/* 77 */ this.yDim = 1.0F; +/* 78 */ setMaterial(new Material(Color.gray)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void addRwChildren(WObject parent) +/* */ { +/* 92 */ if (this.t[0] == null) +/* 93 */ createAppearance(); +/* 94 */ super.addRwChildren(parent); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean v) +/* */ { +/* 103 */ super.setVisible(v); +/* 104 */ createAppearance(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setMaterial(Material m) +/* */ { +/* 113 */ if (this.mat != null) +/* 114 */ this.mat.detach(); +/* 115 */ add(m); +/* 116 */ this.mat = m; +/* 117 */ createAppearance(); +/* */ } +/* */ +/* */ public Material getMaterial() { +/* 121 */ return this.mat; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean inPatch(float x, float y) +/* */ { +/* 130 */ Transform inverse = getObjectToWorldMatrix().invert(); +/* 131 */ Point3Temp p = Point3Temp.make(x, y, 0.0F).times(inverse); +/* 132 */ inverse.recycle(); +/* 133 */ x = p.x; +/* 134 */ y = p.y; +/* */ +/* */ +/* 137 */ if ((x < 0.0F) || (x > this.xDim) || (y < 0.0F) || (y > this.yDim)) +/* 138 */ return false; +/* 139 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float floorHeight(float x, float y) +/* */ { +/* 149 */ Transform inverse = getObjectToWorldMatrix().invert(); +/* 150 */ Point3Temp p = Point3Temp.make(x, y, 0.0F).times(inverse); +/* 151 */ inverse.recycle(); +/* 152 */ x = p.x; +/* 153 */ y = p.y; +/* */ +/* */ +/* 156 */ float nx = x / this.xDim; +/* 157 */ float ny = y / this.yDim; +/* 158 */ float fx = 1.0F - nx; +/* 159 */ float fy = 1.0F - ny; +/* 160 */ return this.z[0] * fy * fx + this.z[1] * ny * fx + this.z[2] * ny * nx + this.z[3] * fy * nx; +/* */ } +/* */ +/* */ +/* */ public Point3 surfaceNormal(float x, float y) +/* */ { +/* 166 */ Point3 A = new Point3(this.xDim, 0.0F, this.z[1] - this.z[0]); +/* 167 */ Point3Temp B = Point3Temp.make(0.0F, this.yDim, this.z[3] - this.z[0]); +/* 168 */ A.cross(B); +/* 169 */ A.normalize(); +/* */ +/* */ +/* 172 */ A.times(getObjectToWorldMatrix()); +/* 173 */ return A; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void removeAppearance() +/* */ { +/* 185 */ for (int i = 0; i < 4; i++) { +/* 186 */ if (this.t[i] != null) { +/* 187 */ this.t[i].detach(); +/* 188 */ this.t[i] = null; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void createAppearance() +/* */ { +/* 198 */ removeAppearance(); +/* */ +/* */ +/* 201 */ if (!getVisible()) { +/* 202 */ return; +/* */ } +/* */ +/* 205 */ if ((this.xDim <= 0.0F) || (this.yDim <= 0.0F)) +/* 206 */ return; +/* 207 */ if (this.xTile <= 0.0F) +/* 208 */ this.xTile = 1.0F; +/* 209 */ if (this.xTile > 31.0F) +/* 210 */ this.xTile = 31.0F; +/* 211 */ if (this.yTile <= 0.0F) +/* 212 */ this.yTile = 1.0F; +/* 213 */ if (this.yTile > 31.0F) +/* 214 */ this.yTile = 31.0F; +/* 215 */ if (this.xTileOffset < 0.0F) +/* 216 */ this.xTileOffset = (1.0F - (float)Math.floor(this.xTileOffset) + this.xTileOffset); +/* 217 */ if (this.yTileOffset < 0.0F) { +/* 218 */ this.yTileOffset = (1.0F - (float)Math.floor(this.yTileOffset) + this.yTileOffset); +/* */ } +/* */ +/* 221 */ float cx = this.xDim / 2.0F; +/* 222 */ float cy = this.yDim / 2.0F; +/* 223 */ float cz = (this.z[0] + this.z[1] + this.z[2] + this.z[3]) / 4.0F; +/* 224 */ float cU = this.xTileOffset + this.xTile / 2.0F; +/* 225 */ float cV = this.yTileOffset + this.yTile / 2.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 232 */ this.t[0] = new Polygon(3, this.mat); +/* 233 */ this.t[0].setVertex(0, 0.0F, 0.0F, this.z[0], this.xTileOffset, this.yTileOffset); +/* 234 */ this.t[0].setVertex(1, cx, cy, cz, cU, cV); +/* 235 */ this.t[0].setVertex(2, 0.0F, this.yDim, this.z[1], this.xTileOffset, this.yTileOffset + this.yTile); +/* 236 */ add(this.t[0]); +/* */ +/* 238 */ this.t[1] = new Polygon(3, this.mat); +/* 239 */ this.t[1].setVertex(0, 0.0F, this.yDim, this.z[1], this.xTileOffset, this.yTileOffset + this.yTile); +/* 240 */ this.t[1].setVertex(1, cx, cy, cz, cU, cV); +/* 241 */ this.t[1].setVertex(2, this.xDim, this.yDim, this.z[2], this.xTileOffset + this.xTile, this.yTileOffset + this.yTile); +/* 242 */ add(this.t[1]); +/* */ +/* 244 */ this.t[2] = new Polygon(3, this.mat); +/* 245 */ this.t[2].setVertex(0, this.xDim, this.yDim, this.z[2], this.xTileOffset + this.xTile, this.yTileOffset + this.yTile); +/* 246 */ this.t[2].setVertex(1, cx, cy, cz, cU, cV); +/* 247 */ this.t[2].setVertex(2, this.xDim, 0.0F, this.z[3], this.xTileOffset + this.xTile, this.yTileOffset); +/* 248 */ add(this.t[2]); +/* */ +/* 250 */ this.t[3] = new Polygon(3, this.mat); +/* 251 */ this.t[3].setVertex(0, this.xDim, 0.0F, this.z[3], this.xTileOffset + this.xTile, this.yTileOffset); +/* 252 */ this.t[3].setVertex(1, cx, cy, cz, cU, cV); +/* 253 */ this.t[3].setVertex(2, 0.0F, 0.0F, this.z[0], this.xTileOffset, this.yTileOffset); +/* 254 */ add(this.t[3]); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setCornerHeight(int corner, float height) +/* */ { +/* 268 */ this.z[corner] = height; +/* 269 */ createAppearance(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setWidth(float v) +/* */ { +/* 278 */ this.xDim = v; +/* 279 */ createAppearance(); +/* */ } +/* */ +/* */ public void setLength(float v) +/* */ { +/* 284 */ this.yDim = v; +/* 285 */ createAppearance(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform spin(float x, float y, float z, float a) +/* */ { +/* 297 */ if ((x != 0.0F) || (y != 0.0F)) { +/* 298 */ System.out.println( +/* 299 */ "ERROR: cannot spin floor patch out of horizontal!"); +/* 300 */ return this; +/* */ } +/* 302 */ return super.spin(x, y, z, a); +/* */ } +/* */ +/* */ public Transform postspin(float x, float y, float z, float a) { +/* 306 */ if ((x != 0.0F) || (y != 0.0F)) { +/* 307 */ System.out.println( +/* 308 */ "ERROR: cannot spin floor patch out of horizontal!"); +/* 309 */ return this; +/* */ } +/* 311 */ return super.spin(x, y, z, a); +/* */ } +/* */ +/* */ public Transform worldSpin(float x, float y, float z, float a) { +/* 315 */ if ((x != 0.0F) || (y != 0.0F)) { +/* 316 */ System.out.println( +/* 317 */ "ERROR: cannot spin floor patch out of horizontal!"); +/* 318 */ return this; +/* */ } +/* 320 */ return super.spin(x, y, z, a); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 330 */ Object ret = null; +/* 331 */ switch (index - offset) { +/* */ case 0: +/* 333 */ if (mode == 0) { +/* 334 */ ret = FloatPropertyEditor.make( +/* 335 */ new Property(this, index, "Length (y)")); +/* 336 */ } else if (mode == 1) { +/* 337 */ ret = new Float(this.yDim); +/* 338 */ } else if (mode == 2) +/* 339 */ setLength(((Float)value).floatValue()); +/* 340 */ break; +/* */ case 1: +/* 342 */ if (mode == 0) { +/* 343 */ ret = FloatPropertyEditor.make( +/* 344 */ new Property(this, index, "Width (x)")); +/* 345 */ } else if (mode == 1) { +/* 346 */ ret = new Float(this.xDim); +/* 347 */ } else if (mode == 2) +/* 348 */ setWidth(((Float)value).floatValue()); +/* 349 */ break; +/* */ case 2: +/* 351 */ if (mode == 0) { +/* 352 */ ret = FloatPropertyEditor.make( +/* 353 */ new Property(this, index, "0,0 corner")); +/* 354 */ } else if (mode == 1) { +/* 355 */ ret = new Float(this.z[0]); +/* 356 */ } else if (mode == 2) +/* 357 */ setCornerHeight(0, ((Float)value).floatValue()); +/* 358 */ break; +/* */ case 3: +/* 360 */ if (mode == 0) { +/* 361 */ ret = FloatPropertyEditor.make( +/* 362 */ new Property(this, index, "0,y corner")); +/* 363 */ } else if (mode == 1) { +/* 364 */ ret = new Float(this.z[1]); +/* 365 */ } else if (mode == 2) +/* 366 */ setCornerHeight(1, ((Float)value).floatValue()); +/* 367 */ break; +/* */ case 4: +/* 369 */ if (mode == 0) { +/* 370 */ ret = FloatPropertyEditor.make( +/* 371 */ new Property(this, index, "x,y corner")); +/* 372 */ } else if (mode == 1) { +/* 373 */ ret = new Float(this.z[2]); +/* 374 */ } else if (mode == 2) +/* 375 */ setCornerHeight(2, ((Float)value).floatValue()); +/* 376 */ break; +/* */ case 5: +/* 378 */ if (mode == 0) { +/* 379 */ ret = FloatPropertyEditor.make( +/* 380 */ new Property(this, index, "x,0 corner")); +/* 381 */ } else if (mode == 1) { +/* 382 */ ret = new Float(this.z[3]); +/* 383 */ } else if (mode == 2) +/* 384 */ setCornerHeight(3, ((Float)value).floatValue()); +/* 385 */ break; +/* */ case 6: +/* 387 */ if (mode == 0) { +/* 388 */ ret = FloatPropertyEditor.make( +/* 389 */ new Property(this, index, "# Tiles (x)")); +/* 390 */ } else if (mode == 1) { +/* 391 */ ret = new Float(this.xTile); +/* 392 */ } else if (mode == 2) { +/* 393 */ this.xTile = ((Float)value).floatValue(); +/* 394 */ createAppearance(); +/* */ } +/* 396 */ break; +/* */ case 7: +/* 398 */ if (mode == 0) { +/* 399 */ ret = FloatPropertyEditor.make( +/* 400 */ new Property(this, index, "# Tiles (y)")); +/* 401 */ } else if (mode == 1) { +/* 402 */ ret = new Float(this.yTile); +/* 403 */ } else if (mode == 2) { +/* 404 */ this.yTile = ((Float)value).floatValue(); +/* 405 */ createAppearance(); +/* */ } +/* 407 */ break; +/* */ case 8: +/* 409 */ if (mode == 0) { +/* 410 */ ret = FloatPropertyEditor.make( +/* 411 */ new Property(this, index, "Tile Offset (x)")); +/* 412 */ } else if (mode == 1) { +/* 413 */ ret = new Float(this.xTileOffset); +/* 414 */ } else if (mode == 2) { +/* 415 */ this.xTileOffset = ((Float)value).floatValue(); +/* 416 */ createAppearance(); +/* */ } +/* 418 */ break; +/* */ case 9: +/* 420 */ if (mode == 0) { +/* 421 */ ret = FloatPropertyEditor.make( +/* 422 */ new Property(this, index, "Tile Offset (y)")); +/* 423 */ } else if (mode == 1) { +/* 424 */ ret = new Float(this.yTileOffset); +/* 425 */ } else if (mode == 2) { +/* 426 */ this.yTileOffset = ((Float)value).floatValue(); +/* 427 */ createAppearance(); +/* */ } +/* 429 */ break; +/* */ case 10: +/* 431 */ if (mode == 0) { +/* 432 */ ret = new Property(this, index, "Material"); +/* 433 */ } else if (mode == 1) { +/* 434 */ ret = this.mat; +/* */ } +/* 436 */ break; +/* */ default: +/* 438 */ ret = super.properties(index, offset + 11, mode, value); +/* */ } +/* */ +/* 441 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 448 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 452 */ s.saveVersion(2, classCookie); +/* 453 */ removeAppearance(); +/* 454 */ super.saveState(s); +/* 455 */ s.saveFloat(this.xDim); +/* 456 */ s.saveFloat(this.yDim); +/* 457 */ for (int i = 0; i < 4; i++) +/* 458 */ s.saveFloat(this.z[i]); +/* 459 */ s.saveFloat(this.xTile); +/* 460 */ s.saveFloat(this.xTileOffset); +/* 461 */ s.saveFloat(this.yTile); +/* 462 */ s.saveFloat(this.yTileOffset); +/* 463 */ s.saveMaybeNull(this.mat); +/* 464 */ createAppearance(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 469 */ restoreStateRectPatchHelper(r, classCookie); +/* */ } +/* */ +/* */ public void restoreStateRectPatchHelper(Restorer r, Object cookie) +/* */ throws IOException, TooNewException +/* */ { +/* 475 */ switch (r.restoreVersion(cookie)) { +/* */ case 2: +/* 477 */ super.restoreState(r); +/* 478 */ this.xDim = r.restoreFloat(); +/* 479 */ this.yDim = r.restoreFloat(); +/* 480 */ for (int i = 0; i < 4; i++) +/* 481 */ this.z[i] = r.restoreFloat(); +/* 482 */ this.xTile = r.restoreFloat(); +/* 483 */ this.xTileOffset = r.restoreFloat(); +/* 484 */ this.yTile = r.restoreFloat(); +/* 485 */ this.yTileOffset = r.restoreFloat(); +/* 486 */ setMaterial(Material.restore(r)); +/* 487 */ break; +/* */ case 1: +/* 489 */ r.setOldFlag(); +/* 490 */ super.restoreState(r); +/* 491 */ this.xDim = r.restoreFloat(); +/* 492 */ this.yDim = r.restoreFloat(); +/* 493 */ for (int i = 0; i < 4; i++) +/* 494 */ this.z[i] = r.restoreFloat(); +/* 495 */ this.xTile = r.restoreFloat(); +/* 496 */ this.xTileOffset = r.restoreFloat(); +/* 497 */ this.yTile = r.restoreFloat(); +/* 498 */ this.yTileOffset = r.restoreFloat(); +/* 499 */ setMaterial(Material.restore(r)); +/* 500 */ r.restoreMaybeNull(); +/* 501 */ r.restoreMaybeNull(); +/* 502 */ r.restoreMaybeNull(); +/* 503 */ r.restoreMaybeNull(); +/* 504 */ break; +/* */ case 0: +/* 506 */ r.setOldFlag(); +/* 507 */ super.restoreState(r); +/* 508 */ this.xDim = r.restoreFloat(); +/* 509 */ this.yDim = r.restoreFloat(); +/* 510 */ for (int i = 0; i < 4; i++) +/* 511 */ this.z[i] = r.restoreFloat(); +/* 512 */ setVisible(false); +/* */ +/* 514 */ break; +/* */ default: +/* 516 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 526 */ return super.toString() + "[" + this.xDim + "," + this.yDim + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RectPatch.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Recycler.java b/NET/worlds/scape/Recycler.java new file mode 100644 index 0000000..3f5988c --- /dev/null +++ b/NET/worlds/scape/Recycler.java @@ -0,0 +1,154 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Recycler +/* */ implements MainCallback +/* */ { +/* 33 */ private static int minCapacity = 50; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 43 */ private Object[] list = new Object[minCapacity]; +/* */ +/* */ +/* */ +/* */ +/* 48 */ private int numFilled = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 54 */ private int numAllocked = 0; +/* */ +/* 56 */ private int maxAllockedRecently = 0; +/* 57 */ private int howRecently = 0; +/* */ +/* */ Recycler() +/* */ { +/* 61 */ Main.register(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void resizeTo(int newCapacity) +/* */ { +/* 70 */ assert (newCapacity > this.numAllocked); +/* */ +/* 72 */ if (newCapacity < minCapacity) { +/* 73 */ newCapacity = minCapacity; +/* */ } +/* */ +/* */ +/* 77 */ if ((newCapacity < this.list.length) && +/* 78 */ (this.list.length < 2 * newCapacity)) +/* */ { +/* 80 */ while (this.numFilled > newCapacity) { +/* 81 */ this.list[(--this.numFilled)] = null; +/* */ } +/* */ } else { +/* 84 */ Object[] newList = new Object[newCapacity]; +/* */ try { +/* 86 */ System.arraycopy(this.list, 0, newList, 0, this.numAllocked); +/* 87 */ } catch (Exception e) { throw new Error(e.toString()); +/* */ } +/* 89 */ this.list = newList; +/* 90 */ this.numFilled = this.numAllocked; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void mainCallback() +/* */ { +/* 101 */ if (this.numAllocked > this.maxAllockedRecently) { +/* 102 */ this.maxAllockedRecently = this.numAllocked; +/* */ } +/* 104 */ if (++this.howRecently == 1000) +/* */ { +/* 106 */ int newCapacity = this.maxAllockedRecently + minCapacity; +/* */ +/* */ +/* 109 */ if (newCapacity < this.list.length) { +/* 110 */ resizeTo(newCapacity); +/* */ } +/* 112 */ this.howRecently = 0; +/* 113 */ this.maxAllockedRecently = this.numAllocked; +/* */ } +/* */ +/* 116 */ this.numAllocked = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object alloc() +/* */ { +/* 125 */ assert (Main.isMainThread()); +/* */ +/* 127 */ if (this.numAllocked == this.numFilled) { +/* 128 */ return null; +/* */ } +/* 130 */ return this.list[(this.numAllocked++)]; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recycle(Object o) +/* */ { +/* 142 */ if (this.numFilled == this.list.length) +/* */ { +/* 144 */ resizeTo(this.list.length * 2); +/* */ } +/* 146 */ this.list[(this.numFilled++)] = o; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Recycler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RelativeMoveAction.java b/NET/worlds/scape/RelativeMoveAction.java new file mode 100644 index 0000000..0b90c31 --- /dev/null +++ b/NET/worlds/scape/RelativeMoveAction.java @@ -0,0 +1,301 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RelativeMoveAction +/* */ extends Action +/* */ { +/* */ int startTime; +/* 59 */ public int cycleTime = 1000; +/* */ +/* 61 */ public int cycles = 1; +/* 62 */ public boolean loopInfinite = false; +/* */ +/* */ +/* 65 */ public Point3 extentPoint = new Point3(); +/* 66 */ public Point3 extentScale = new Point3(1.0F, 1.0F, 1.0F); +/* 67 */ public Point3 extentSpin = new Point3(0.0F, 0.0F, -1.0F); +/* 68 */ public float extentRotation = 0.0F; +/* */ +/* */ +/* */ +/* */ +/* */ public float accumulatedRotation; +/* */ +/* */ +/* */ +/* */ +/* */ public Point3 accumulatedScale; +/* */ +/* */ +/* */ +/* */ +/* */ public Point3 accumulatedPoint; +/* */ +/* */ +/* */ +/* */ +/* */ protected Persister activeID; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 96 */ Object owner = getOwner(); +/* 97 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 98 */ return null; +/* 99 */ WObject o = (WObject)owner; +/* */ +/* */ +/* 102 */ if (seqID == null) +/* */ { +/* */ +/* 105 */ if (this.activeID != null) { +/* 106 */ return this.activeID; +/* */ } +/* */ +/* 109 */ this.startTime = Std.getRealTime(); +/* 110 */ this.activeID = new SuperRoot(); +/* 111 */ seqID = this.activeID; +/* 112 */ this.accumulatedRotation = 0.0F; +/* 113 */ this.accumulatedPoint = new Point3(0.0F, 0.0F, 0.0F); +/* 114 */ this.accumulatedScale = new Point3(1.0F, 1.0F, 1.0F); +/* */ } +/* */ +/* */ +/* 118 */ if (seqID != this.activeID) +/* 119 */ return null; +/* 120 */ int currentTime = Std.getRealTime(); +/* 121 */ int cycleNo = (currentTime - this.startTime) / this.cycleTime; +/* */ +/* 123 */ float frameLoc = 1.0F; +/* 124 */ if ((cycleNo >= this.cycles) && (!this.loopInfinite)) { +/* 125 */ this.activeID = null; +/* */ } else { +/* 127 */ frameLoc = (currentTime - this.startTime) % this.cycleTime / this.cycleTime; +/* */ } +/* */ +/* */ +/* 131 */ float tmpSpin = this.extentRotation * frameLoc; +/* 132 */ o.spin(this.extentSpin, tmpSpin - this.accumulatedRotation); +/* 133 */ this.accumulatedRotation = tmpSpin; +/* */ +/* 135 */ Point3 tmpScale = new Point3( +/* 136 */ (float)Math.pow(this.extentScale.x, frameLoc), +/* 137 */ (float)Math.pow(this.extentScale.y, frameLoc), +/* 138 */ (float)Math.pow(this.extentScale.z, frameLoc)); +/* 139 */ o.scale(Point3Temp.make(tmpScale).dividedBy(this.accumulatedScale)); +/* 140 */ this.accumulatedScale = tmpScale; +/* */ +/* 142 */ Point3 tmpPoint = new Point3(Point3Temp.make(this.extentPoint) +/* 143 */ .times(frameLoc)); +/* 144 */ o.moveBy(Point3Temp.make(tmpPoint) +/* 145 */ .minus(this.accumulatedPoint)); +/* 146 */ this.accumulatedPoint = tmpPoint; +/* */ +/* 148 */ return this.activeID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 158 */ Object ret = null; +/* 159 */ switch (index - offset) { +/* */ case 0: +/* 161 */ if (mode == 0) { +/* 162 */ ret = FloatPropertyEditor.make( +/* 163 */ new Property(this, index, "Cycle Time (in seconds)")); +/* 164 */ } else if (mode == 1) { +/* 165 */ ret = new Float(this.cycleTime / 1000.0F); +/* 166 */ } else if (mode == 2) +/* 167 */ this.cycleTime = ((int)(1000.0F * ((Float)value).floatValue())); +/* 168 */ break; +/* */ case 1: +/* 170 */ if (mode == 0) { +/* 171 */ ret = IntegerPropertyEditor.make( +/* 172 */ new Property(this, index, "Cycles")); +/* 173 */ } else if (mode == 1) { +/* 174 */ ret = new Integer(this.cycles); +/* 175 */ } else if (mode == 2) +/* 176 */ this.cycles = ((Integer)value).intValue(); +/* 177 */ break; +/* */ case 2: +/* 179 */ if (mode == 0) { +/* 180 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 181 */ "Loop Infinite"), "False", "True"); +/* 182 */ } else if (mode == 1) { +/* 183 */ ret = new Boolean(this.loopInfinite); +/* 184 */ } else if (mode == 2) +/* 185 */ this.loopInfinite = ((Boolean)value).booleanValue(); +/* 186 */ break; +/* */ case 3: +/* 188 */ if (mode == 0) { +/* 189 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 190 */ "Translation Extent")); +/* 191 */ } else if (mode == 1) { +/* 192 */ ret = new Point3(this.extentPoint); +/* 193 */ } else if (mode == 2) +/* 194 */ this.extentPoint.copy((Point3)value); +/* 195 */ break; +/* */ case 4: +/* 197 */ if (mode == 0) { +/* 198 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 199 */ "Scale Extent")); +/* 200 */ } else if (mode == 1) { +/* 201 */ ret = new Point3(this.extentScale); +/* 202 */ } else if (mode == 2) +/* 203 */ this.extentScale.copy((Point3)value); +/* 204 */ break; +/* */ case 5: +/* 206 */ if (mode == 0) { +/* 207 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 208 */ "Spin Axis For Extent")); +/* 209 */ } else if (mode == 1) { +/* 210 */ Point3 p = new Point3(this.extentSpin); +/* */ +/* 212 */ p.x = (Math.round(p.x * 10000.0F) / 10000.0F); +/* 213 */ p.y = (Math.round(p.y * 10000.0F) / 10000.0F); +/* 214 */ p.z = (Math.round(p.z * 10000.0F) / 10000.0F); +/* 215 */ ret = p; +/* */ } +/* 217 */ else if (mode == 2) { +/* 218 */ this.extentSpin.copy((Point3)value); } +/* 219 */ break; +/* */ case 6: +/* 221 */ if (mode == 0) { +/* 222 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 223 */ "Extent Rotation Amount")); +/* 224 */ } else if (mode == 1) { +/* 225 */ ret = new Float(this.extentRotation); +/* 226 */ } else if (mode == 2) +/* 227 */ this.extentRotation = ((Float)value).floatValue(); +/* 228 */ break; +/* */ default: +/* 230 */ ret = super.properties(index, offset + 7, mode, value); +/* */ } +/* 232 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 237 */ String retVal = super.toString() + +/* 238 */ "[cycleTime " + this.cycleTime / 1000.0F + ", cycles " + this.cycles + ", "; +/* 239 */ if (!this.loopInfinite) +/* 240 */ retVal = retVal + " NOT"; +/* 241 */ retVal = retVal + " Infinite]"; +/* */ +/* 243 */ return retVal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 249 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 253 */ s.saveVersion(5, classCookie); +/* 254 */ super.saveState(s); +/* */ +/* 256 */ s.saveBoolean(this.loopInfinite); +/* 257 */ s.saveInt(this.cycleTime); +/* 258 */ s.saveInt(this.cycles); +/* 259 */ s.save(this.extentPoint); +/* 260 */ s.save(this.extentScale); +/* 261 */ s.save(this.extentSpin); +/* 262 */ s.saveFloat(this.extentRotation); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 267 */ switch (r.restoreVersion(classCookie)) { +/* */ case 5: +/* 269 */ super.restoreState(r); +/* 270 */ this.loopInfinite = r.restoreBoolean(); +/* 271 */ this.cycleTime = r.restoreInt(); +/* 272 */ this.cycles = r.restoreInt(); +/* 273 */ this.extentPoint = ((Point3)r.restore()); +/* 274 */ this.extentScale = ((Point3)r.restore()); +/* 275 */ this.extentSpin = ((Point3)r.restore()); +/* */ +/* 277 */ this.extentRotation = r.restoreFloat(); +/* 278 */ break; +/* */ case 4: +/* 280 */ super.restoreState(r); +/* 281 */ this.cycleTime = r.restoreInt(); +/* 282 */ this.cycles = r.restoreInt(); +/* */ +/* 284 */ this.extentPoint = ((Point3)r.restore()); +/* 285 */ this.extentScale = ((Point3)r.restore()); +/* 286 */ this.extentSpin = ((Point3)r.restore()); +/* */ +/* 288 */ this.extentRotation = r.restoreFloat(); +/* 289 */ break; +/* */ +/* */ default: +/* 292 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RelativeMoveAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RemotePortal.java b/NET/worlds/scape/RemotePortal.java new file mode 100644 index 0000000..b60d55f --- /dev/null +++ b/NET/worlds/scape/RemotePortal.java @@ -0,0 +1,132 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RemotePortal +/* */ extends WObject +/* */ { +/* 45 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 49 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 57 */ Portal p = new Portal(); +/* 58 */ r.replace(this, p); +/* */ +/* 60 */ int vers = r.restoreVersion(classCookie); +/* */ +/* 62 */ WObject dlRepresentation = null; +/* 63 */ WObject initialRepresentation = null; +/* */ +/* 65 */ p.superRestoreState(r); +/* 66 */ Point3 p1 = (Point3)r.restore(); +/* 67 */ Point3 p2 = (Point3)r.restore(); +/* 68 */ p.moveTo(p1); +/* 69 */ p.setFarCorner(p2); +/* */ +/* 71 */ Point3 p3 = (Point3)r.restore(); +/* 72 */ Point3 p4 = (Point3)r.restore(); +/* 73 */ URL wname = URL.restore(r); +/* 74 */ String rname = r.restoreString(); +/* 75 */ p.connectTo(wname, rname, p3, p4); +/* */ +/* 77 */ switch (vers) { +/* */ case 0: +/* 79 */ r.setOldFlag(); +/* */ +/* */ +/* 82 */ r.restoreBoolean(); +/* */ +/* 84 */ dlRepresentation = (WObject)r.restoreMaybeNull(); +/* 85 */ initialRepresentation = (WObject)r.restoreMaybeNull(); +/* */ +/* */ +/* 88 */ r.restoreMaybeNull(); +/* 89 */ break; +/* */ +/* */ case 1: +/* 92 */ dlRepresentation = (WObject)r.restoreMaybeNull(); +/* 93 */ initialRepresentation = (WObject)r.restoreMaybeNull(); +/* 94 */ break; +/* */ +/* */ default: +/* 97 */ throw new TooNewException(); +/* */ } +/* */ +/* 100 */ if ((initialRepresentation instanceof Surface)) { +/* 101 */ Surface s = (Surface)initialRepresentation; +/* 102 */ Material m = s.getMaterial(); +/* 103 */ s.setMaterial(null); +/* 104 */ p.setMaterial(m); +/* */ } +/* 106 */ if ((dlRepresentation instanceof Surface)) { +/* 107 */ Surface s = (Surface)dlRepresentation; +/* 108 */ Material m = s.getMaterial(); +/* 109 */ s.setMaterial(null); +/* 110 */ p.setMaterial(m); +/* */ } +/* */ +/* */ +/* 114 */ if (initialRepresentation != null) { +/* 115 */ Enumeration en = initialRepresentation.getHandlers(); +/* 116 */ while (en.hasMoreElements()) { +/* 117 */ SuperRoot h = (SuperRoot)en.nextElement(); +/* 118 */ initialRepresentation.removeHandler(h); +/* 119 */ p.addHandler(h); +/* */ +/* */ +/* 122 */ en = initialRepresentation.getHandlers(); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RemotePortal.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RemoveObjectAction.java b/NET/worlds/scape/RemoveObjectAction.java new file mode 100644 index 0000000..a19f80b --- /dev/null +++ b/NET/worlds/scape/RemoveObjectAction.java @@ -0,0 +1,91 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RemoveObjectAction +/* */ extends SetPropertyAction +/* */ { +/* */ private SuperRoot _value; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 24 */ assert (!useParam()); +/* 25 */ remove(this._value); +/* 26 */ return null; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 32 */ Object ret = null; +/* 33 */ switch (index - offset) { +/* */ case 0: +/* 35 */ if (mode == 0) { +/* 36 */ VectorProperty vp = new VectorProperty(this, index, "Object to Remove"); +/* 37 */ SuperRoot target = getTarget(); +/* 38 */ if ((this._value == null) && (target != null)) +/* */ { +/* */ +/* 41 */ ret = ObjectPropertyAdder.make(vp, target, "NET.worlds.scape.SuperRoot"); +/* */ } else { +/* 43 */ vp.allowSetNull(); +/* 44 */ ret = vp; +/* */ } +/* 46 */ } else if (mode == 1) { +/* 47 */ Vector vret = new Vector(1); +/* 48 */ if (this._value != null) { +/* 49 */ vret.addElement(this._value); +/* */ } +/* 51 */ ret = vret; +/* 52 */ } else if (mode == 4) { +/* 53 */ assert (value == this._value); +/* 54 */ this._value = null; +/* 55 */ } else if (mode == 3) { +/* 56 */ assert (this._value == null); +/* 57 */ this._value = ((SuperRoot)value); +/* */ } +/* 59 */ break; +/* */ default: +/* 61 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 63 */ return ret; +/* */ } +/* */ +/* 66 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 69 */ s.saveVersion(1, classCookie); +/* 70 */ super.saveState(s); +/* 71 */ s.saveMaybeNull(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 75 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 77 */ super.restoreState(r); +/* 78 */ this._value = ((SuperRoot)r.restoreMaybeNull()); +/* 79 */ break; +/* */ +/* */ default: +/* 82 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RemoveObjectAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RenderWare.java b/NET/worlds/scape/RenderWare.java new file mode 100644 index 0000000..f59e26e --- /dev/null +++ b/NET/worlds/scape/RenderWare.java @@ -0,0 +1,14 @@ +package NET.worlds.scape; + +public class RenderWare +{ + public static native boolean get3DHardwareInUse(); + + public static native boolean get3DHardwareAvailable(); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RenderWare.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Restorer.java b/NET/worlds/scape/Restorer.java new file mode 100644 index 0000000..e53fdc3 --- /dev/null +++ b/NET/worlds/scape/Restorer.java @@ -0,0 +1,678 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.DataInput; +/* */ import java.io.DataInputStream; +/* */ import java.io.File; +/* */ import java.io.FileInputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Restorer +/* */ { +/* */ public DataInput is; +/* */ private boolean myFile; +/* */ private Hashtable> classTable; +/* */ private Hashtable objectTable; +/* */ private Hashtable cookieTable; +/* */ private URL reference; +/* */ private int _version; +/* */ private boolean _oldFlag; +/* */ +/* */ public URL getReferenceURL() +/* */ { +/* 139 */ return this.reference; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 158 */ private int _dblevel = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 164 */ private Integer _firstRead = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final int version() +/* */ { +/* 172 */ return this._version; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Restorer(String fileName) +/* */ throws IOException, BadFormatException, TooNewException +/* */ { +/* 182 */ this(new DataInputStream(new FileInputStream(new File(fileName)))); +/* */ +/* 184 */ if (this._dblevel > 0) { +/* 185 */ System.out.println("Restoring from " + fileName); +/* */ } +/* */ +/* 188 */ this.myFile = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Restorer(String fileName, URL url) +/* */ throws IOException, BadFormatException, TooNewException +/* */ { +/* 197 */ this(fileName); +/* 198 */ this.reference = url; +/* */ } +/* */ +/* */ public Restorer(URL url) +/* */ throws IOException, BadFormatException, TooNewException +/* */ { +/* 204 */ this(url.unalias(), url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Restorer(DataInput is) +/* */ throws IOException, BadFormatException, TooNewException +/* */ { +/* 213 */ this.is = is; +/* */ +/* 215 */ this._dblevel = IniFile.gamma().getIniInt("RESTORE_DEBUG", 0); +/* */ +/* */ +/* 218 */ String header = restoreString(); +/* 219 */ if ((header == null) || (!header.equals("PERSISTER Worlds, Inc."))) +/* 220 */ throw new BadFormatException(); +/* 221 */ this._version = restoreInt(); +/* 222 */ if (this._dblevel > 0) +/* 223 */ System.out.println("Persister version " + this._version + " {"); +/* 224 */ if (this._version < 1) +/* 225 */ throw new BadFormatException(); +/* 226 */ if (this._version > Saver.version()) { +/* 227 */ throw new TooNewException(); +/* */ } +/* 229 */ this.classTable = new Hashtable(); +/* 230 */ this.objectTable = new Hashtable(); +/* 231 */ this.cookieTable = new Hashtable(); +/* */ } +/* */ +/* */ public Restorer(DataInput is, URL url) +/* */ throws IOException, BadFormatException, TooNewException +/* */ { +/* 237 */ this(is); +/* 238 */ this.reference = url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int restoreVersion(Object cookie) +/* */ throws IOException +/* */ { +/* 251 */ if (this._version == 1) { +/* 252 */ return 0; +/* */ } +/* 254 */ Integer oldv = (Integer)this.cookieTable.get(cookie); +/* */ int v; +/* 256 */ if (oldv == null) { +/* 257 */ int v = restoreInt(); +/* 258 */ this.cookieTable.put(cookie, new Integer(v)); +/* */ } else { +/* 260 */ v = oldv.intValue(); } +/* 261 */ return v; +/* */ } +/* */ +/* */ public Persister restore() +/* */ throws IOException, TooNewException +/* */ { +/* 267 */ return restore(true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister restore(boolean restoreContents) +/* */ throws IOException, TooNewException +/* */ { +/* 277 */ boolean firstCall = this._firstRead == null; +/* */ +/* 279 */ Integer hc = new Integer(restoreInt()); +/* 280 */ if (this._dblevel > 0) +/* 281 */ System.out.print("Object:" + Integer.toString(hc.intValue(), 16)); +/* 282 */ if (this.objectTable.containsKey(hc)) { +/* 283 */ Persister obj = (Persister)this.objectTable.get(hc); +/* 284 */ if (this._dblevel > 0) { +/* 285 */ System.out.println(" - old: " + obj.getClass().getName() + " (" + +/* 286 */ Integer.toString(hc.intValue(), 16) + ")"); +/* */ } +/* 288 */ return obj; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 297 */ Persister p = null; +/* */ try { +/* 299 */ Class c = restoreClass(true); +/* 300 */ if (this._dblevel > 0) +/* 301 */ System.out.println(" {"); +/* */ try { +/* 303 */ p = (Persister)c.newInstance(); +/* */ } catch (NoSuchMethodError e) { +/* 305 */ System.out.println(c); +/* 306 */ e.printStackTrace(System.out); +/* 307 */ throw e; +/* */ } +/* */ } catch (InstantiationException e) { +/* 310 */ e.printStackTrace(System.out); +/* 311 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } catch (IllegalAccessException e) { +/* 313 */ e.printStackTrace(System.out); +/* 314 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ +/* 317 */ if (p != null) +/* */ { +/* 319 */ this.objectTable.put(hc, p); +/* */ +/* 321 */ if (restoreContents) +/* 322 */ p.restoreState(this); +/* 323 */ if (this._dblevel > 0) { +/* 324 */ System.out.println((restoreContents ? "} Done with: " : +/* 325 */ "} Created: ") + Integer.toString(hc.intValue(), 16)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 332 */ Persister obj = (Persister)this.objectTable.get(hc); +/* 333 */ if (firstCall) +/* 334 */ this._firstRead = hc; +/* 335 */ return obj; +/* */ } +/* */ } +/* */ +/* */ +/* */ public Vector restoreVectorMaybeNull() +/* */ throws IOException, TooNewException +/* */ { +/* 343 */ if (restoreBoolean()) { +/* 344 */ return restoreVector(); +/* */ } +/* 346 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Persister restoreMaybeNull() +/* */ throws IOException, TooNewException +/* */ { +/* 355 */ if (restoreBoolean()) { +/* 356 */ if (this._dblevel > 0) +/* 357 */ System.out.println("null"); +/* 358 */ return null; +/* */ } +/* 360 */ return restore(); +/* */ } +/* */ +/* */ public Class restoreClass() throws IOException +/* */ { +/* 365 */ return restoreClass(true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Class restoreClass(boolean printdebug) +/* */ throws IOException +/* */ { +/* 377 */ Class c = null; +/* 378 */ Integer classhc = new Integer(restoreInt()); +/* 379 */ if (this.classTable.containsKey(classhc)) +/* */ { +/* 381 */ c = (Class)this.classTable.get(classhc); +/* 382 */ if ((this._dblevel > 0) && (printdebug)) { +/* 383 */ System.out.print("..." + c.getName() + " [" + +/* 384 */ Integer.toString(classhc.intValue(), 16) + "]"); +/* */ } +/* */ +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 392 */ String s = restoreString(); +/* 393 */ if ((this._dblevel > 0) && (printdebug)) +/* 394 */ System.out.print("---" + s + " [" + +/* 395 */ Integer.toString(classhc.intValue(), 16) + "]"); +/* */ try { +/* 397 */ if (s != null) { +/* 398 */ c = Class.forName(s); +/* */ } +/* */ } catch (ClassNotFoundException e) { +/* */ try { +/* 402 */ if (s.equals("NET.worlds.network.World")) +/* */ { +/* 404 */ if (this._dblevel > 0) { +/* 405 */ System.out.print(" (Converting NET.worlds.network.World to NET.worlds.scape.World)"); +/* */ } +/* */ +/* 408 */ c = Class.forName("NET.worlds.scape.World"); +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 414 */ if (this._dblevel > 0) +/* 415 */ System.out.print(" (Converting " + s + +/* 416 */ " to NET.worlds.scape." + s + ")"); +/* 417 */ c = Class.forName("NET.worlds.scape." + s); +/* */ } +/* */ } catch (ClassNotFoundException e2) { +/* 420 */ throw new Error("Can't find class " + s); +/* */ } +/* */ } +/* */ +/* 424 */ this.classTable.put(classhc, c); +/* */ } +/* 426 */ return c; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private native Object makeArray(Class paramClass, int paramInt); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister[] restoreArray() +/* */ throws IOException, TooNewException +/* */ { +/* 445 */ Class arrayclass = null; +/* 446 */ if (this._version > 4) +/* 447 */ arrayclass = restoreClass(false); +/* 448 */ int length = restoreInt(); +/* 449 */ Persister[] pa = null; +/* 450 */ if (arrayclass == null) { +/* 451 */ if (this._dblevel > 0) +/* 452 */ System.out.println("Array of " + Integer.toString(length, 16) + +/* 453 */ " items {"); +/* 454 */ pa = new Persister[length]; +/* */ } else { +/* 456 */ String classname = arrayclass.getName(); +/* */ +/* 458 */ assert (classname.startsWith("[L")); +/* 459 */ assert (classname.endsWith(";")); +/* 460 */ classname = classname.substring(2); +/* 461 */ classname = classname.substring(0, classname.length() - 1); +/* 462 */ if (this._dblevel > 0) +/* 463 */ System.out.println("Array of " + Integer.toString(length, 16) + +/* 464 */ " " + classname + " {"); +/* */ try { +/* 466 */ arrayclass = Class.forName(classname); +/* */ } +/* */ catch (ClassNotFoundException cnfe) +/* */ { +/* 470 */ throw new Error("Can't find class " + classname.substring(1)); +/* */ } +/* 472 */ Object ob = makeArray(arrayclass, length); +/* 473 */ pa = (Persister[])ob; +/* */ } +/* 475 */ for (int i = 0; i < length; i++) { +/* 476 */ pa[i] = restoreMaybeNull(); +/* */ } +/* 478 */ if (this._dblevel > 0) +/* 479 */ System.out.println("} Done with array"); +/* 480 */ return pa; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Vector restoreVector() +/* */ throws IOException, TooNewException +/* */ { +/* 489 */ int length = restoreInt(); +/* 490 */ if (this._dblevel > 0) +/* 491 */ System.out.println("Vector of " + Integer.toString(length, 16) + +/* 492 */ " items {"); +/* 493 */ Vector v = new Vector(length); +/* 494 */ for (int i = 0; i < length; i++) +/* 495 */ v.addElement(restore()); +/* 496 */ if (this._dblevel > 0) +/* 497 */ System.out.println("} Done with vector"); +/* 498 */ return v; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Vector restoreVectorSuperRoot() +/* */ throws IOException, TooNewException +/* */ { +/* 507 */ int length = restoreInt(); +/* 508 */ if (this._dblevel > 0) +/* 509 */ System.out.println("Vector of " + Integer.toString(length, 16) + +/* 510 */ " items {"); +/* 511 */ Vector v = new Vector(length); +/* 512 */ for (int i = 0; i < length; i++) +/* 513 */ v.addElement((SuperRoot)restore()); +/* 514 */ if (this._dblevel > 0) +/* 515 */ System.out.println("} Done with vector"); +/* 516 */ return v; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Vector restoreVectorActions() +/* */ throws IOException, TooNewException +/* */ { +/* 525 */ int length = restoreInt(); +/* 526 */ if (this._dblevel > 0) +/* 527 */ System.out.println("Vector of " + Integer.toString(length, 16) + +/* 528 */ " items {"); +/* 529 */ Vector v = new Vector(length); +/* 530 */ for (int i = 0; i < length; i++) +/* 531 */ v.addElement((Action)restore()); +/* 532 */ if (this._dblevel > 0) +/* 533 */ System.out.println("} Done with vector"); +/* 534 */ return v; +/* */ } +/* */ +/* */ public String restoreString() throws IOException +/* */ { +/* 539 */ if (restoreBoolean()) { +/* 540 */ return null; +/* */ } +/* 542 */ String s = this.is.readUTF(); +/* 543 */ return s; +/* */ } +/* */ +/* */ public boolean restoreBoolean() +/* */ throws IOException +/* */ { +/* 549 */ return this.is.readBoolean(); +/* */ } +/* */ +/* */ public byte restoreByte() throws IOException +/* */ { +/* 554 */ return this.is.readByte(); +/* */ } +/* */ +/* */ public short restoreShort() throws IOException +/* */ { +/* 559 */ return this.is.readShort(); +/* */ } +/* */ +/* */ public int restoreInt() throws IOException +/* */ { +/* 564 */ return this.is.readInt(); +/* */ } +/* */ +/* */ public long restoreLong() throws IOException +/* */ { +/* 569 */ return this.is.readLong(); +/* */ } +/* */ +/* */ public float restoreFloat() throws IOException +/* */ { +/* 574 */ return this.is.readFloat(); +/* */ } +/* */ +/* */ public double restoreDouble() throws IOException +/* */ { +/* 579 */ return this.is.readDouble(); +/* */ } +/* */ +/* */ public void done() throws IOException, Error +/* */ { +/* 584 */ if (this._dblevel > 0) { +/* 585 */ System.out.println("Calling all postRestores"); +/* */ } +/* */ +/* 588 */ Enumeration e = this.objectTable.elements(); +/* 589 */ while (e.hasMoreElements()) { +/* 590 */ Persister p = (Persister)e.nextElement(); +/* 591 */ p.postRestore(this._version); +/* */ } +/* */ +/* */ +/* */ +/* 596 */ e = this.objectTable.elements(); +/* */ +/* */ +/* 599 */ while (e.hasMoreElements()) { +/* 600 */ Object obj = e.nextElement(); +/* */ +/* 602 */ if ((obj != this.objectTable.get(this._firstRead)) && +/* 603 */ ((obj instanceof SuperRoot))) { +/* 604 */ SuperRoot s = (SuperRoot)obj; +/* */ +/* 606 */ if (s.getOwner() == null) { +/* 607 */ System.out.println("Warning: " + s.getName() + +/* 608 */ " was not owned by any object."); +/* */ +/* 610 */ s.finalize(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 619 */ String trailer = restoreString(); +/* 620 */ if (!trailer.equals("END PERSISTER")) { +/* 621 */ throw new Error("Format error in save file"); +/* */ } +/* */ +/* 624 */ if (this.myFile) +/* 625 */ ((DataInputStream)this.is).close(); +/* 626 */ this.classTable = null; +/* 627 */ this.objectTable = null; +/* 628 */ this.cookieTable = null; +/* */ +/* 630 */ if (this._dblevel > 0) { +/* 631 */ System.out.println("} Done with persister"); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void setOldFlag() +/* */ { +/* 638 */ this._oldFlag = true; +/* 639 */ if (this._dblevel > 0) { +/* 640 */ System.out.println("----OLD!----"); +/* */ } +/* */ } +/* */ +/* */ public boolean oldFlag() { +/* 645 */ return this._oldFlag; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void replace(Persister old, Persister replacement) +/* */ { +/* 658 */ System.out.println("Converting a " + old.getClass().getName() + +/* 659 */ " to a " + replacement.getClass().getName()); +/* 660 */ boolean found = false; +/* 661 */ Enumeration oe = this.objectTable.keys(); +/* 662 */ while (oe.hasMoreElements()) { +/* 663 */ Object k = oe.nextElement(); +/* 664 */ if (this.objectTable.get(k) == old) { +/* 665 */ this.objectTable.put(k, replacement); +/* 666 */ found = true; +/* 667 */ break; +/* */ } +/* */ } +/* 670 */ assert (found); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Restorer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RollBehavior.java b/NET/worlds/scape/RollBehavior.java new file mode 100644 index 0000000..02543db --- /dev/null +++ b/NET/worlds/scape/RollBehavior.java @@ -0,0 +1,123 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RollBehavior +/* */ extends VelocityBehavior +/* */ { +/* */ public float rollFactor; +/* */ private long lastTime; +/* */ private float bumpFraction; +/* */ +/* */ public RollBehavior(Point3Temp vel, float diameter) +/* */ { +/* 32 */ super(vel, 0.0F, Point3Temp.make(0.0F, 0.0F, 1.0F), 0.0F, 0.0F); +/* 33 */ this.rollFactor = (360.0F / (3.1416F * diameter)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public RollBehavior() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 49 */ float vel = this.linearVel; +/* 50 */ float dT = (float)(e.time - this.lastTime) / 1000.0F; +/* 51 */ this.bumpFraction = 1.0F; +/* 52 */ super.handle(e); +/* 53 */ if ((vel != 0.0F) && (this.lastTime != 0L)) +/* 54 */ e.receiver.worldSpin(-this.dir.y, this.dir.x, this.dir.z, +/* 55 */ this.dir.length() * dT * vel * this.rollFactor * this.bumpFraction); +/* 56 */ this.lastTime = e.time; +/* 57 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 66 */ this.bumpFraction = b.fraction; +/* 67 */ return super.handle(b); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 76 */ Object ret = null; +/* 77 */ switch (index - offset) { +/* */ case 0: +/* 79 */ if (mode == 0) { +/* 80 */ ret = FloatPropertyEditor.make( +/* 81 */ new Property(this, index, "Roll Factor")); +/* 82 */ } else if (mode == 1) { +/* 83 */ ret = new Float(this.rollFactor); +/* 84 */ } else if (mode == 2) +/* 85 */ this.rollFactor = ((Float)value).floatValue(); +/* 86 */ break; +/* */ default: +/* 88 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 90 */ return ret; +/* */ } +/* */ +/* 93 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 97 */ s.saveVersion(0, classCookie); +/* 98 */ super.saveState(s); +/* 99 */ s.saveFloat(this.rollFactor); +/* */ +/* 101 */ s.saveFloat(this.bumpFraction); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 106 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 108 */ super.restoreState(r); +/* 109 */ this.rollFactor = r.restoreFloat(); +/* */ +/* 111 */ this.bumpFraction = r.restoreFloat(); +/* 112 */ break; +/* */ default: +/* 114 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RollBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RollWidget.java b/NET/worlds/scape/RollWidget.java new file mode 100644 index 0000000..b214541 --- /dev/null +++ b/NET/worlds/scape/RollWidget.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class RollWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public RollWidget(ToolBar toolbar) +/* */ { +/* 22 */ super(toolbar, "roll.gif", Console.message("Roll")); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 27 */ if (Math.abs(deltay) > Math.abs(deltax)) +/* 28 */ deltax = 0.0F; +/* 29 */ Transform t = Transform.make(); +/* 30 */ applyWorldTransform(initialDrag, +/* 31 */ t.spin(getWorldAxis(0, 1, 0), deltax)); +/* 32 */ t.recycle(); +/* 33 */ return "Roll"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RollWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RollingAttribute.java b/NET/worlds/scape/RollingAttribute.java new file mode 100644 index 0000000..0ff6d82 --- /dev/null +++ b/NET/worlds/scape/RollingAttribute.java @@ -0,0 +1,301 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RollingAttribute +/* */ extends Attribute +/* */ { +/* 26 */ RollBehavior rb = new RollBehavior(); +/* */ +/* */ +/* */ +/* */ +/* 31 */ public float initialKickVel = 200.0F; +/* */ +/* */ public RollingAttribute(int attrID) { +/* 34 */ super(attrID); +/* 35 */ this.rb.linearDamp = 0.95F; +/* 36 */ this.rb.rollFactor = 1.0F; +/* 37 */ this.rb.setNotifyAttribute(this); +/* */ } +/* */ +/* */ public RollingAttribute() +/* */ { +/* 42 */ this.rb.linearDamp = 0.8F; +/* 43 */ this.rb.setNotifyAttribute(this); +/* */ } +/* */ +/* */ +/* 47 */ private Point3 kp = new Point3(); +/* 48 */ private float kv = 0.0F; +/* 49 */ private Point3 kd = new Point3(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void set(Point3Temp p, float v, Point3Temp d) +/* */ { +/* 59 */ if ((this.kp.x == p.x) && (this.kp.y == p.y) && (this.kp.x == p.z)) { +/* 60 */ return; +/* */ } +/* 62 */ this.kp.x = p.x; +/* 63 */ this.kp.y = p.y; +/* 64 */ this.kp.z = p.z; +/* 65 */ this.kv = v; +/* 66 */ this.kd.x = d.x; +/* 67 */ this.kd.y = d.y; +/* 68 */ this.kd.z = d.z; +/* */ +/* 70 */ ((WObject)getOwner().getOwner()).moveTo(this.kp); +/* 71 */ this.rb.linearVel = this.kv; +/* 72 */ this.rb.setDir(this.kd); +/* */ +/* 74 */ noteChange(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void notifyStopped() +/* */ { +/* 84 */ WObject ball = (WObject)((Sharer)getOwner()).getOwner(); +/* 85 */ Point3Temp pos = ball.getPosition(); +/* */ +/* 87 */ set(pos, 0.0F, Point3Temp.make(0.0F, 0.0F, 0.0F)); +/* */ } +/* */ +/* */ +/* */ +/* */ public void get(Point3Temp p, float v, Point3Temp d) +/* */ { +/* 94 */ p.x = this.kp.x; +/* 95 */ p.y = this.kp.y; +/* 96 */ p.z = this.kp.z; +/* 97 */ v = this.kv; +/* 98 */ d.x = this.kd.x; +/* 99 */ d.y = this.kd.y; +/* 100 */ d.z = this.kd.z; +/* */ } +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 105 */ WObject parent = (WObject)owner.getOwner(); +/* 106 */ parent.addHandler(this.rb); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 130 */ if ((b.target != b.receiver) || +/* 131 */ (this.rb.linearVel > 0.0F)) +/* */ { +/* */ +/* 134 */ if ((b.target instanceof Camera)) +/* */ { +/* */ +/* 137 */ double dx = this.rb.dir.x; +/* 138 */ double dy = this.rb.dir.y; +/* 139 */ Math.atan2(dx, dy); +/* */ +/* 141 */ double theta = dy + 60.0D * Math.random() - 30.0D; +/* 142 */ double r = dx; +/* 143 */ dx = r * Math.cos(theta * 3.141592653589793D / 180.0D); +/* 144 */ dy = r * Math.sin(theta * 3.141592653589793D / 180.0D); +/* */ +/* 146 */ this.rb.dir.x = ((float)dx); +/* 147 */ this.rb.dir.y = ((float)dy); +/* */ } +/* 149 */ this.rb.processBumpEvent(b); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 156 */ if (((b.target instanceof Camera)) || ((b.source instanceof Camera))) { +/* 157 */ Point3Temp pos = ((WObject)((Sharer)getOwner()).getOwner()) +/* 158 */ .getWorldPosition(); +/* 159 */ set(pos, this.rb.linearVel, this.rb.dir); +/* */ } +/* */ } +/* 162 */ else if (this.rb.linearVel == 0.0F) +/* */ { +/* */ +/* 165 */ Point3Temp pos = b.target.getWorldPosition(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 175 */ WObject kicker = (WObject)b.source; +/* 176 */ float alpha = kicker.getYaw(); +/* 177 */ Point3Temp kpos = kicker.getWorldPosition(); +/* 178 */ double dx = kpos.x - pos.x; +/* 179 */ double dy = kpos.y - pos.y; +/* 180 */ Math.atan2(dx, dy); +/* */ +/* */ +/* */ +/* 184 */ float kickang = (float)((360.0F - alpha + 90.0F) * 3.141592653589793D / 180.0D); +/* */ +/* 186 */ Point3Temp kickdir = Point3Temp.make((float)Math.cos(kickang), +/* 187 */ (float)Math.sin(kickang), 0.0F); +/* */ +/* */ +/* */ +/* 191 */ pos.x += kickdir.x; +/* 192 */ pos.y += kickdir.y; +/* */ +/* */ +/* 195 */ set(pos, this.initialKickVel, kickdir); +/* */ } +/* */ +/* 198 */ return true; +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 203 */ s.writeFloat(this.kp.x); +/* 204 */ s.writeFloat(this.kp.y); +/* 205 */ s.writeFloat(this.kp.z); +/* 206 */ s.writeFloat(this.kv); +/* 207 */ s.writeFloat(this.kd.x); +/* 208 */ s.writeFloat(this.kd.y); +/* 209 */ s.writeFloat(this.kd.z); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 214 */ Point3Temp pos = Point3Temp.make(); +/* 215 */ float vel = 0.0F; +/* 216 */ Point3Temp dir = Point3Temp.make(); +/* */ +/* 218 */ pos.x = ds.readFloat(); +/* 219 */ pos.y = ds.readFloat(); +/* 220 */ pos.z = ds.readFloat(); +/* 221 */ vel = ds.readFloat(); +/* 222 */ dir.x = ds.readFloat(); +/* 223 */ dir.y = ds.readFloat(); +/* 224 */ dir.z = ds.readFloat(); +/* 225 */ set(pos, vel, dir); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 234 */ Object ret = null; +/* 235 */ switch (index - offset) { +/* */ case 0: +/* 237 */ if (mode == 0) { +/* 238 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 239 */ "Roll Factor")); +/* 240 */ } else if (mode == 1) { +/* 241 */ ret = new Float(this.rb.rollFactor); +/* 242 */ } else if (mode == 2) +/* 243 */ this.rb.rollFactor = ((Float)value).floatValue(); +/* 244 */ break; +/* */ case 1: +/* 246 */ if (mode == 0) { +/* 247 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 248 */ "Initial Kick Velocity")); +/* 249 */ } else if (mode == 1) { +/* 250 */ ret = new Float(this.initialKickVel); +/* 251 */ } else if (mode == 2) +/* 252 */ this.initialKickVel = ((Float)value).floatValue(); +/* 253 */ break; +/* */ default: +/* 255 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 257 */ return ret; +/* */ } +/* */ +/* */ +/* 261 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 265 */ s.saveVersion(1, classCookie); +/* 266 */ super.saveState(s); +/* */ +/* 268 */ s.saveFloat(this.initialKickVel); +/* 269 */ s.saveFloat(this.rb.rollFactor); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* */ float threshold; +/* 274 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 276 */ super.restoreState(r); +/* 277 */ this.initialKickVel = r.restoreFloat(); +/* 278 */ threshold = r.restoreFloat(); +/* 279 */ break; +/* */ case 1: +/* 281 */ super.restoreState(r); +/* 282 */ this.initialKickVel = r.restoreFloat(); +/* 283 */ this.rb.rollFactor = r.restoreFloat(); +/* 284 */ break; +/* */ default: +/* 286 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 292 */ return +/* 293 */ super.toString() + " [From " + this.kp + " with velocity " + this.kv + " toward " + this.kd + "] "; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RollingAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Room.java b/NET/worlds/scape/Room.java new file mode 100644 index 0000000..2a915e3 --- /dev/null +++ b/NET/worlds/scape/Room.java @@ -0,0 +1,1542 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.NetworkRoom; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Room +/* */ extends WObject +/* */ implements TeleportStatus +/* */ { +/* */ public WObject highlightTarget; +/* */ private int sceneID; +/* */ +/* */ public Room(World world, String name) +/* */ { +/* 203 */ setName(name); +/* */ +/* 205 */ this.environment = new RoomEnvironment(); +/* 206 */ this.infiniteBackground = new RoomEnvironment(); +/* 207 */ super.add(this.environment); +/* 208 */ super.add(this.infiniteBackground); +/* */ +/* 210 */ if (world != null) { +/* 211 */ world.addRoom(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 222 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) +/* */ { +/* 238 */ if (this.infiniteBackground != null) +/* 239 */ d.addChildElement(this.infiniteBackground); +/* 240 */ if (this.environment != null) +/* 241 */ d.addChildElement(this.environment); +/* 242 */ super.getChildren(d); +/* */ } +/* */ +/* */ +/* */ public void setName(String newName) +/* */ { +/* 248 */ String oldName = getName(); +/* 249 */ super.setName(newName); +/* 250 */ World world = getWorld(); +/* 251 */ if (world != null) +/* 252 */ world.renameRoom(oldName, getName(), this); +/* 253 */ if (oldName.equals(newName)) +/* 254 */ return; +/* 255 */ synchronized (this) +/* */ { +/* 257 */ if (this._netRoom != null) { +/* 258 */ this._netRoom.setName(newName); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ synchronized void register() +/* */ { +/* 267 */ assert (this._netRoom == null); +/* 268 */ this._netRoom = new NetworkRoom(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 276 */ if (hasClump()) { +/* 277 */ System.out.println("Detaching clumped room " + getName()); +/* 278 */ markVoid(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 285 */ assert (this._netRoom != null); +/* 286 */ boolean subscribed = Pilot.getActive().removeSubscribedRoom(this); +/* 287 */ if (subscribed) { +/* 288 */ this._netRoom.unsubscribe(); +/* */ } +/* */ +/* */ +/* 292 */ synchronized (this) { +/* 293 */ this._netRoom.detach(); +/* 294 */ this._netRoom = null; +/* */ } +/* */ +/* */ +/* 298 */ getWorld().removeRoom(this); +/* */ +/* 300 */ super.detach(); +/* */ } +/* */ +/* */ public void discard() +/* */ { +/* 305 */ this.environment.discard(); +/* 306 */ this.infiniteBackground.discard(); +/* */ +/* 308 */ super.discard(); +/* */ +/* 310 */ this.frameHandlers.removeAllElements(); +/* 311 */ this.frameHandlerWObjects.removeAllElements(); +/* 312 */ this.outgoingPortals.removeAllElements(); +/* 313 */ this.aFilters.removeAllElements(); +/* 314 */ this.prerenderHandlers.removeAllElements(); +/* 315 */ this.postrenderHandlers.removeAllElements(); +/* */ } +/* */ +/* */ +/* */ int getSceneID() +/* */ { +/* 321 */ return this.sceneID; +/* */ } +/* */ +/* 324 */ public Point3 defaultPosition = new Point3(100.0F, 100.0F, 120.0F); +/* 325 */ public Point3 defaultOrientationAxis = new Point3(0.0F, 0.0F, -1.0F); +/* 326 */ public float defaultOrientation = 0.0F; +/* */ +/* */ public Point3Temp getDefaultPosition() { +/* 329 */ return Point3Temp.make(this.defaultPosition); +/* */ } +/* */ +/* */ public Point3Temp getDefaultOrientationAxis() { +/* 333 */ return Point3Temp.make(this.defaultOrientationAxis); +/* */ } +/* */ +/* */ public float getDefaultOrientation() { +/* 337 */ return this.defaultOrientation; +/* */ } +/* */ +/* 340 */ String teleportChain = "home:avatargallery/avatar.world#AVATARgallery@65.0,145.0,150.0,89.0"; +/* */ +/* 342 */ int roomLoadTime = 0; +/* 343 */ int teleportInterval = -1; +/* 344 */ boolean teleported = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private RoomEnvironment environment; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public RoomEnvironment getEnvironment() +/* */ { +/* 362 */ return this.environment; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 369 */ private Vector outgoingPortals = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ public Vector getOutgoingPortals() +/* */ { +/* 376 */ return this.outgoingPortals; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addOutgoingPortal(Portal p) +/* */ { +/* 386 */ if (this.outgoingPortals.contains(p)) { +/* 387 */ return; +/* */ } +/* 389 */ this.outgoingPortals.addElement(p); +/* */ +/* 391 */ for (int index = 0; index < this.aFilters.size(); index++) { +/* 392 */ ((AudibilityFilter)this.aFilters.elementAt(index)).moveEmitter(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void removeOutgoingPortal(Portal p) +/* */ { +/* 402 */ this.outgoingPortals.removeElement(p); +/* */ +/* 404 */ Vector v = getAFilters(); +/* 405 */ for (int v_index = 0; v_index < v.size(); v_index++) { +/* 406 */ ((AudibilityFilter)v.elementAt(v_index)).moveEmitter(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 417 */ private Vector aFilters = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Vector getAFilters() +/* */ { +/* 425 */ return this.aFilters; +/* */ } +/* */ +/* */ +/* */ +/* */ public void addAFilter(AudibilityFilter p) +/* */ { +/* 432 */ this.aFilters.addElement(p); +/* */ } +/* */ +/* */ +/* */ +/* */ public void removeAFilter(AudibilityFilter a) +/* */ { +/* 439 */ this.aFilters.removeElement(a); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void move(Room from, Room to) +/* */ { +/* 449 */ Vector v = from.getAFilters(); +/* 450 */ for (int index = 0; index < v.size(); index++) { +/* 451 */ ((AudibilityFilter)v.elementAt(index)).updateListenerState(); +/* */ } +/* 453 */ v = to.getAFilters(); +/* 454 */ for (int index = 0; index < v.size(); index++) { +/* 455 */ ((AudibilityFilter)v.elementAt(index)).updateListenerState(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void setLightPosition(float x, float y, float z) +/* */ { +/* 480 */ if (this.lightid != 0) +/* 481 */ setLightPosition(this.lightid, x, y, z); +/* 482 */ if (this.lightid2 != 0) { +/* 483 */ setLightPosition(this.lightid2, -x, -y, -z); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private void setLightColor(float red, float green, float blue) +/* */ { +/* 491 */ if (this.lightid != 0) +/* 492 */ setLightColor(this.lightid, red, green, blue); +/* 493 */ if (this.lightid2 != 0) +/* 494 */ setLightColor(this.lightid2, red / 2.0F, green / 2.0F, blue / 2.0F); +/* */ } +/* */ +/* 497 */ private Point3 lightPosition = new Point3(-1.0F, 1.0F, -1.0F); +/* 498 */ private Color lightColor = new Color(255, 255, 255); +/* 499 */ private int lightid = 0; +/* 500 */ private int lightid2 = 0; +/* */ +/* */ private int renderStamp; +/* */ +/* */ public void setLightPosition(Point3Temp p) +/* */ { +/* 506 */ this.lightPosition.set(p.x, p.y, p.z); +/* 507 */ setLightPosition(p.x, p.y, p.z); +/* 508 */ RoomEnvironment re = getEnvironment(); +/* 509 */ if (re != null) +/* 510 */ re.setLightPosition(p.x, p.y, p.z); +/* 511 */ re = getInfiniteBackground(); +/* 512 */ if (re != null) { +/* 513 */ re.setLightPosition(p.x, p.y, p.z); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void setLightColor(Color c) +/* */ { +/* 520 */ this.lightColor = new Color(c.getRGB()); +/* */ +/* 522 */ float r = c.getRed() / 256.0F; +/* 523 */ float g = c.getGreen() / 256.0F; +/* 524 */ float b = c.getBlue() / 256.0F; +/* */ +/* 526 */ setLightColor(r, g, b); +/* 527 */ RoomEnvironment re = getEnvironment(); +/* 528 */ if (re != null) +/* 529 */ re.setLightColor(r, g, b); +/* 530 */ re = getInfiniteBackground(); +/* 531 */ if (re != null) +/* 532 */ re.setLightColor(r, g, b); +/* */ } +/* */ +/* */ public Point3Temp getLightPosition() { +/* 536 */ return Point3Temp.make(this.lightPosition); +/* */ } +/* */ +/* */ public Color getLightColor() { +/* 540 */ return new Color(this.lightColor.getRGB()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void noteRef() +/* */ { +/* 553 */ this.renderStamp = Std.getRealTime(); +/* */ +/* 555 */ World w = getWorld(); +/* 556 */ if (w != null) +/* 557 */ w.incRef(); +/* */ } +/* */ +/* 560 */ private static int timeoutAge = 15000; +/* */ +/* */ +/* */ +/* */ +/* */ public void discardIfOld() +/* */ { +/* 567 */ if (hasClump()) { +/* 568 */ int age = Std.getFastTime() - this.renderStamp; +/* 569 */ if (age > timeoutAge) { +/* 570 */ markVoid(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 580 */ private Vector frameHandlers = new Vector(); +/* 581 */ private Vector frameHandlerWObjects = new Vector(); +/* */ +/* */ private Color skyColor; +/* */ +/* */ private Color groundColor; +/* */ +/* */ public void generateFrameEvents(FrameEvent f) +/* */ { +/* 589 */ noteRef(); +/* */ +/* 591 */ if (Main.profile != 0) { +/* 592 */ for (int i = 0; i < this.frameHandlers.size(); i++) { +/* 593 */ FrameHandler fh = (FrameHandler)this.frameHandlers.elementAt(i); +/* 594 */ WObject fhw = (WObject)this.frameHandlerWObjects.elementAt(i); +/* 595 */ int start = Std.getRealTime(); +/* 596 */ long startBytes = Runtime.getRuntime().freeMemory(); +/* */ +/* 598 */ f.retargetAndDeliver(fh, fhw); +/* */ +/* 600 */ int dur = Std.getRealTime() - start; +/* 601 */ long used = startBytes - Runtime.getRuntime().freeMemory(); +/* 602 */ if (dur > Main.profile) { +/* 603 */ if ((fh instanceof SuperRoot)) { +/* 604 */ System.out.println("Took " + dur + "ms and " + used + +/* 605 */ " bytes to call frameHandler " + +/* 606 */ ((SuperRoot)fh).getName() + " of " + +/* 607 */ fhw.getName()); +/* */ } else +/* 609 */ System.out.println("Took " + dur + "ms and " + used + +/* 610 */ " bytes to call frameHandler " + fh + " of " + +/* 611 */ fhw.getName()); +/* */ } +/* */ } +/* */ } else { +/* 615 */ for (int i = 0; i < this.frameHandlers.size(); i++) { +/* 616 */ f.retargetAndDeliver((FrameHandler)this.frameHandlers.elementAt(i), +/* 617 */ (WObject)this.frameHandlerWObjects.elementAt(i)); +/* */ } +/* */ } +/* 620 */ if ((this.teleportChain != null) && (this.teleportInterval != -1) && (!this.teleported) && +/* 621 */ (Std.getSynchronizedTime() % this.teleportInterval == 0)) { +/* 622 */ this.teleported = true; +/* */ +/* 624 */ TeleportAction.teleport(this.teleportChain, this); +/* */ } +/* */ } +/* */ +/* */ public void teleportStatus(String err, String dest) { +/* 629 */ if (err != null) { +/* 630 */ this.teleported = false; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int findFrameHandler(FrameHandler h, WObject o) +/* */ { +/* 640 */ int next = 0; +/* */ for (;;) { +/* 642 */ next = this.frameHandlers.indexOf(h, next); +/* 643 */ if (next == -1) +/* 644 */ return -1; +/* 645 */ if (this.frameHandlerWObjects.elementAt(next) == o) +/* 646 */ return next; +/* 647 */ next++; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ void addFrameHandler(FrameHandler h, WObject o) +/* */ { +/* 656 */ int i = findFrameHandler(h, o); +/* 657 */ if (i < 0) { +/* 658 */ this.frameHandlers.addElement(h); +/* 659 */ this.frameHandlerWObjects.addElement(o); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ void removeFrameHandler(FrameHandler h, WObject o) +/* */ { +/* 668 */ int i = findFrameHandler(h, o); +/* 669 */ if (i >= 0) { +/* 670 */ this.frameHandlers.removeElementAt(i); +/* 671 */ this.frameHandlerWObjects.removeElementAt(i); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 686 */ this.infiniteBackground.markVoid(); +/* 687 */ this.environment.markVoid(); +/* */ +/* 689 */ super.markVoid(); +/* */ +/* 691 */ destroyScene(); +/* 692 */ this.lightid = 0; +/* 693 */ this.lightid2 = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteTransformChange() +/* */ { +/* 701 */ super.noteTransformChange(); +/* */ +/* 703 */ getInfiniteBackground().setTransform(this); +/* 704 */ getEnvironment().setTransform(this); +/* */ +/* */ +/* 707 */ int i = this.outgoingPortals.size(); +/* 708 */ do { ((Portal)this.outgoingPortals.elementAt(i)).discardTransform();i--; +/* 707 */ } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setSkyColor(Color c) +/* */ { +/* 726 */ this.skyColor = c; +/* */ } +/* */ +/* */ +/* */ +/* */ public Color getSkyColor() +/* */ { +/* 733 */ return this.skyColor; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setGroundColor(Color c) +/* */ { +/* 741 */ this.groundColor = c; +/* */ } +/* */ +/* */ +/* */ +/* */ public Color getGroundColor() +/* */ { +/* 748 */ return this.groundColor; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 755 */ private Vector prerenderHandlers = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 762 */ private Vector postrenderHandlers = new Vector(); +/* */ +/* 764 */ private static int isRendering = 4; +/* 765 */ private static int isVIPOnly = 262144; +/* 766 */ private static int isVIPViewOnly = 524288; +/* */ private NetworkRoom _netRoom; +/* */ +/* 769 */ public boolean getVIPOnly() { return (this.flags & isVIPOnly) != 0; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void prerender(Camera cam, float x, float y, float z, float d) +/* */ { +/* 793 */ this.flags |= isRendering; +/* */ +/* 795 */ this.infiniteBackground.prerender(); +/* 796 */ this.environment.prerender(); +/* */ +/* 798 */ Pilot.addVisibleRoom(this, x, y, z, d); +/* */ +/* 800 */ int end = this.prerenderHandlers.size(); +/* 801 */ for (int i = 0; i < end; i++) { +/* 802 */ Prerenderable p = (Prerenderable)this.prerenderHandlers.elementAt(i); +/* 803 */ p.prerender(cam); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void addPrerenderHandler(Prerenderable o) +/* */ { +/* 812 */ assert ((this.flags & isRendering) == 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 818 */ if (!this.prerenderHandlers.contains(o)) { +/* 819 */ this.prerenderHandlers.addElement(o); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void prependPrerenderHandler(Prerenderable o) +/* */ { +/* 833 */ assert ((this.flags & isRendering) == 0); +/* 834 */ if (!this.prerenderHandlers.contains(o)) { +/* 835 */ this.prerenderHandlers.insertElementAt(o, 0); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void removePrerenderHandler(Prerenderable o) +/* */ { +/* 843 */ assert ((this.flags & isRendering) == 0); +/* 844 */ this.prerenderHandlers.removeElement(o); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void postrender(Camera cam, float x, float y, float z, float d) +/* */ { +/* 855 */ Pilot.addVisibleRoom(this, x, y, z, d); +/* */ +/* 857 */ int i = this.postrenderHandlers.size(); +/* 858 */ do { Postrenderable p = (Postrenderable)this.postrenderHandlers.elementAt(i); +/* 859 */ p.postrender(cam);i--; +/* 857 */ } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* 862 */ this.flags &= (isRendering ^ 0xFFFFFFFF); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void addPostrenderHandler(Postrenderable o) +/* */ { +/* 870 */ assert ((this.flags & isRendering) == 0); +/* 871 */ if (!this.postrenderHandlers.contains(o)) { +/* 872 */ this.postrenderHandlers.addElement(o); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void prependPostrenderHandler(Postrenderable o) +/* */ { +/* 886 */ assert ((this.flags & isRendering) == 0); +/* 887 */ if (!this.postrenderHandlers.contains(o)) { +/* 888 */ this.postrenderHandlers.insertElementAt(o, 0); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void removePostrenderHandler(Postrenderable o) +/* */ { +/* 896 */ assert ((this.flags & isRendering) == 0); +/* 897 */ this.postrenderHandlers.removeElement(o); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detectBump(BumpEventTemp b) +/* */ { +/* 906 */ if (this.environment.getBumpable()) +/* 907 */ this.environment.detectBump(b); +/* 908 */ super.detectBump(b); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 916 */ return BoundBoxTemp.make(Point3Temp.make(), Point3Temp.make()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public World getWorld() +/* */ { +/* 924 */ return (World)getOwner(); +/* */ } +/* */ +/* */ public Room getRoom() +/* */ { +/* 929 */ return this; +/* */ } +/* */ +/* */ public Room getRoomFromClump() +/* */ { +/* 934 */ return this; +/* */ } +/* */ +/* */ public Room getRoomNotFromClump() +/* */ { +/* 939 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ public Galaxy getGalaxy() +/* */ { +/* 946 */ World w = getWorld(); +/* 947 */ if (w == null) +/* 948 */ return null; +/* 949 */ return w.getConsole().getGalaxy(); +/* */ } +/* */ +/* */ +/* */ +/* */ public String getURL() +/* */ { +/* 956 */ return getWorld().getSourceURL().getAbsolute() + "#" + getName(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean registerShare(WObject w) +/* */ { +/* 982 */ w.notifyRegister(1); +/* 983 */ return true; +/* */ } +/* */ +/* */ private void processPendingRegistrations() { +/* 987 */ notifyRegister(1); +/* */ } +/* */ +/* */ +/* */ +/* */ public NetworkRoom getNetworkRoom() +/* */ { +/* 994 */ return this._netRoom; +/* */ } +/* */ +/* */ +/* */ void subscribe(RoomSubscribeInfo info) +/* */ { +/* 1000 */ assert (this._netRoom != null); +/* 1001 */ this._netRoom.subscribe(info); +/* */ } +/* */ +/* */ void subscribeDist(RoomSubscribeInfo info) { +/* 1005 */ assert (this._netRoom != null); +/* 1006 */ this._netRoom.subscribeDist(info); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ void unsubscribe() +/* */ { +/* 1014 */ if (this._netRoom != null) { +/* 1015 */ this._netRoom.unsubscribe(); +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* 1021 */ System.out.println(this + ": unsubscribing from bad room?"); +/* 1022 */ new Exception().printStackTrace(System.out); +/* */ } +/* */ } +/* */ +/* 1026 */ private static String[] skyOptions = { "Blue Sky" }; +/* 1027 */ private static String[] groundOptions = { "Green Ground" }; +/* */ +/* 1029 */ private boolean allowTeleport = true; +/* */ +/* */ public boolean getAllowTeleport() { +/* 1032 */ return this.allowTeleport; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 1041 */ Object ret = null; +/* 1042 */ switch (index - offset) { +/* */ case 0: +/* 1044 */ if (mode == 0) { +/* 1045 */ ret = new Property(this, index, "Environment"); +/* 1046 */ } else if (mode == 1) +/* 1047 */ ret = this.environment; +/* 1048 */ break; +/* */ case 1: +/* 1050 */ if (mode == 0) { +/* 1051 */ ret = new Property(this, index, "Infinite Background"); +/* 1052 */ } else if (mode == 1) +/* 1053 */ ret = this.infiniteBackground; +/* 1054 */ break; +/* */ case 2: +/* 1056 */ if (mode == 0) { +/* 1057 */ ret = ColorPropertyEditor.make(new Property(this, index, +/* 1058 */ "Sky Color").allowSetNull()); +/* 1059 */ if (getSkyColor() == null) { +/* 1060 */ ret = MaybeNullPropertyEditor.make((Property)ret, +/* 1061 */ Color.blue); +/* */ } +/* 1063 */ } else if (mode == 1) { +/* 1064 */ ret = getSkyColor(); +/* 1065 */ } else if (mode == 2) { +/* 1066 */ setSkyColor((Color)value); } +/* 1067 */ break; +/* */ case 3: +/* 1069 */ if (mode == 0) { +/* 1070 */ ret = ColorPropertyEditor.make(new Property(this, index, +/* 1071 */ "Ground Color").allowSetNull()); +/* 1072 */ if (getGroundColor() == null) { +/* 1073 */ ret = MaybeNullPropertyEditor.make((Property)ret, +/* 1074 */ Color.green); +/* */ } +/* 1076 */ } else if (mode == 1) { +/* 1077 */ ret = getGroundColor(); +/* 1078 */ } else if (mode == 2) { +/* 1079 */ setGroundColor((Color)value); } +/* 1080 */ break; +/* */ case 4: +/* 1082 */ if (mode == 0) { +/* 1083 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 1084 */ "Default Position")); +/* 1085 */ } else if (mode == 1) { +/* 1086 */ ret = new Point3(getDefaultPosition()); +/* 1087 */ } else if (mode == 2) +/* 1088 */ this.defaultPosition = ((Point3)value); +/* 1089 */ break; +/* */ case 5: +/* 1091 */ if (mode == 0) { +/* 1092 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 1093 */ "Default Orientation Axis")); +/* 1094 */ } else if (mode == 1) { +/* 1095 */ ret = new Point3(getDefaultOrientationAxis()); +/* 1096 */ } else if (mode == 2) +/* 1097 */ this.defaultOrientationAxis = ((Point3)value); +/* 1098 */ break; +/* */ case 6: +/* 1100 */ if (mode == 0) { +/* 1101 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 1102 */ "Default Orientation Angle")); +/* 1103 */ } else if (mode == 1) { +/* 1104 */ ret = new Float(getDefaultOrientation()); +/* 1105 */ } else if (mode == 2) +/* 1106 */ this.defaultOrientation = ((Float)value).floatValue(); +/* 1107 */ break; +/* */ case 7: +/* 1109 */ if (mode == 0) { +/* 1110 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1111 */ "VIP only"), "No", "Yes"); +/* 1112 */ } else if (mode == 1) { +/* 1113 */ ret = new Boolean((this.flags & isVIPOnly) != 0); +/* 1114 */ } else if (mode == 2) { +/* 1115 */ if (((Boolean)value).booleanValue()) { +/* 1116 */ this.flags |= isVIPOnly; +/* */ } else +/* 1118 */ this.flags &= (isVIPOnly ^ 0xFFFFFFFF); +/* */ } +/* 1120 */ break; +/* */ case 8: +/* 1122 */ if (mode == 0) { +/* 1123 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1124 */ "Visible to VIP only"), "No", "Yes"); +/* 1125 */ } else if (mode == 1) { +/* 1126 */ ret = new Boolean((this.flags & isVIPViewOnly) != 0); +/* 1127 */ } else if (mode == 2) { +/* 1128 */ if (((Boolean)value).booleanValue()) { +/* 1129 */ this.flags |= isVIPViewOnly; +/* */ } else +/* 1131 */ this.flags &= (isVIPViewOnly ^ 0xFFFFFFFF); +/* */ } +/* 1133 */ break; +/* */ case 9: +/* 1135 */ if (mode == 0) { +/* 1136 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 1137 */ "Light Source Direction")); +/* 1138 */ } else if (mode == 1) { +/* 1139 */ ret = this.lightPosition; +/* 1140 */ } else if (mode == 2) +/* 1141 */ setLightPosition((Point3)value); +/* 1142 */ break; +/* */ case 10: +/* 1144 */ if (mode == 0) { +/* 1145 */ ret = ColorPropertyEditor.make(new Property(this, index, +/* 1146 */ "Light Color")); +/* 1147 */ } else if (mode == 1) { +/* 1148 */ ret = this.lightColor; +/* 1149 */ } else if (mode == 2) +/* 1150 */ setLightColor((Color)value); +/* 1151 */ break; +/* */ case 11: +/* 1153 */ if (mode == 0) { +/* 1154 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 1155 */ "Time To Auto-Teleport (seconds, -1 = never)")); +/* 1156 */ } else if (mode == 1) { +/* 1157 */ ret = new Integer(this.teleportInterval); +/* 1158 */ } else if (mode == 2) +/* 1159 */ this.teleportInterval = ((Integer)value).intValue(); +/* 1160 */ break; +/* */ case 12: +/* 1162 */ if (mode == 0) { +/* 1163 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 1164 */ "Auto-Teleport destination")); +/* 1165 */ } else if (mode == 1) { +/* 1166 */ ret = this.teleportChain; +/* 1167 */ } else if (mode == 2) +/* 1168 */ this.teleportChain = new String((String)value); +/* 1169 */ break; +/* */ case 13: +/* 1171 */ if (mode == 0) { +/* 1172 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1173 */ "Allow Teleporting"), "No", "Yes"); +/* 1174 */ } else if (mode == 1) { +/* 1175 */ ret = new Boolean(this.allowTeleport); +/* 1176 */ } else if (mode == 2) +/* 1177 */ this.allowTeleport = ((Boolean)value).booleanValue(); +/* 1178 */ break; +/* */ default: +/* 1180 */ ret = super.properties(index, offset + 14, mode, value); +/* */ } +/* 1182 */ return ret; +/* */ } +/* */ +/* 1185 */ private static Object classCookie = new Object(); +/* */ private RoomEnvironment infiniteBackground; +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 1189 */ s.saveVersion(7, classCookie); +/* 1190 */ super.saveState(s); +/* 1191 */ if (this.skyColor != null) { +/* 1192 */ s.saveBoolean(true); +/* 1193 */ s.saveInt(this.skyColor.getRGB()); +/* */ } else { +/* 1195 */ s.saveBoolean(false); } +/* 1196 */ if (this.groundColor != null) { +/* 1197 */ s.saveBoolean(true); +/* 1198 */ s.saveInt(this.groundColor.getRGB()); +/* */ } else { +/* 1200 */ s.saveBoolean(false); } +/* 1201 */ s.save(this.defaultPosition); +/* 1202 */ s.save(this.defaultOrientationAxis); +/* 1203 */ s.saveFloat(this.defaultOrientation); +/* 1204 */ s.save(this.lightPosition); +/* 1205 */ s.saveInt(this.lightColor.getRGB()); +/* */ +/* 1207 */ s.save(this.environment); +/* 1208 */ s.save(this.infiniteBackground); +/* */ +/* 1210 */ s.saveString(this.teleportChain); +/* 1211 */ s.saveInt(this.teleportInterval); +/* */ +/* 1213 */ s.saveBoolean(this.allowTeleport); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 1218 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 1220 */ r.setOldFlag(); +/* 1221 */ super.restoreState(r); +/* 1222 */ setName(r.restoreString()); +/* */ +/* 1224 */ r.restore(); +/* 1225 */ if (r.restoreBoolean()) +/* 1226 */ this.skyColor = new Color(r.restoreInt()); +/* 1227 */ if (r.restoreBoolean()) +/* 1228 */ this.groundColor = new Color(r.restoreInt()); +/* 1229 */ r.restoreMaybeNull(); +/* 1230 */ this.defaultPosition = ((Point3)r.restore()); +/* 1231 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1232 */ this.defaultOrientation = r.restoreFloat(); +/* */ +/* 1234 */ r.restoreVector(); +/* */ +/* 1236 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1237 */ this.infiniteBackground = new RoomEnvironment(); +/* 1238 */ break; +/* */ case 1: +/* 1240 */ r.setOldFlag(); +/* 1241 */ super.restoreState(r); +/* */ +/* 1243 */ r.restore(); +/* 1244 */ if (r.restoreBoolean()) +/* 1245 */ this.skyColor = new Color(r.restoreInt()); +/* 1246 */ if (r.restoreBoolean()) +/* 1247 */ this.groundColor = new Color(r.restoreInt()); +/* 1248 */ r.restoreMaybeNull(); +/* 1249 */ this.defaultPosition = ((Point3)r.restore()); +/* 1250 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1251 */ this.defaultOrientation = r.restoreFloat(); +/* */ +/* 1253 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1254 */ this.infiniteBackground = new RoomEnvironment(); +/* 1255 */ break; +/* */ case 2: +/* 1257 */ r.setOldFlag(); +/* 1258 */ super.restoreState(r); +/* */ +/* 1260 */ if (r.restoreBoolean()) +/* 1261 */ this.skyColor = new Color(r.restoreInt()); +/* 1262 */ if (r.restoreBoolean()) +/* 1263 */ this.groundColor = new Color(r.restoreInt()); +/* 1264 */ r.restoreMaybeNull(); +/* 1265 */ this.defaultPosition = ((Point3)r.restore()); +/* 1266 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1267 */ this.defaultOrientation = r.restoreFloat(); +/* */ +/* 1269 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1270 */ this.infiniteBackground = new RoomEnvironment(); +/* 1271 */ break; +/* */ case 3: +/* 1273 */ r.setOldFlag(); +/* 1274 */ super.restoreState(r); +/* */ +/* 1276 */ if (r.restoreBoolean()) +/* 1277 */ this.skyColor = new Color(r.restoreInt()); +/* 1278 */ if (r.restoreBoolean()) +/* 1279 */ this.groundColor = new Color(r.restoreInt()); +/* 1280 */ r.restoreMaybeNull(); +/* 1281 */ this.defaultPosition = ((Point3)r.restore()); +/* 1282 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1283 */ this.defaultOrientation = r.restoreFloat(); +/* */ +/* 1285 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1286 */ this.infiniteBackground = ((RoomEnvironment)r.restore()); +/* 1287 */ break; +/* */ case 4: +/* 1289 */ r.setOldFlag(); +/* 1290 */ super.restoreState(r); +/* */ +/* 1292 */ if (r.restoreBoolean()) +/* 1293 */ this.skyColor = new Color(r.restoreInt()); +/* 1294 */ if (r.restoreBoolean()) +/* 1295 */ this.groundColor = new Color(r.restoreInt()); +/* 1296 */ this.defaultPosition = ((Point3)r.restore()); +/* 1297 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1298 */ this.defaultOrientation = r.restoreFloat(); +/* */ +/* 1300 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1301 */ this.infiniteBackground = ((RoomEnvironment)r.restore()); +/* 1302 */ break; +/* */ case 5: +/* 1304 */ super.restoreState(r); +/* */ +/* 1306 */ if (r.restoreBoolean()) +/* 1307 */ this.skyColor = new Color(r.restoreInt()); +/* 1308 */ if (r.restoreBoolean()) +/* 1309 */ this.groundColor = new Color(r.restoreInt()); +/* 1310 */ this.defaultPosition = ((Point3)r.restore()); +/* 1311 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1312 */ this.defaultOrientation = r.restoreFloat(); +/* 1313 */ setLightPosition((Point3)r.restore()); +/* 1314 */ setLightColor(new Color(r.restoreInt())); +/* */ +/* 1316 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1317 */ this.infiniteBackground = ((RoomEnvironment)r.restore()); +/* 1318 */ break; +/* */ case 6: +/* 1320 */ super.restoreState(r); +/* */ +/* 1322 */ if (r.restoreBoolean()) +/* 1323 */ this.skyColor = new Color(r.restoreInt()); +/* 1324 */ if (r.restoreBoolean()) +/* 1325 */ this.groundColor = new Color(r.restoreInt()); +/* 1326 */ this.defaultPosition = ((Point3)r.restore()); +/* 1327 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1328 */ this.defaultOrientation = r.restoreFloat(); +/* 1329 */ setLightPosition((Point3)r.restore()); +/* 1330 */ setLightColor(new Color(r.restoreInt())); +/* */ +/* 1332 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1333 */ this.infiniteBackground = ((RoomEnvironment)r.restore()); +/* */ +/* 1335 */ this.teleportChain = r.restoreString(); +/* 1336 */ this.teleportInterval = r.restoreInt(); +/* 1337 */ this.roomLoadTime = (Std.getFastTime() / 1000); +/* */ +/* 1339 */ break; +/* */ case 7: +/* 1341 */ super.restoreState(r); +/* */ +/* 1343 */ if (r.restoreBoolean()) +/* 1344 */ this.skyColor = new Color(r.restoreInt()); +/* 1345 */ if (r.restoreBoolean()) +/* 1346 */ this.groundColor = new Color(r.restoreInt()); +/* 1347 */ this.defaultPosition = ((Point3)r.restore()); +/* 1348 */ this.defaultOrientationAxis = ((Point3)r.restore()); +/* 1349 */ this.defaultOrientation = r.restoreFloat(); +/* 1350 */ setLightPosition((Point3)r.restore()); +/* 1351 */ setLightColor(new Color(r.restoreInt())); +/* */ +/* 1353 */ this.environment = ((RoomEnvironment)r.restore()); +/* 1354 */ this.infiniteBackground = ((RoomEnvironment)r.restore()); +/* */ +/* 1356 */ this.teleportChain = r.restoreString(); +/* 1357 */ this.teleportInterval = r.restoreInt(); +/* 1358 */ this.roomLoadTime = (Std.getFastTime() / 1000); +/* 1359 */ this.allowTeleport = r.restoreBoolean(); +/* 1360 */ break; +/* */ default: +/* 1362 */ throw new TooNewException(); +/* */ } +/* */ +/* 1365 */ super.add(this.environment); +/* 1366 */ super.add(this.infiniteBackground); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void aboutToDraw() +/* */ { +/* 1375 */ if ((!hasClump()) && ((getOwner() instanceof World))) { +/* 1376 */ recursiveAddRwChildren(null); +/* */ } +/* */ } +/* */ +/* */ protected void addRwChildren(WObject parent) { +/* 1381 */ assert (parent == null); +/* */ +/* 1383 */ createClump(); +/* 1384 */ createScene(); +/* */ +/* 1386 */ newRwChildHelper(); +/* */ +/* 1388 */ float red = this.lightColor.getRed() / 256.0F; +/* 1389 */ float green = this.lightColor.getGreen() / 256.0F; +/* 1390 */ float blue = this.lightColor.getBlue() / 256.0F; +/* */ +/* 1392 */ this.lightid = addLight(this.sceneID, this.lightPosition.x, this.lightPosition.y, +/* 1393 */ this.lightPosition.z, red, green, blue); +/* */ +/* 1395 */ this.lightid2 = addLight(this.sceneID, -this.lightPosition.x, -this.lightPosition.y, +/* 1396 */ -this.lightPosition.z, red * 0.5F, green * 0.5F, blue * 0.5F); +/* */ } +/* */ +/* */ public void recursiveAddRwChildren(WObject parent) +/* */ { +/* 1401 */ super.recursiveAddRwChildren(parent); +/* 1402 */ this.environment.recursiveAddRwChildren(this); +/* 1403 */ this.infiniteBackground.recursiveAddRwChildren(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final float floorHeight(float x, float y) +/* */ { +/* 1412 */ return floorHeight(x, y, 120.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float floorHeight(float x, float y, float z) +/* */ { +/* 1430 */ Transform inverse = getObjectToWorldMatrix().invert(); +/* 1431 */ Point3Temp p = Point3Temp.make(x, y, z).times(inverse); +/* 1432 */ inverse.recycle(); +/* 1433 */ x = p.x; +/* 1434 */ y = p.y; +/* 1435 */ z = p.z; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1442 */ float height = 0.0F; +/* 1443 */ boolean patchFound = false; +/* 1444 */ for (Enumeration e = getContents(); e.hasMoreElements();) { +/* 1445 */ Object o = e.nextElement(); +/* 1446 */ if (((o instanceof FloorPatch)) && +/* 1447 */ (((FloorPatch)o).inPatch(x, y))) { +/* 1448 */ float patchHeight = ((FloorPatch)o).floorHeight(x, y); +/* */ +/* */ +/* 1451 */ if ((patchHeight <= z) && ( +/* 1452 */ (patchHeight > height) || (!patchFound))) { +/* 1453 */ patchFound = true; +/* 1454 */ height = ((FloorPatch)o).floorHeight(x, y); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 1461 */ return height; +/* */ } +/* */ +/* */ +/* */ +/* */ public Point3 surfaceNormal(float x, float y, float z) +/* */ { +/* 1468 */ Point3 normal = new Point3(0.0F, 0.0F, 1.0F); +/* */ +/* 1470 */ FloorPatch patch = null; +/* */ +/* 1472 */ float height = 0.0F; +/* 1473 */ boolean patchFound = false; +/* 1474 */ for (Enumeration e = getContents(); e.hasMoreElements();) { +/* 1475 */ Object o = e.nextElement(); +/* 1476 */ if (((o instanceof FloorPatch)) && +/* 1477 */ (((FloorPatch)o).inPatch(x, y))) { +/* 1478 */ float patchHeight = ((FloorPatch)o).floorHeight(x, y); +/* */ +/* */ +/* 1481 */ if ((patchHeight <= z) && ( +/* 1482 */ (patchHeight > height) || (!patchFound))) { +/* 1483 */ patchFound = true; +/* 1484 */ height = ((FloorPatch)o).floorHeight(x, y); +/* 1485 */ patch = (FloorPatch)o; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 1491 */ if (patch != null) { +/* 1492 */ normal = patch.surfaceNormal(x, y); +/* */ } +/* */ +/* 1495 */ normal.vectorTimes(getObjectToWorldMatrix()); +/* */ +/* 1497 */ return normal; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public RoomEnvironment getInfiniteBackground() +/* */ { +/* 1508 */ return this.infiniteBackground; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 1513 */ return getWorld() + "#" + getName(); +/* */ } +/* */ +/* */ public Room() {} +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ protected final void noteAddingTo(SuperRoot s) {} +/* */ +/* */ static native int addLight(int paramInt, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5, float paramFloat6); +/* */ +/* */ static native void setLightPosition(int paramInt, float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ static native void setLightColor(int paramInt, float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ native void createScene(); +/* */ +/* */ native void destroyScene(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Room.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RoomEnvironment.java b/NET/worlds/scape/RoomEnvironment.java new file mode 100644 index 0000000..b9c4bdc --- /dev/null +++ b/NET/worlds/scape/RoomEnvironment.java @@ -0,0 +1,202 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RoomEnvironment +/* */ extends WObject +/* */ { +/* 51 */ static { nativeInit(); } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* 55 */ protected void addRwChildren(WObject parent) { createClump(); +/* 56 */ Room r = (Room)getOwner(); +/* 57 */ createScene(r); +/* */ +/* 59 */ newRwChildHelper(); +/* */ +/* 61 */ addLight(r.getLightPosition(), r.getLightColor()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 69 */ private int lightid = 0; +/* 70 */ private int lightid2 = 0; +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) {} +/* */ +/* 74 */ private void addLight(Point3Temp pos, Color c) { assert (this.lightid == 0); +/* */ +/* 76 */ float red = c.getRed() / 256.0F; +/* 77 */ float green = c.getGreen() / 256.0F; +/* 78 */ float blue = c.getBlue() / 256.0F; +/* */ +/* 80 */ this.lightid = Room.addLight(this.sceneID, pos.x, pos.y, pos.z, +/* 81 */ red, green, blue); +/* */ +/* 83 */ this.lightid2 = Room.addLight(this.sceneID, -pos.x, -pos.y, -pos.z, +/* 84 */ red * 0.5F, green * 0.5F, blue * 0.5F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void setLightPosition(float x, float y, float z) +/* */ { +/* 93 */ if (this.lightid != 0) +/* */ { +/* 95 */ Room.setLightPosition(this.lightid, x, y, z); +/* */ } +/* */ +/* 98 */ if (this.lightid2 != 0) +/* */ { +/* 100 */ Room.setLightPosition(this.lightid2, -x, -y, -z); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void setLightColor(float red, float green, float blue) +/* */ { +/* 111 */ if (this.lightid != 0) +/* */ { +/* 113 */ Room.setLightColor(this.lightid, red, green, blue); +/* */ } +/* */ +/* 116 */ if (this.lightid2 != 0) +/* */ { +/* 118 */ Room.setLightColor(this.lightid2, red * 0.5F, +/* 119 */ green * 0.5F, blue * 0.5F); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 128 */ return BoundBoxTemp.make(Point3Temp.make(), Point3Temp.make()); +/* */ } +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 134 */ super.markVoid(); +/* */ +/* 136 */ destroyScene(); +/* 137 */ this.lightid = 0; +/* 138 */ this.lightid2 = 0; +/* */ } +/* */ +/* */ +/* */ +/* 143 */ int nextVertex = 1; +/* */ +/* */ +/* */ +/* 147 */ boolean wasEdited = false; +/* */ +/* */ public void markClumpEdited() +/* */ { +/* 151 */ this.wasEdited = true; +/* */ } +/* */ +/* */ public void prerender() +/* */ { +/* 156 */ if (this.wasEdited) +/* */ { +/* 158 */ this.wasEdited = false; +/* 159 */ doneWithEditing(); +/* */ } +/* */ } +/* */ +/* 163 */ private static Object classCookie = new Object(); +/* */ +/* */ private int sceneID; +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 170 */ s.saveVersion(1, classCookie); +/* 171 */ super.saveState(s); +/* */ } +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 179 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 181 */ super.restoreState(r); +/* 182 */ break; +/* */ case 0: +/* 184 */ r.setOldFlag(); +/* 185 */ super.restoreState(r); +/* 186 */ r.restore(); +/* 187 */ break; +/* */ default: +/* 189 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ native void createScene(Room paramRoom); +/* */ +/* */ native void destroyScene(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RoomEnvironment.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RoomSubscribeInfo.java b/NET/worlds/scape/RoomSubscribeInfo.java new file mode 100644 index 0000000..778b8ce --- /dev/null +++ b/NET/worlds/scape/RoomSubscribeInfo.java @@ -0,0 +1,32 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ public class RoomSubscribeInfo +/* */ { +/* */ public float x; +/* */ +/* */ +/* */ public float y; +/* */ +/* */ +/* */ public float z; +/* */ +/* */ +/* */ public float d; +/* */ +/* */ +/* */ public RoomSubscribeInfo(float x, float y, float z, float d) +/* */ { +/* 21 */ this.x = x; +/* 22 */ this.y = y; +/* 23 */ this.z = z; +/* 24 */ this.d = d; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RoomSubscribeInfo.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RunningActionCallback.java b/NET/worlds/scape/RunningActionCallback.java new file mode 100644 index 0000000..b3aede6 --- /dev/null +++ b/NET/worlds/scape/RunningActionCallback.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface RunningActionCallback +{ + public abstract void actionDone(Action paramAction, Event paramEvent, Object paramObject); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RunningActionCallback.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/RunningActionHandler.java b/NET/worlds/scape/RunningActionHandler.java new file mode 100644 index 0000000..7ef5391 --- /dev/null +++ b/NET/worlds/scape/RunningActionHandler.java @@ -0,0 +1,238 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class RunningActionHandler +/* */ extends SuperRoot +/* */ implements FrameHandler, NonPersister +/* */ { +/* */ private Action action; +/* */ private Persister seqID; +/* */ private RunningActionCallback callback; +/* */ private Object callbackCookie; +/* */ +/* */ public static void trigger(Action act, World w, Event event) +/* */ { +/* 40 */ trigger(act, w, event, null, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void trigger(Action act, World w, Event event, RunningActionCallback callb, Object o) +/* */ { +/* 59 */ if (act.isActive()) +/* */ { +/* 61 */ Persister seqID = null; +/* 62 */ if ((seqID = act.trigger(event, seqID)) != null) +/* */ { +/* */ +/* */ +/* 66 */ new RunningActionHandler(w, act, seqID, callb, o); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public static void trigger(Vector v, World w, Event event) +/* */ { +/* 74 */ trigger(v, w, event, null, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void trigger(Vector v, World w, Event event, RunningActionCallback callb, Object o) +/* */ { +/* 85 */ Vector acts = (Vector)v.clone(); +/* */ +/* 87 */ int sz = acts.size(); +/* 88 */ for (int i = 0; i < sz; i++) +/* */ { +/* 90 */ Action act = (Action)acts.elementAt(i); +/* 91 */ if (v.contains(act)) { +/* 92 */ trigger(act, w, event, callb, o); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ RunningActionHandler() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private RunningActionHandler(World world, Action a, Persister seqID, RunningActionCallback callb, Object o) +/* */ { +/* 114 */ this.action = a; +/* 115 */ this.seqID = seqID; +/* 116 */ this.callback = callb; +/* 117 */ this.callbackCookie = o; +/* 118 */ world.addHandler(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 131 */ if ((!this.action.isActive()) || ((this.seqID = this.action.trigger(e, this.seqID)) == null)) { +/* 132 */ if (this.callback != null) +/* 133 */ this.callback.actionDone(this.action, e, this.callbackCookie); +/* 134 */ getWorld().removeHandler(this); +/* */ } +/* 136 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 145 */ Object ret = null; +/* 146 */ switch (index - offset) { +/* */ case 0: +/* 148 */ if (mode == 0) { +/* 149 */ ret = new Property(this, index, "Action"); +/* 150 */ } else if (mode == 1) +/* 151 */ ret = this.action; +/* 152 */ break; +/* */ case 1: +/* 154 */ if (mode == 0) { +/* 155 */ ret = new Property(this, index, "Sequence ID Object"); +/* 156 */ } else if (mode == 1) +/* 157 */ ret = this.seqID; +/* 158 */ break; +/* */ default: +/* 160 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 162 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 169 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 173 */ Console.println(Console.message("Save-running")); +/* 174 */ s.saveVersion(3, classCookie); +/* 175 */ super.saveState(s); +/* 176 */ s.save(this.action); +/* 177 */ s.saveMaybeNull(this.seqID); +/* 178 */ s.saveMaybeNull((Persister)this.callback); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 183 */ switch (r.restoreVersion(classCookie)) { +/* */ case 3: +/* 185 */ super.restoreState(r); +/* 186 */ this.action = ((Action)r.restore()); +/* 187 */ this.seqID = r.restoreMaybeNull(); +/* 188 */ this.callback = ((RunningActionCallback)r.restoreMaybeNull()); +/* 189 */ break; +/* */ case 2: +/* 191 */ super.restoreState(r); +/* 192 */ this.action = ((Action)r.restore()); +/* 193 */ this.seqID = r.restoreMaybeNull(); +/* 194 */ this.callback = null; +/* 195 */ break; +/* */ case 1: +/* 197 */ super.restoreState(r); +/* 198 */ this.action = ((Action)r.restore()); +/* 199 */ this.callback = null; +/* 200 */ break; +/* */ case 0: +/* 202 */ super.restoreState(r); +/* 203 */ r.restore(); +/* 204 */ this.action = ((Action)r.restoreMaybeNull()); +/* 205 */ this.callback = null; +/* 206 */ break; +/* */ default: +/* 208 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 214 */ super.postRestore(version); +/* 215 */ Object[] arguments = { new String(getName()) }; +/* 216 */ Console.println(MessageFormat.format( +/* 217 */ Console.message("Discarding-old"), arguments)); +/* 218 */ SuperRoot owner = getOwner(); +/* 219 */ if ((owner instanceof WObject)) { +/* 220 */ ((WObject)owner).removeHandler(this); +/* 221 */ } else if ((owner instanceof World)) { +/* 222 */ ((World)owner).removeHandler(this); +/* */ } else { +/* 224 */ Console.println(MessageFormat.format( +/* 225 */ Console.message("Unable-discard"), arguments)); +/* */ } +/* */ } +/* */ +/* */ public String toString() { +/* 230 */ return super.toString() + ":" + this.action.getName() + "[" + this.seqID + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RunningActionHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SameRoomSensor.java b/NET/worlds/scape/SameRoomSensor.java new file mode 100644 index 0000000..8f2276a --- /dev/null +++ b/NET/worlds/scape/SameRoomSensor.java @@ -0,0 +1,106 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SameRoomSensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* */ private Room lastCamRoom; +/* */ +/* */ public SameRoomSensor(Action a) +/* */ { +/* 31 */ if (a != null) { +/* 32 */ addAction(a); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public SameRoomSensor() {} +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 47 */ this.lastCamRoom = null; +/* 48 */ super.detach(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 58 */ Object owner = getOwner(); +/* 59 */ if ((owner == null) || (!(owner instanceof WObject))) +/* 60 */ return true; +/* 61 */ WObject o = (WObject)owner; +/* */ +/* 63 */ Room thisRoom = o.getRoom(); +/* 64 */ Room thisCamRoom = Pilot.getActiveRoom(); +/* */ +/* 66 */ if ((thisCamRoom == thisRoom) && (this.lastCamRoom != thisCamRoom)) { +/* 67 */ trigger(e); +/* */ } +/* 69 */ this.lastCamRoom = thisCamRoom; +/* 70 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 77 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 81 */ super.saveState(s); +/* 82 */ s.saveVersion(0, classCookie); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 87 */ int vers = super.restoreStateVers(r); +/* */ +/* */ +/* 90 */ if (vers <= 1) { +/* 91 */ return; +/* */ } +/* 93 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* */ break; +/* */ default: +/* 97 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SameRoomSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SaveWidget.java b/NET/worlds/scape/SaveWidget.java new file mode 100644 index 0000000..0227957 --- /dev/null +++ b/NET/worlds/scape/SaveWidget.java @@ -0,0 +1,52 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.FileSysDialog; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SaveWidget +/* */ extends ClickWidget +/* */ implements DialogReceiver +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public SaveWidget(ToolBar toolbar) +/* */ { +/* 24 */ super(toolbar, "save.gif", Console.message("Save-to-file")); +/* */ } +/* */ +/* */ public void perform() { +/* 28 */ new FileSysDialog(Console.getFrame(), this, +/* 29 */ Console.message("Save-Object-As"), 1, +/* 30 */ " wobject |*.wob| world |*.world;*.wor| console |*.console| pilot |*.pilot| drone |*.drone| other ||", +/* */ +/* 32 */ "", false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) +/* */ { +/* 41 */ if (confirmed) +/* */ { +/* 43 */ Console.getFrame().getEditTile().save(((FileSysDialog)who).fileName()); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SaveWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Saver.java b/NET/worlds/scape/Saver.java new file mode 100644 index 0000000..95df741 --- /dev/null +++ b/NET/worlds/scape/Saver.java @@ -0,0 +1,376 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.DataOutput; +/* */ import java.io.DataOutputStream; +/* */ import java.io.File; +/* */ import java.io.FileOutputStream; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Saver +/* */ { +/* */ static final String headerString = "PERSISTER Worlds, Inc."; +/* */ static final String trailerString = "END PERSISTER"; +/* 87 */ private static int _version = 7; +/* */ private DataOutput os; +/* */ private boolean myFile; +/* */ private Hashtable, Class> classTable; +/* */ +/* */ public static int version() +/* */ { +/* 94 */ return _version; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Hashtable objectTable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Hashtable cookieTable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private URL reference; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public URL getReferenceURL() +/* */ { +/* 139 */ return this.reference; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Saver(URL url) +/* */ throws IOException +/* */ { +/* 149 */ this(new DataOutputStream(new FileOutputStream(new File( +/* 150 */ url.unalias())))); +/* 151 */ this.reference = url; +/* */ +/* */ +/* 154 */ this.myFile = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Saver(DataOutput os) +/* */ throws IOException +/* */ { +/* 163 */ this.os = os; +/* */ +/* */ +/* 166 */ saveString("PERSISTER Worlds, Inc."); +/* 167 */ saveInt(_version); +/* */ +/* 169 */ this.classTable = new Hashtable(); +/* 170 */ this.objectTable = new Hashtable(); +/* 171 */ this.cookieTable = new Hashtable(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveVersion(int v, Object cookie) +/* */ throws IOException +/* */ { +/* 188 */ Integer oldv = (Integer)this.cookieTable.get(cookie); +/* 189 */ if (oldv == null) { +/* 190 */ saveInt(v); +/* 191 */ this.cookieTable.put(cookie, new Integer(v)); +/* */ } +/* */ else { +/* 194 */ assert (oldv.intValue() == v); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void save(Persister p) +/* */ throws IOException +/* */ { +/* 204 */ assert (!(p instanceof NonPersister)); +/* */ +/* */ +/* 207 */ int hashed = UniqueHasher.uh().hash(p); +/* 208 */ saveInt(hashed); +/* */ +/* 210 */ if (this.objectTable.containsKey(p)) +/* */ { +/* 212 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 219 */ this.objectTable.put(p, p); +/* */ +/* */ +/* 222 */ saveClass(p.getClass()); +/* */ +/* 224 */ p.saveState(this); +/* */ } +/* */ +/* */ public void saveVectorMaybeNull(Vector v) +/* */ throws IOException +/* */ { +/* 230 */ if (v == null) { +/* 231 */ saveBoolean(false); +/* */ } else { +/* 233 */ saveBoolean(true); +/* 234 */ saveVector(v); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void saveMaybeNull(Persister p) +/* */ throws IOException +/* */ { +/* 244 */ if ((p == null) || ((p instanceof NonPersister))) { +/* 245 */ saveBoolean(true); +/* */ } else { +/* 247 */ saveBoolean(false); +/* 248 */ save(p); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveClass(Class c) +/* */ throws IOException +/* */ { +/* 263 */ UniqueHasher uh = UniqueHasher.uh(); +/* */ +/* 265 */ saveInt(uh.hash(c.toString())); +/* */ +/* */ +/* 268 */ if (!this.classTable.containsKey(c)) +/* */ { +/* 270 */ saveString(c.getName()); +/* */ +/* 272 */ this.classTable.put(c, c); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveArray(Persister[] pa) +/* */ throws IOException +/* */ { +/* 283 */ saveClass(pa.getClass()); +/* 284 */ saveInt(pa.length); +/* 285 */ for (int i = 0; i < pa.length; i++) +/* */ { +/* 287 */ saveMaybeNull(pa[i]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveVector(Vector v) +/* */ throws IOException +/* */ { +/* 300 */ synchronized (v) +/* */ { +/* 302 */ Enumeration en = v.elements(); +/* 303 */ int length = 0; +/* 304 */ while (en.hasMoreElements()) { +/* 305 */ Object obj = en.nextElement(); +/* 306 */ if (((obj instanceof Persister)) && (!(obj instanceof NonPersister))) { +/* 307 */ length++; +/* */ } +/* */ } +/* 310 */ saveInt(length); +/* */ +/* 312 */ en = v.elements(); +/* 313 */ while (en.hasMoreElements()) { +/* 314 */ Object obj = en.nextElement(); +/* 315 */ if (((obj instanceof Persister)) && (!(obj instanceof NonPersister))) { +/* 316 */ save((Persister)obj); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void saveString(String str) throws IOException +/* */ { +/* 324 */ saveBoolean(str == null); +/* 325 */ if (str != null) { +/* 326 */ this.os.writeUTF(str); +/* */ } +/* */ } +/* */ +/* */ public void saveBoolean(boolean b) throws IOException { +/* 331 */ this.os.writeBoolean(b); +/* */ } +/* */ +/* */ public void saveByte(byte b) throws IOException { +/* 335 */ this.os.writeByte(b); +/* */ } +/* */ +/* */ public void saveShort(short s) throws IOException { +/* 339 */ this.os.writeShort(s); +/* */ } +/* */ +/* */ public void saveInt(int i) throws IOException { +/* 343 */ this.os.writeInt(i); +/* */ } +/* */ +/* */ public void saveLong(long g) throws IOException { +/* 347 */ this.os.writeLong(g); +/* */ } +/* */ +/* */ public void saveFloat(float f) throws IOException { +/* 351 */ this.os.writeFloat(f); +/* */ } +/* */ +/* */ public void saveDouble(double d) throws IOException { +/* 355 */ this.os.writeDouble(d); +/* */ } +/* */ +/* */ public void done() +/* */ throws IOException +/* */ { +/* 361 */ saveString("END PERSISTER"); +/* */ +/* */ +/* 364 */ if (this.myFile) +/* 365 */ ((DataOutputStream)this.os).close(); +/* 366 */ this.classTable = null; +/* 367 */ this.objectTable = null; +/* 368 */ this.cookieTable = null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Saver.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScaleWidget.java b/NET/worlds/scape/ScaleWidget.java new file mode 100644 index 0000000..2198715 --- /dev/null +++ b/NET/worlds/scape/ScaleWidget.java @@ -0,0 +1,45 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ScaleWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public ScaleWidget(ToolBar toolbar) +/* */ { +/* 24 */ super(toolbar, "scale.gif", Console.message("Scale")); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 29 */ WObject wobj = getWObject(); +/* 30 */ float delta = Math.abs(deltax) > Math.abs(deltay) ? deltax : deltay; +/* 31 */ delta = (float)Math.pow(1.01D, delta); +/* 32 */ if (initialDrag) +/* 33 */ Console.getFrame().getEditTile().addUndoable( +/* 34 */ new UndoablTransform(wobj)); +/* 35 */ wobj.scale(delta); +/* 36 */ wobj.markEdited(); +/* 37 */ return "Scale: " + wobj.getScale(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScaleWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScapePicMovie.java b/NET/worlds/scape/ScapePicMovie.java new file mode 100644 index 0000000..bc092ed --- /dev/null +++ b/NET/worlds/scape/ScapePicMovie.java @@ -0,0 +1,263 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ScapePicMovie +/* */ implements Persister +/* */ { +/* */ static {} +/* */ +/* */ public ScapePicMovie() {} +/* */ +/* */ public ScapePicMovie(String localName, URL url) +/* */ { +/* 54 */ this.localName = localName; +/* 55 */ this.url = url; +/* 56 */ this.movie = getAll(); +/* */ } +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ public int getW() +/* */ { +/* 65 */ return this.width; +/* */ } +/* */ +/* */ public int getH() +/* */ { +/* 70 */ return this.height; +/* */ } +/* */ +/* */ public int length() +/* */ { +/* 75 */ return this.frameCount; +/* */ } +/* */ +/* */ public URL getURL() +/* */ { +/* 80 */ return this.url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public ScapePicTexture getTexture(int frameNumber) +/* */ { +/* 90 */ ScapePicTexture ret = null; +/* 91 */ if (this.movie != null) { +/* 92 */ ret = this.movie[frameNumber]; +/* 93 */ this.movie[frameNumber] = null; +/* */ +/* */ +/* */ +/* */ +/* 98 */ for (int i = 0; i < this.frameCount; i++) +/* 99 */ if (this.movie[i] != null) +/* */ break; +/* 101 */ if (i == this.frameCount) +/* 102 */ this.movie = null; +/* */ } +/* 104 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public ScapePicTexture[] getTextures() +/* */ { +/* 113 */ ScapePicTexture[] ret = this.movie; +/* 114 */ this.movie = null; +/* 115 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 127 */ private static Hashtable movieDict = new Hashtable(); +/* */ private ScapePicTexture[] movie; +/* */ private String localName; +/* */ private URL url; +/* */ private int frameCount; +/* */ private int width; +/* */ private int height; +/* */ +/* */ private synchronized ScapePicTexture[] getAll() +/* */ { +/* 137 */ String name = this.url.getAbsolute(); +/* */ +/* */ +/* */ +/* 141 */ ScapePicMovie proto = (ScapePicMovie)movieDict.get(name); +/* 142 */ ScapePicTexture[] a = null; +/* 143 */ if (proto != null) { +/* 144 */ this.frameCount = proto.length(); +/* 145 */ this.width = proto.getW(); +/* 146 */ this.height = proto.getH(); +/* */ +/* */ +/* */ +/* 150 */ a = lookupTextures(name, this.frameCount, this.width, this.height); +/* */ } +/* */ +/* 153 */ if (a == null) +/* */ { +/* */ +/* 156 */ a = makeTextures(this.localName, name); +/* */ +/* */ +/* */ +/* 160 */ if ((a != null) && (proto == null)) { +/* 161 */ this.frameCount = a.length; +/* 162 */ this.width = a[0].getW(); +/* 163 */ this.height = a[0].getH(); +/* 164 */ movieDict.put(name, this); +/* */ } +/* */ } +/* 167 */ return a; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private native ScapePicTexture[] lookupTextures(String paramString, int paramInt1, int paramInt2, int paramInt3); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private native ScapePicTexture[] makeTextures(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 221 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 224 */ Console.println(Console.message("Obs-ScapePicMov") + this.url); +/* 225 */ s.saveVersion(2, classCookie); +/* 226 */ this.url.save(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 230 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 232 */ this.url = URL.restore(r); +/* 233 */ this.localName = this.url.unalias(); +/* 234 */ break; +/* */ case 1: +/* 236 */ this.localName = r.restoreString(); +/* 237 */ this.url = URL.make(this.localName); +/* 238 */ break; +/* */ case 0: +/* 240 */ this.localName = r.restoreString(); +/* 241 */ this.url = URL.make(this.localName); +/* 242 */ r.restoreBoolean(); +/* 243 */ break; +/* */ default: +/* 245 */ throw new TooNewException(); +/* */ } +/* 247 */ this.movie = getAll(); +/* */ } +/* */ +/* */ +/* */ public void postRestore(int version) {} +/* */ +/* */ public String toString() +/* */ { +/* 255 */ return this.url.getAbsolute(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScapePicMovie.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScapePicTexture.java b/NET/worlds/scape/ScapePicTexture.java new file mode 100644 index 0000000..e7103bc --- /dev/null +++ b/NET/worlds/scape/ScapePicTexture.java @@ -0,0 +1,163 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ScapePicTexture +/* */ extends Texture +/* */ implements Persister +/* */ { +/* */ private int w; +/* */ private int h; +/* */ private String _urlName; +/* */ private ScapePicMovie _movie; +/* */ private int _movieFrame; +/* */ +/* */ static {} +/* */ +/* */ public ScapePicTexture(String urlName, String filename) +/* */ { +/* 40 */ this._urlName = urlName; +/* 41 */ makeTexture(urlName, filename); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public ScapePicTexture() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getW() +/* */ { +/* 67 */ return this.w; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public int getH() +/* */ { +/* 75 */ return this.h; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private native void makeTexture(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ +/* */ public String getName() +/* */ { +/* 88 */ return this._urlName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 105 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 109 */ s.saveVersion(1, classCookie); +/* 110 */ super.saveState(s); +/* 111 */ if (this._movie != null) { +/* 112 */ s.saveBoolean(true); +/* 113 */ s.save(this._movie); +/* 114 */ s.saveInt(this._movieFrame); +/* */ } else { +/* 116 */ s.saveBoolean(false); +/* 117 */ s.saveString(this._urlName); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 123 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 125 */ super.restoreState(r); +/* 126 */ break; +/* */ case 0: +/* 128 */ super.restoreState(r); +/* 129 */ r.restoreBoolean(); +/* 130 */ break; +/* */ default: +/* 132 */ throw new TooNewException(); +/* */ } +/* */ +/* 135 */ if (r.restoreBoolean()) { +/* 136 */ this._movie = ((ScapePicMovie)r.restore()); +/* 137 */ this._movieFrame = r.restoreInt(); +/* 138 */ ScapePicTexture t = this._movie.getTexture(this._movieFrame); +/* 139 */ if (t == null) { +/* 140 */ Object[] arguments = { new String(this._movieFrame), +/* 141 */ new String(this._movie) }; +/* 142 */ Console.println(MessageFormat.format( +/* 143 */ Console.message("Error-frame"), arguments)); +/* */ } else { +/* 145 */ this.textureID = t.textureID; +/* */ } +/* 147 */ } else { this._urlName = r.restoreString(); +/* 148 */ makeTexture(this._urlName, this._urlName); +/* */ } +/* */ } +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 155 */ return this._movie == null ? this._urlName : this._movie.toString(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScapePicTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScapePicTextureDecoder.java b/NET/worlds/scape/ScapePicTextureDecoder.java new file mode 100644 index 0000000..81aa5ac --- /dev/null +++ b/NET/worlds/scape/ScapePicTextureDecoder.java @@ -0,0 +1,196 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ScapePicTextureDecoder +/* */ extends TextureDecoder +/* */ { +/* 177 */ private String exts = "cmp;mov"; +/* */ +/* */ +/* */ protected String getExts() +/* */ { +/* 182 */ return this.exts; +/* */ } +/* */ +/* */ +/* */ protected Texture read(String urlName, String filename) +/* */ { +/* 188 */ return new ScapePicTexture(urlName, filename); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScapePicTextureDecoder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScrollingImagePanel.java b/NET/worlds/scape/ScrollingImagePanel.java new file mode 100644 index 0000000..417662d --- /dev/null +++ b/NET/worlds/scape/ScrollingImagePanel.java @@ -0,0 +1,457 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogDisabled; +/* */ import NET.worlds.console.ExposedPanel; +/* */ import NET.worlds.console.WiderScrollbar; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.BorderLayout; +/* */ import java.awt.Color; +/* */ import java.awt.Component; +/* */ import java.awt.Container; +/* */ import java.awt.Dimension; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.FontMetrics; +/* */ import java.awt.Frame; +/* */ import java.awt.Graphics; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Image; +/* */ import java.awt.MediaTracker; +/* */ import java.awt.Point; +/* */ import java.awt.Scrollbar; +/* */ import java.awt.Toolkit; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ScrollingImagePanel +/* */ extends ExposedPanel +/* */ implements LibraryDropTarget, DialogDisabled +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 47 */ private Scrollbar scrollbar = new WiderScrollbar(); +/* */ private Vector items; +/* */ private int cellWidth; +/* */ private int cellHeight; +/* 51 */ private Font font = new Font(Console.message("ScImageFont"), 1, 12); +/* */ +/* 53 */ private FontMetrics metrics = getFontMetrics(this.font); +/* 54 */ private int ascent = this.metrics.getAscent(); +/* 55 */ private int descent = this.metrics.getDescent(); +/* 56 */ private int textHeight = this.ascent + this.descent; +/* 57 */ private int scrollPos = 0; +/* */ private ClickEventHandler handler; +/* */ private ScrollingListElement downClicked; +/* */ private boolean isDownClicked; +/* */ private int maxScrollPos; +/* 62 */ private boolean useIcons = false; +/* */ +/* */ private boolean isDialogDisabled; +/* */ +/* */ public ScrollingImagePanel(ClickEventHandler handler, Vector icons, boolean showIcons) +/* */ { +/* 68 */ this.handler = handler; +/* 69 */ setFont(this.font); +/* 70 */ setForeground(Color.black); +/* 71 */ setBackground(Color.lightGray); +/* 72 */ this.items = new Vector(); +/* 73 */ setContents(icons, false); +/* 74 */ setLayout(new BorderLayout()); +/* 75 */ add("East", this.scrollbar); +/* 76 */ this.useIcons = showIcons; +/* */ } +/* */ +/* */ public void resetContents(Vector icons) +/* */ { +/* 81 */ setContents(icons); +/* */ } +/* */ +/* */ protected void add(GridBagLayout gbag, Component comp, GridBagConstraints c) +/* */ { +/* 86 */ gbag.setConstraints(comp, c); +/* 87 */ add(comp); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event e) +/* */ { +/* 93 */ if (this.isDialogDisabled) { +/* 94 */ return false; +/* */ } +/* 96 */ switch (e.id) { +/* */ case 601: +/* 98 */ return scrollLineUp(); +/* */ case 602: +/* 100 */ return scrollLineDown(); +/* */ case 603: +/* 102 */ return scrollPageUp(); +/* */ case 604: +/* 104 */ return scrollPageDown(); +/* */ case 605: +/* 106 */ return scrollAbsolute(); +/* */ } +/* 108 */ return super.handleEvent(e); +/* */ } +/* */ +/* */ +/* */ public void dialogDisable(boolean disable) +/* */ { +/* 114 */ this.isDialogDisabled = disable; +/* */ } +/* */ +/* */ private void setContents(Vector icons) +/* */ { +/* 119 */ setContents(icons, true); +/* */ } +/* */ +/* */ private void setContents(Vector icons, boolean showIt) +/* */ { +/* 124 */ this.items.removeAllElements(); +/* 125 */ int count = icons.size(); +/* 126 */ for (int i = 0; i < count; i++) +/* 127 */ addIcon((Iconic)icons.elementAt(i), false); +/* 128 */ if (showIt) { +/* 129 */ recalc(getSize().width, getSize().height); +/* 130 */ repaint(); +/* */ } +/* */ } +/* */ +/* */ private void addIcon(Iconic icon, boolean showIt) +/* */ { +/* 136 */ String title = icon.getIconCaption(); +/* 137 */ int titleWidth = title != null ? this.metrics.stringWidth(title) : 0; +/* 138 */ URL name = icon.getIconURL(); +/* 139 */ Image image = null; +/* 140 */ if (name != null) { +/* 141 */ MediaTracker tracker = new MediaTracker(this); +/* 142 */ image = Toolkit.getDefaultToolkit().getImage(name.unalias()); +/* 143 */ tracker.addImage(image, 0); +/* */ try { +/* 145 */ tracker.waitForID(0); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* 148 */ if (tracker.isErrorID(0)) { +/* 149 */ image = null; +/* */ +/* 151 */ System.out.println("Error loading " + name); +/* */ } +/* */ } +/* 154 */ this.items.addElement(new ScrollingListElement(image, title, titleWidth)); +/* */ } +/* */ +/* */ private void findCellSize() +/* */ { +/* 159 */ this.cellWidth = 30; +/* 160 */ this.cellHeight = 0; +/* 161 */ if (this.useIcons) { +/* 162 */ this.cellHeight = 30; +/* */ } +/* 164 */ Enumeration e = this.items.elements(); +/* 165 */ while (e.hasMoreElements()) { +/* 166 */ ScrollingListElement item = (ScrollingListElement)e.nextElement(); +/* 167 */ this.cellWidth = Math.max(this.cellWidth, item.titleWidth); +/* 168 */ if ((this.useIcons) && (item.image != null)) { +/* 169 */ this.cellWidth = Math.max(this.cellWidth, +/* 170 */ item.image.getWidth(this)); +/* 171 */ this.cellHeight = Math.max(this.cellHeight, +/* 172 */ item.image.getHeight(this)); +/* */ } +/* */ } +/* 175 */ this.cellWidth += 2; +/* 176 */ this.cellHeight += this.textHeight + 2; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setBounds(int x, int y, int w, int h) +/* */ { +/* 188 */ super.setBounds(x, y, w, h); +/* 189 */ recalc(w, h); +/* 190 */ repaint(); +/* */ } +/* */ +/* */ private void recalc(int w, int h) +/* */ { +/* 195 */ findCellSize(); +/* */ +/* */ +/* */ +/* 199 */ this.scrollPos = 0; +/* 200 */ this.scrollbar.setValue(this.scrollPos); +/* */ +/* */ +/* 203 */ for (int pass = 0; pass < 2; pass++) { +/* 204 */ int scrollbarWidth = 0; +/* 205 */ if (pass == 1) +/* 206 */ scrollbarWidth = this.scrollbar.getSize().width; +/* 207 */ int lines = 0; +/* 208 */ if (this.cellWidth != 0) { +/* 209 */ int imagesPerLine = Math.max(1, (w - scrollbarWidth) / +/* 210 */ this.cellWidth); +/* 211 */ lines = (this.items.size() + imagesPerLine - 1) / imagesPerLine * +/* 212 */ this.cellHeight; +/* */ } +/* 214 */ if (lines > h) { +/* 215 */ if (pass == 0) { +/* 216 */ if (!this.scrollbar.isVisible()) { +/* 217 */ this.scrollbar.setVisible(true); +/* 218 */ validate(); +/* */ } +/* */ } +/* */ else { +/* 222 */ this.maxScrollPos = lines; +/* 223 */ this.scrollbar.setValues(this.scrollPos, h, 0, lines); +/* 224 */ this.scrollbar.setPageIncrement(h); +/* 225 */ this.scrollbar.setLineIncrement(this.cellHeight); +/* 226 */ break; +/* */ } +/* */ } +/* */ else { +/* 230 */ if (!this.scrollbar.isVisible()) break; +/* 231 */ this.scrollbar.setVisible(false); +/* 232 */ validate(); +/* */ +/* 234 */ break; +/* */ } +/* */ } +/* */ +/* 238 */ clearHitTest(); +/* */ } +/* */ +/* */ private void clearHitTest() +/* */ { +/* 243 */ int count = this.items.size(); +/* 244 */ for (int i = 0; i < count; i++) { +/* 245 */ ScrollingListElement e = (ScrollingListElement)this.items.elementAt(i); +/* 246 */ e.x = (e.y = -1); +/* */ } +/* */ } +/* */ +/* */ private ScrollingListElement findCell(int x, int y) +/* */ { +/* 252 */ int count = this.items.size(); +/* 253 */ for (int i = 0; i < count; i++) { +/* 254 */ ScrollingListElement e = (ScrollingListElement)this.items.elementAt(i); +/* 255 */ if ((x >= 0) && (y >= 0) && (x < e.x) && (y < e.y)) +/* 256 */ return e; +/* */ } +/* 258 */ return null; +/* */ } +/* */ +/* */ private void buttonAction(boolean down) +/* */ { +/* 263 */ if (this.isDownClicked != down) { +/* 264 */ this.isDownClicked = down; +/* 265 */ Graphics g = getGraphics(); +/* 266 */ drawCell(g, this.downClicked, this.isDownClicked); +/* 267 */ g.dispose(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Component findComponent(Point p) +/* */ { +/* 281 */ Point screenLoc = getLocationOnScreen(); +/* 282 */ Container cur = null; +/* 283 */ for (Container tmp = getParent(); !(tmp instanceof Frame); +/* 284 */ tmp = cur.getParent()) +/* 285 */ cur = tmp; +/* 286 */ Point parentCoords = cur.getLocationOnScreen(); +/* 287 */ p.x = (p.x + screenLoc.x - parentCoords.x); +/* 288 */ p.y = (p.y + screenLoc.y - parentCoords.y); +/* */ +/* */ +/* */ +/* 292 */ Component found = cur; +/* */ for (;;) { +/* 294 */ Component c = found.getComponentAt(p.x, p.y); +/* 295 */ if ((c == found) || (c == null)) +/* */ break; +/* 297 */ Point tmp = c.getLocation(); +/* 298 */ p.x -= tmp.x; +/* 299 */ p.y -= tmp.y; +/* 300 */ found = c; +/* */ } +/* 302 */ return found; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean mouseUp(Event event, int x, int y) +/* */ { +/* 308 */ if (this.downClicked != null) { +/* 309 */ Point p = new Point(x, y); +/* 310 */ buttonAction(false); +/* 311 */ this.handler.clickEvent(findComponent(p), p, 2); +/* 312 */ this.downClicked = null; +/* 313 */ return true; +/* */ } +/* 315 */ return false; +/* */ } +/* */ +/* */ public int itemAt(Point p) +/* */ { +/* 320 */ ScrollingListElement cell = findCell(p.x, p.y); +/* 321 */ if (cell != null) +/* 322 */ return this.items.indexOf(cell); +/* 323 */ return -1; +/* */ } +/* */ +/* */ +/* */ +/* */ @Deprecated +/* */ public boolean mouseDown(Event event, int x, int y) +/* */ { +/* 331 */ if ((this.downClicked == null) && +/* 332 */ ((this.downClicked = findCell(x, y)) != null)) { +/* 333 */ buttonAction(true); +/* 334 */ int flags = 1; +/* 335 */ if (event.metaDown()) +/* 336 */ flags |= 0x4; +/* 337 */ this.handler.clickEvent(this, new Point(x, y), flags); +/* 338 */ return true; +/* */ } +/* 340 */ return false; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean mouseDrag(Event event, int x, int y) +/* */ { +/* 346 */ if (this.downClicked != null) { +/* 347 */ Point p = new Point(x, y); +/* 348 */ this.handler.clickEvent(findComponent(p), p, 8); +/* 349 */ return true; +/* */ } +/* 351 */ return false; +/* */ } +/* */ +/* */ +/* */ private void drawCell(Graphics g, ScrollingListElement e, boolean depressed) +/* */ { +/* 357 */ int x = e.x - this.cellWidth; +/* 358 */ int y = e.y - this.cellHeight; +/* 359 */ int imageBoxHeight = this.cellHeight - this.textHeight; +/* 360 */ int yTextOffset = imageBoxHeight + this.ascent; +/* 361 */ Color normColor = g.getColor(); +/* 362 */ g.setColor(getBackground()); +/* 363 */ g.draw3DRect(x, y, this.cellWidth - 1, this.cellHeight - 1, !depressed); +/* 364 */ g.setColor(normColor); +/* 365 */ if ((this.useIcons) && (e.image != null)) { +/* 366 */ int imageWidth = e.image.getWidth(this); +/* 367 */ int imageHeight = e.image.getHeight(this); +/* 368 */ g.drawImage(e.image, x + (this.cellWidth - imageWidth) / 2, +/* 369 */ y + (imageBoxHeight - imageHeight) / 2, +/* 370 */ null); +/* */ } +/* 372 */ if (e.title != null) { +/* 373 */ g.drawString(e.title, x + (this.cellWidth - e.titleWidth) / 2, +/* 374 */ y + yTextOffset); +/* */ } +/* */ } +/* */ +/* */ public void paint(Graphics g) { +/* 379 */ Color normColor = g.getColor(); +/* 380 */ super.paint(g); +/* 381 */ g.setColor(normColor); +/* */ +/* 383 */ clearHitTest(); +/* 384 */ int width = getSize().width; +/* 385 */ int height = getSize().height; +/* */ +/* 387 */ int x = 0; +/* 388 */ int y = -this.scrollbar.getValue(); +/* 389 */ int count = this.items.size(); +/* 390 */ for (int i = 0; i < count; i++) { +/* 391 */ if (y + this.cellHeight > 0) { +/* 392 */ ScrollingListElement e = +/* 393 */ (ScrollingListElement)this.items.elementAt(i); +/* 394 */ e.x = (x + this.cellWidth); +/* 395 */ e.y = (y + this.cellHeight); +/* 396 */ drawCell(g, e, false); +/* */ } +/* 398 */ x += this.cellWidth; +/* */ +/* */ +/* 401 */ if (x + this.cellWidth > width) { +/* 402 */ x = 0; +/* 403 */ if (y += this.cellHeight >= height) +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* 409 */ public boolean isIconsVisible() { return this.useIcons; } +/* */ +/* */ public void setIconsVisible(boolean showIcons) { +/* 412 */ this.useIcons = showIcons; +/* 413 */ recalc(getSize().width, getSize().height); +/* 414 */ repaint(); +/* */ } +/* */ +/* */ private boolean setScrollValue(int value) +/* */ { +/* 419 */ this.scrollPos = Math.max(this.scrollbar.getMinimum(), value); +/* 420 */ this.scrollPos = +/* 421 */ Math.min(this.maxScrollPos, this.scrollPos); +/* 422 */ this.scrollbar.setValue(this.scrollPos); +/* 423 */ repaint(); +/* 424 */ return true; +/* */ } +/* */ +/* */ private boolean scrollLineUp() +/* */ { +/* 429 */ return setScrollValue(this.scrollPos - this.scrollbar.getLineIncrement()); +/* */ } +/* */ +/* */ private boolean scrollLineDown() +/* */ { +/* 434 */ return setScrollValue(this.scrollPos + this.scrollbar.getLineIncrement()); +/* */ } +/* */ +/* */ private boolean scrollPageUp() +/* */ { +/* 439 */ return setScrollValue(this.scrollPos - this.scrollbar.getPageIncrement()); +/* */ } +/* */ +/* */ private boolean scrollPageDown() +/* */ { +/* 444 */ return setScrollValue(this.scrollPos + this.scrollbar.getPageIncrement()); +/* */ } +/* */ +/* */ private boolean scrollAbsolute() +/* */ { +/* 449 */ return setScrollValue(this.scrollbar.getValue()); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScrollingImagePanel.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ScrollingListElement.java b/NET/worlds/scape/ScrollingListElement.java new file mode 100644 index 0000000..edaf4a7 --- /dev/null +++ b/NET/worlds/scape/ScrollingListElement.java @@ -0,0 +1,473 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Image; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ScrollingListElement +/* */ { +/* */ Image image; +/* */ String title; +/* */ int titleWidth; +/* */ int x; +/* */ int y; +/* */ +/* */ ScrollingListElement(Image image, String title, int titleWidth) +/* */ { +/* 463 */ this.image = image; +/* 464 */ this.title = title; +/* 465 */ this.titleWidth = titleWidth; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ScrollingListElement.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SelectAvatarAction.java b/NET/worlds/scape/SelectAvatarAction.java new file mode 100644 index 0000000..f4caec2 --- /dev/null +++ b/NET/worlds/scape/SelectAvatarAction.java @@ -0,0 +1,223 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.ServerTableManager; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SelectAvatarAction +/* */ extends DialogAction +/* */ { +/* 47 */ URL url = null; +/* */ +/* */ +/* */ +/* */ String description; +/* */ +/* */ +/* */ +/* */ +/* */ private URL getURLVal() +/* */ { +/* 58 */ URL val = this.url; +/* 59 */ if (val == null) { +/* 60 */ SuperRoot o = getOwner(); +/* 61 */ if ((o instanceof Drone)) { +/* 62 */ val = ((Drone)o).getSourceURL(); +/* 63 */ } else if ((o instanceof PosableShape)) { +/* 64 */ val = ((Shape)o).getURL(); +/* 65 */ } else if ((o instanceof Hologram)) +/* 66 */ val = ((Hologram)o).getMovieName(); +/* */ } +/* 68 */ return val; +/* */ } +/* */ +/* */ public void doIt() { +/* 72 */ Console console = Console.getActive(); +/* 73 */ URL val = getURLVal(); +/* 74 */ if ((console != null) && (val != null)) +/* 75 */ console.setAvatar(val); +/* */ } +/* */ +/* */ public PolledDialog getDialog() { +/* 79 */ URL val = getURLVal(); +/* */ +/* 81 */ if ((!Console.getActive().getVIP()) && +/* 82 */ (val.getInternal().toLowerCase().endsWith(".rwg"))) +/* */ { +/* 84 */ return new OkCancelDialog(Console.getFrame(), this, +/* 85 */ Console.message("Cant-change-AV"), Console.message("OK"), +/* 86 */ null, Console.message("Only-VIPs-change"), +/* 87 */ false); +/* */ } +/* 89 */ String desc = this.description; +/* */ +/* 91 */ if ((desc == null) || (desc.length() == 0)) { +/* 92 */ desc = getPrettyAvatarName(val.getBase()); +/* */ } +/* 94 */ return new ChangeAvatarDialog(Console.getFrame(), this, desc); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 105 */ static String[] avatarAliases = ServerTableManager.instance().getTable("avatarAliases"); +/* */ +/* */ public static String getPrettyAvatarName(String name) +/* */ { +/* 109 */ int extIndex = name.indexOf('.'); +/* */ +/* 111 */ if (extIndex >= 0) { +/* 112 */ name = name.substring(0, extIndex).toLowerCase(); +/* */ } else { +/* 114 */ name = name.toLowerCase(); +/* */ } +/* */ +/* 117 */ for (int i = 0; i < avatarAliases.length; i += 2) +/* */ { +/* 119 */ if (avatarAliases[i].equals(name)) { +/* 120 */ return avatarAliases[(i + 1)]; +/* */ } +/* */ } +/* 123 */ String properName = name.substring(0, 1).toUpperCase(); +/* 124 */ if (name.length() > 1) { +/* 125 */ properName = properName + name.substring(1); +/* */ } +/* 127 */ return properName; +/* */ } +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 132 */ URL val = getURLVal(); +/* */ +/* 134 */ if (val == null) { +/* 135 */ return null; +/* */ } +/* 137 */ return super.trigger(e, seqID); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 145 */ Object ret = null; +/* 146 */ switch (index - offset) { +/* */ case 0: +/* 148 */ if (mode == 0) { +/* 149 */ ret = URLPropertyEditor.make( +/* 150 */ new Property(this, index, "Avatar URL").allowSetNull(), +/* 151 */ "pilot;drone;rwx;rwg;mov"); +/* */ } +/* 153 */ else if (mode == 1) { +/* 154 */ ret = this.url; +/* 155 */ } else if (mode == 2) +/* 156 */ this.url = ((URL)value); +/* 157 */ break; +/* */ default: +/* 159 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 161 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 165 */ return +/* 166 */ super.toString() + "[url " + (this.url == null ? "null" : new StringBuilder(String.valueOf(this.url.getRelativeTo(this))).append("]").toString()); +/* */ } +/* */ +/* */ +/* 170 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 174 */ s.saveVersion(4, classCookie); +/* 175 */ super.saveState(s); +/* */ +/* 177 */ URL.save(s, this.url); +/* 178 */ s.saveString(this.description); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 183 */ int ver = r.restoreVersion(classCookie); +/* 184 */ switch (ver) { +/* */ case 3: +/* */ case 4: +/* 187 */ super.restoreState(r); +/* 188 */ this.url = URL.restore(r, ".world"); +/* 189 */ if (ver >= 4) +/* 190 */ this.description = r.restoreString(); +/* 191 */ break; +/* */ +/* */ case 2: +/* 194 */ dialogActionSkipRestore(r); +/* 195 */ this.url = URL.restore(r, ".world"); +/* 196 */ this.showDialog = r.restoreBoolean(); +/* 197 */ this.cancelOnly = r.restoreBoolean(); +/* 198 */ break; +/* */ +/* */ case 1: +/* 201 */ r.setOldFlag(); +/* 202 */ dialogActionSkipRestore(r); +/* 203 */ this.url = URL.restore(r, ".world"); +/* 204 */ this.showDialog = r.restoreBoolean(); +/* 205 */ break; +/* */ +/* */ case 0: +/* 208 */ r.setOldFlag(); +/* 209 */ dialogActionSkipRestore(r); +/* 210 */ this.url = URL.restore(r, ".world"); +/* 211 */ break; +/* */ +/* */ default: +/* 214 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SelectAvatarAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SendURLAction.java b/NET/worlds/scape/SendURLAction.java new file mode 100644 index 0000000..0cd5c26 --- /dev/null +++ b/NET/worlds/scape/SendURLAction.java @@ -0,0 +1,637 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.InternetExplorer; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.console.WebBrowser; +/* */ import NET.worlds.console.WebControlImp; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.RemoteFileConst; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SendURLAction +/* */ extends DialogAction +/* */ implements MainCallback, RemoteFileConst +/* */ { +/* */ URL destination; +/* */ URL destinationOverride; +/* */ String worldOverride; +/* */ String description; +/* 85 */ String postData = null; +/* */ +/* */ +/* */ +/* */ protected boolean getUser; +/* */ +/* */ +/* */ InternetExplorer bogusBrowser; +/* */ +/* */ +/* 95 */ private static String notAvailablePrefix = "http://www.worldsstore.com/superstore/en/product/"; +/* 96 */ private static Hashtable notAvailable = new Hashtable(); +/* 97 */ static { Object o = new Object(); +/* 98 */ notAvailable.put("pa101", o); +/* 99 */ notAvailable.put("pa102", o); +/* 100 */ notAvailable.put("pg102", o); +/* 101 */ notAvailable.put("pg105", o); +/* 102 */ notAvailable.put("ph108", o); +/* 103 */ notAvailable.put("ph502", o); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public SendURLAction() +/* */ { +/* 111 */ this("http://www.worlds.net"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public SendURLAction(URL dest) +/* */ { +/* 121 */ this.destination = dest; +/* 122 */ this.getUser = false; +/* */ } +/* */ +/* */ public SendURLAction(String dest) { +/* 126 */ this(dest == null ? null : URL.make(dest)); +/* */ } +/* */ +/* */ public SendURLAction(String dest, boolean get) { +/* 130 */ this(dest == null ? null : URL.make(dest), get); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private String trigger; +/* */ +/* */ +/* */ +/* */ public SendURLAction(URL dest, boolean get) +/* */ { +/* 142 */ this.destination = dest; +/* 143 */ this.getUser = get; +/* */ } +/* */ +/* */ public void setDestination(URL d) { +/* 147 */ this.destination = d; +/* */ } +/* */ +/* */ +/* */ +/* */ public void setTrigger(String t) +/* */ { +/* 154 */ this.trigger = t; +/* */ } +/* */ +/* */ public void startBrowser() { +/* 158 */ if (Main.isMainThread()) { +/* 159 */ tryLaunch(); +/* */ } else +/* 161 */ Main.register(this); +/* */ } +/* */ +/* */ public void mainCallback() { +/* 165 */ Main.unregister(this); +/* 166 */ tryLaunch(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private URL getDestination() +/* */ { +/* 175 */ if (this.worldOverride != null) { +/* 176 */ IniFile ini = new IniFile("InstalledWorlds"); +/* 177 */ String first = ini.getIniString("InstalledWorld0", ""); +/* 178 */ if (this.worldOverride.equalsIgnoreCase(first)) +/* 179 */ return this.destinationOverride; +/* */ } +/* 181 */ return this.destination; +/* */ } +/* */ +/* */ private void tryLaunch() +/* */ { +/* 186 */ URL destURL = getDestination(); +/* 187 */ if (destURL == null) { +/* 188 */ return; +/* */ } +/* 190 */ String dest = destURL.unalias(); +/* */ +/* */ +/* 193 */ String newDest = WebControlImp.processURL(dest); +/* */ +/* 195 */ if (newDest != null) { +/* 196 */ dest = newDest; +/* */ } +/* 198 */ if (this.postData != null) { +/* 199 */ this.postData = WebControlImp.processURL(this.postData); +/* */ } +/* 201 */ String info = null; +/* */ +/* */ +/* 204 */ Console console = Console.getActive(); +/* 205 */ if ((console != null) && (console.getGalaxy().getChatname() != null) && +/* 206 */ (!console.getGalaxy().getChatname().equals(""))) { +/* 207 */ info = "Username=" + console.getGalaxy().getUsernameU(); +/* */ } +/* */ +/* */ +/* 211 */ if ((this.getUser) && (info != null)) { +/* 212 */ dest = dest + "?" + info; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 231 */ String midDest = dest.substring(dest.indexOf(":") + 1); +/* */ +/* 233 */ if (dest.startsWith("sound:")) { +/* 234 */ dest = URL.make(midDest).unalias(); +/* */ +/* 236 */ WavSoundPlayer.pauseSystem(); +/* 237 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 240 */ WebBrowser.forceMinimized(true); +/* 241 */ WebBrowser.reuseOrMake(dest, this.postData, +/* 242 */ WebBrowser.getAdPartPlacement(), +/* 243 */ "sound:"); +/* 244 */ WebBrowser.forceMinimized(false); +/* 245 */ return; +/* */ +/* */ +/* */ } +/* */ catch (IOException localIOException) {} +/* */ +/* */ } +/* 252 */ else if ((dest.startsWith("videoMap:")) || +/* 253 */ (dest.startsWith("overmap:"))) { +/* 254 */ dest = URL.make(midDest).unalias(); +/* */ +/* 256 */ WavSoundPlayer.pauseSystem(); +/* 257 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 260 */ WebBrowser.dontUseToolbar(); +/* 261 */ WebBrowser.dontUseWindowFrame(); +/* 262 */ WebBrowser.reuseOrMake(dest, this.postData, +/* */ +/* 264 */ WebBrowser.getMapPartPlacement(), +/* 265 */ "videoMap:"); +/* 266 */ WebBrowser.useToolbar(); +/* 267 */ return; +/* */ +/* */ +/* */ } +/* */ catch (IOException localIOException1) {} +/* */ +/* */ } +/* 274 */ else if (dest.startsWith("videoAd:")) { +/* 275 */ dest = URL.make(midDest).unalias(); +/* */ +/* 277 */ WavSoundPlayer.pauseSystem(); +/* 278 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 281 */ WebBrowser.dontUseToolbar(); +/* 282 */ WebBrowser.dontUseWindowFrame(); +/* 283 */ WebBrowser.reuseOrMake(dest, this.postData, +/* 284 */ WebBrowser.getAdPartPlacement(), +/* 285 */ "videoAd:"); +/* 286 */ WebBrowser.useToolbar(); +/* 287 */ return; +/* */ +/* */ +/* */ } +/* */ catch (IOException localIOException2) {} +/* */ +/* */ } +/* 294 */ else if (dest.startsWith("zoom:")) { +/* 295 */ dest = URL.make(midDest).unalias(); +/* */ +/* 297 */ WavSoundPlayer.pauseSystem(); +/* 298 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 301 */ WebBrowser.dontUseToolbar(); +/* 302 */ WebBrowser.dontUseWindowFrame(); +/* 303 */ WebBrowser.reuseOrMake(dest, this.postData, +/* 304 */ WebBrowser.getRenderPartPlacement(), +/* 305 */ "zoom:"); +/* 306 */ WebBrowser.useToolbar(); +/* 307 */ return; +/* */ +/* */ +/* */ } +/* */ catch (IOException localIOException3) {} +/* */ +/* */ } +/* 314 */ else if (dest.startsWith("zoomLeft:")) { +/* 315 */ dest = URL.make(midDest).unalias(); +/* */ +/* 317 */ WavSoundPlayer.pauseSystem(); +/* 318 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 321 */ WebBrowser.dontUseToolbar(); +/* 322 */ WebBrowser.dontUseWindowFrame(); +/* 323 */ WebBrowser.reuseOrMake(dest, this.postData, +/* 324 */ WebBrowser.getLeftRenderPartPlacement(), +/* 325 */ "zoomLeft:"); +/* 326 */ WebBrowser.useToolbar(); +/* 327 */ return; +/* */ +/* */ +/* */ } +/* */ catch (IOException localIOException4) {} +/* */ +/* */ } +/* 334 */ else if (dest.startsWith("outside:")) { +/* 335 */ dest = URL.make(midDest).unalias(); +/* */ +/* 337 */ WavSoundPlayer.pauseSystem(); +/* 338 */ CDAudio.get().setEnabled(false); +/* */ try +/* */ { +/* 341 */ WebBrowser.dontUseToolbar(); +/* 342 */ WebBrowser.reuseOrMake(dest, this.postData, +/* 343 */ WebBrowser.getOutsidePlacement(), +/* 344 */ "outside:"); +/* 345 */ WebBrowser.useToolbar(); +/* 346 */ return; +/* */ +/* */ } +/* */ catch (IOException localIOException5) {} +/* */ +/* */ } +/* 352 */ else if (dest.startsWith("http:")) { +/* */ try { +/* 354 */ WebBrowser.reuseOrMake(dest, this.postData); +/* 355 */ return; +/* */ } +/* */ catch (IOException localIOException6) {} +/* */ } +/* */ +/* */ +/* 361 */ if (this.bogusBrowser == null) +/* */ { +/* */ try +/* */ { +/* */ +/* 366 */ this.bogusBrowser = new InternetExplorer(null); +/* */ } +/* */ catch (IOException localIOException7) {} +/* */ } +/* */ +/* */ +/* 372 */ if (!launchViaRegistry(dest)) +/* 373 */ Console.println(dest + Console.message("Unable-to-launch")); +/* */ } +/* */ +/* 376 */ private int tries = 0; +/* 377 */ private Persister curSeq = null; +/* */ +/* */ public void doIt() { +/* 380 */ startBrowser(); +/* */ } +/* */ +/* */ public PolledDialog getDialog() +/* */ { +/* 385 */ URL tmpURL = getDestination(); +/* 386 */ if (tmpURL == null) { +/* 387 */ return new ItemNotAvailableDialog(Console.getFrame(), this); +/* */ } +/* 389 */ String tmp = tmpURL.unalias().toLowerCase(); +/* 390 */ if (tmp.startsWith(notAvailablePrefix)) +/* */ { +/* 392 */ if (notAvailable.containsKey(tmp.substring(notAvailablePrefix.length()))) { +/* 393 */ return new ItemNotAvailableDialog(Console.getFrame(), this); +/* */ } +/* */ } +/* 396 */ if ((this.description == null) || +/* 397 */ (this.description.equals("Would you like more information?"))) { +/* 398 */ return new MoreInfoDialog(Console.getFrame(), this); +/* */ } +/* 400 */ return new OkCancelDialog(Console.getFrame(), this, +/* 401 */ Console.message("BrowseQ"), Console.message("Cancel"), +/* 402 */ Console.message("OK"), this.description, false, 1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static native boolean launchViaRegistry(String paramString); +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 415 */ Object ret = null; +/* 416 */ switch (index - offset) { +/* */ case 0: +/* 418 */ if (mode == 0) { +/* 419 */ ret = URLPropertyEditor.make(new Property(this, +/* 420 */ index, +/* 421 */ "Destination") +/* 422 */ .allowSetNull(), null); +/* 423 */ } else if (mode == 1) { +/* 424 */ ret = this.destination; +/* 425 */ } else if (mode == 2) +/* 426 */ this.destination = ((URL)value); +/* 427 */ break; +/* */ case 1: +/* 429 */ if (mode == 0) { +/* 430 */ ret = StringPropertyEditor.make(new Property(this, +/* 431 */ index, +/* 432 */ "Description")); +/* 433 */ } else if (mode == 1) { +/* 434 */ ret = this.description; +/* 435 */ } else if (mode == 2) +/* 436 */ this.description = ((String)value).trim(); +/* 437 */ break; +/* */ case 2: +/* 439 */ if (mode == 0) { +/* 440 */ ret = URLPropertyEditor.make(new Property(this, +/* 441 */ index, +/* 442 */ "Destination Override") +/* 443 */ .allowSetNull(), null); +/* 444 */ } else if (mode == 1) { +/* 445 */ ret = this.destinationOverride; +/* 446 */ } else if (mode == 2) +/* 447 */ this.destinationOverride = ((URL)value); +/* 448 */ break; +/* */ case 3: +/* 450 */ if (mode == 0) { +/* 451 */ ret = StringPropertyEditor.make(new Property(this, +/* 452 */ index, +/* 453 */ "Override World") +/* 454 */ .allowSetNull()); +/* 455 */ } else if (mode == 1) { +/* 456 */ ret = this.worldOverride; +/* 457 */ } else if (mode == 2) { +/* 458 */ if (value == null) { +/* 459 */ this.worldOverride = null; +/* */ } else { +/* 461 */ this.worldOverride = ((String)value).trim(); +/* 462 */ if (this.worldOverride.length() == 0) +/* 463 */ this.worldOverride = null; +/* */ } +/* */ } +/* 466 */ break; +/* */ case 4: +/* 468 */ if (mode == 0) { +/* 469 */ ret = BooleanPropertyEditor.make(new Property(this, +/* 470 */ index, "Send User Info (auto-login)"), "No", "Yes"); +/* 471 */ } else if (mode == 1) { +/* 472 */ ret = new Boolean(this.getUser); +/* 473 */ } else if (mode == 2) { +/* 474 */ if (((Boolean)value).booleanValue()) { +/* 475 */ this.getUser = true; +/* */ } else { +/* 477 */ this.getUser = false; +/* */ } +/* */ } +/* 480 */ break; +/* */ +/* */ case 5: +/* 483 */ if (mode == 0) { +/* 484 */ ret = StringPropertyEditor.make(new Property(this, +/* 485 */ index, +/* 486 */ "POST data")); +/* 487 */ } else if (mode == 1) { +/* 488 */ ret = this.postData; +/* 489 */ } else if (mode == 2) +/* 490 */ this.postData = ((String)value).trim(); +/* 491 */ break; +/* */ +/* */ +/* */ default: +/* 495 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* */ +/* 498 */ return ret; +/* */ } +/* */ +/* 501 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 505 */ s.saveVersion(9, classCookie); +/* 506 */ super.saveState(s); +/* 507 */ s.saveString(this.description); +/* 508 */ URL.save(s, this.destination); +/* 509 */ URL.save(s, this.destinationOverride); +/* 510 */ s.saveString(this.worldOverride); +/* 511 */ s.saveBoolean(this.getUser); +/* 512 */ s.saveString(this.postData); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 517 */ String destStr = null; +/* */ +/* 519 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 521 */ r.setOldFlag(); +/* 522 */ r.restoreBoolean(); +/* 523 */ destStr = r.restoreString(); +/* 524 */ r.restoreString(); +/* 525 */ break; +/* */ case 2: +/* 527 */ r.setOldFlag(); +/* 528 */ r.restoreBoolean(); +/* 529 */ destStr = r.restoreString(); +/* 530 */ break; +/* */ case 3: +/* 532 */ dialogActionSkipRestore(r); +/* 533 */ r.restoreBoolean(); +/* 534 */ destStr = r.restoreString(); +/* 535 */ break; +/* */ case 4: +/* 537 */ dialogActionSkipRestore(r); +/* 538 */ destStr = r.restoreString(); +/* 539 */ break; +/* */ case 5: +/* 541 */ dialogActionSkipRestore(r); +/* 542 */ destStr = r.restoreString(); +/* 543 */ this.getUser = r.restoreBoolean(); +/* 544 */ r.restoreBoolean(); +/* 545 */ break; +/* */ case 6: +/* 547 */ super.restoreState(r); +/* 548 */ this.description = r.restoreString(); +/* 549 */ destStr = r.restoreString(); +/* 550 */ this.getUser = r.restoreBoolean(); +/* 551 */ r.restoreBoolean(); +/* 552 */ break; +/* */ case 7: +/* 554 */ super.restoreState(r); +/* 555 */ this.description = r.restoreString(); +/* 556 */ destStr = r.restoreString(); +/* */ +/* 558 */ String destOverrideStr = r.restoreString(); +/* 559 */ if (destOverrideStr != null) { +/* 560 */ this.destinationOverride = URL.make(destOverrideStr); +/* */ } +/* 562 */ this.worldOverride = r.restoreString(); +/* 563 */ this.getUser = r.restoreBoolean(); +/* 564 */ r.restoreBoolean(); +/* 565 */ break; +/* */ case 8: +/* 567 */ super.restoreState(r); +/* 568 */ this.description = r.restoreString(); +/* 569 */ this.destination = URL.restore(r, null); +/* 570 */ this.destinationOverride = URL.restore(r, null); +/* 571 */ this.worldOverride = r.restoreString(); +/* 572 */ this.getUser = r.restoreBoolean(); +/* 573 */ r.restoreBoolean(); +/* 574 */ break; +/* */ case 9: +/* 576 */ super.restoreState(r); +/* 577 */ this.description = r.restoreString(); +/* 578 */ this.destination = URL.restore(r, null); +/* 579 */ this.destinationOverride = URL.restore(r, null); +/* 580 */ this.worldOverride = r.restoreString(); +/* 581 */ this.getUser = r.restoreBoolean(); +/* 582 */ this.postData = r.restoreString(); +/* 583 */ break; +/* */ +/* */ default: +/* 586 */ throw new TooNewException(); +/* */ } +/* 588 */ if (destStr != null) { +/* 589 */ this.destination = URL.make(destStr); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) { +/* 594 */ super.postRestore(version); +/* 595 */ if (this.trigger != null) +/* */ { +/* */ +/* 598 */ SuperRoot owner = getOwner(); +/* */ +/* 600 */ while ((owner != null) && (!(owner instanceof WObject))) { +/* 601 */ owner = owner.getOwner(); +/* */ } +/* 603 */ if (owner == null) { +/* 604 */ Object[] arguments = { new String(getName()) }; +/* 605 */ Console.println(MessageFormat.format( +/* 606 */ Console.message("Cannot-sensor"), arguments)); +/* 607 */ } else if (this.trigger.equals("click")) { +/* 608 */ ((WObject)owner).addHandler(new ClickSensor(this)); +/* 609 */ } else if (this.trigger.equals("bump")) { +/* 610 */ ((WObject)owner).addHandler(new BumpSensor(this)); +/* */ } else { +/* 612 */ Room r = ((WObject)owner).getRoom(); +/* 613 */ if (r != null) +/* */ { +/* 615 */ Object[] arguments = { new String(this.trigger), +/* 616 */ new String(getName()), new String(r.getName()) }; +/* 617 */ Console.println(MessageFormat.format( +/* 618 */ Console.message("Trigger-value-in"), arguments)); +/* */ } +/* */ else +/* */ { +/* 622 */ Object[] arguments = { new String(this.trigger), +/* 623 */ new String(getName()) }; +/* 624 */ Console.println(MessageFormat.format( +/* 625 */ Console.message("Trigger-value"), arguments)); +/* */ } +/* */ } +/* 628 */ this.trigger = null; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SendURLAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Sensor.java b/NET/worlds/scape/Sensor.java new file mode 100644 index 0000000..47d0a6f --- /dev/null +++ b/NET/worlds/scape/Sensor.java @@ -0,0 +1,208 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Sensor +/* */ extends SuperRoot +/* */ { +/* 70 */ protected Vector actions = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addAction(Action o) +/* */ { +/* 82 */ this.actions.addElement(o); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void deleteAction(Action o) +/* */ { +/* 93 */ this.actions.removeElement(o); +/* */ } +/* */ +/* */ +/* */ +/* */ public void deleteActions() +/* */ { +/* 100 */ while (this.actions.size() > 0) { +/* 101 */ deleteAction((Action)this.actions.elementAt(0)); +/* */ } +/* */ } +/* */ +/* */ +/* */ public Enumeration getActions() +/* */ { +/* 108 */ return this.actions.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ public int countActions() +/* */ { +/* 115 */ return this.actions.size(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void trigger(Event event) +/* */ { +/* 126 */ RunningActionHandler.trigger(this.actions, getWorld(), event); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 136 */ Object ret = null; +/* 137 */ switch (index - offset) { +/* */ case 0: +/* 139 */ if (mode == 0) { +/* 140 */ ret = ObjectPropertyAdder.make(new VectorProperty(this, index, +/* 141 */ "Targets"), getRoot(), "NET.worlds.scape.Action"); +/* 142 */ } else if (mode == 1) { +/* 143 */ ret = this.actions.clone(); +/* 144 */ } else if (mode == 4) { +/* 145 */ deleteAction((Action)value); +/* 146 */ } else if (mode == 3) +/* 147 */ addAction((Action)value); +/* 148 */ break; +/* */ default: +/* 150 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 152 */ return ret; +/* */ } +/* */ +/* */ +/* 156 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 159 */ s.saveVersion(2, classCookie); +/* 160 */ super.saveState(s); +/* 161 */ s.saveVector(this.actions); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 165 */ restoreStateVers(r); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected int restoreStateVers(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 175 */ int vers = r.restoreVersion(classCookie); +/* */ +/* 177 */ switch (vers) { +/* */ case 1: +/* */ case 2: +/* 180 */ super.restoreState(r); +/* */ case 0: +/* 182 */ this.actions = r.restoreVectorActions(); +/* 183 */ break; +/* */ default: +/* 185 */ throw new TooNewException(); +/* */ } +/* */ +/* 188 */ return vers; +/* */ } +/* */ +/* */ public void postRestore(int version) { +/* 192 */ super.postRestore(version); +/* 193 */ for (Enumeration en = getActions(); en.hasMoreElements();) { +/* 194 */ Action a = (Action)en.nextElement(); +/* 195 */ if ((getOwner() != null) && (a.getOwner() == null)) { +/* 196 */ System.out.println("Reparenting orphan action " + a.getName()); +/* 197 */ WObject w = (WObject)getOwner(); +/* 198 */ w.addAction(a); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Sensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SensorFrameHandler.java b/NET/worlds/scape/SensorFrameHandler.java new file mode 100644 index 0000000..15758c8 --- /dev/null +++ b/NET/worlds/scape/SensorFrameHandler.java @@ -0,0 +1,228 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SensorFrameHandler +/* */ extends SuperRoot +/* */ { +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 213 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 217 */ RunningActionHandler a = new RunningActionHandler(); +/* 218 */ r.replace(this, a); +/* */ +/* 220 */ a.restoreState(r); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SensorFrameHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SeqFile.java b/NET/worlds/scape/SeqFile.java new file mode 100644 index 0000000..2acc395 --- /dev/null +++ b/NET/worlds/scape/SeqFile.java @@ -0,0 +1,44 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ public class SeqFile +/* */ implements BGLoaded +/* */ { +/* */ private int nativeNotifyObject; +/* */ +/* */ public SeqFile(int obj, URL path) +/* */ { +/* 13 */ this.nativeNotifyObject = obj; +/* 14 */ BackgroundLoader.get(this, path); +/* */ } +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteURL) +/* */ { +/* 19 */ PendingCacheDrone.notifySeqLoaded(this.nativeNotifyObject, localName); +/* 20 */ return localName; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 25 */ return false; +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 30 */ Pilot p = Pilot.getActive(); +/* 31 */ if (p != null) +/* */ { +/* 33 */ return p.getRoom(); +/* */ } +/* */ +/* 36 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SeqFile.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SequenceAction.java b/NET/worlds/scape/SequenceAction.java new file mode 100644 index 0000000..6eb257c --- /dev/null +++ b/NET/worlds/scape/SequenceAction.java @@ -0,0 +1,210 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SequenceAction +/* */ extends Action +/* */ { +/* 50 */ protected int loopCount = 1; +/* 51 */ protected boolean loopInfinite = false; +/* 52 */ Vector actions = new Vector(); +/* */ +/* */ +/* */ SequenceActionState currentSeq; +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event evt, Persister seqID) +/* */ { +/* 61 */ if (seqID != this.currentSeq) { +/* 62 */ return null; +/* */ } +/* 64 */ if (seqID == null) { +/* 65 */ this.currentSeq = new SequenceActionState(this); +/* */ } +/* 67 */ if (!this.currentSeq.run(evt)) { +/* 68 */ this.currentSeq = null; +/* */ } +/* 70 */ return this.currentSeq; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addComponent(Action act) +/* */ { +/* 79 */ this.actions.addElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void insertComponent(Action act, int index) +/* */ { +/* 89 */ this.actions.insertElementAt(act, index); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean removeComponent(Action act) +/* */ { +/* 99 */ return this.actions.removeElement(act); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getComponents() +/* */ { +/* 108 */ return this.actions.elements(); +/* */ } +/* */ +/* */ +/* 112 */ public int getLoopCount() { return this.loopCount; } +/* 113 */ public void setLoopCount(int c) { this.loopCount = c; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 123 */ Object ret = null; +/* 124 */ switch (index - offset) { +/* */ case 0: +/* 126 */ if (mode == 0) { +/* 127 */ VectorProperty vp = +/* 128 */ new VectorProperty(this, index, "Components"); +/* 129 */ vp.allowSorting(false); +/* 130 */ ret = ObjectPropertyAdder.make(vp, getRoot(), +/* 131 */ "NET.worlds.scape.Action"); +/* 132 */ } else if (mode == 1) { +/* 133 */ ret = this.actions.clone(); +/* 134 */ } else if (mode == 4) { +/* 135 */ this.actions.removeElement(value); +/* 136 */ } else if (mode == 3) { +/* 137 */ this.actions.addElement((Action)value); } +/* 138 */ break; +/* */ case 1: +/* 140 */ if (mode == 0) { +/* 141 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 142 */ "Loop Count")); +/* 143 */ } else if (mode == 1) { +/* 144 */ ret = new Integer(this.loopCount); +/* 145 */ } else if (mode == 2) +/* 146 */ this.loopCount = ((Integer)value).intValue(); +/* 147 */ break; +/* */ case 2: +/* 149 */ if (mode == 0) { +/* 150 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 151 */ "Loop Infinite"), "False", "True"); +/* 152 */ } else if (mode == 1) { +/* 153 */ ret = new Boolean(this.loopInfinite); +/* 154 */ } else if (mode == 2) +/* 155 */ this.loopInfinite = ((Boolean)value).booleanValue(); +/* 156 */ break; +/* */ default: +/* 158 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 160 */ return ret; +/* */ } +/* */ +/* */ +/* 164 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 168 */ s.saveVersion(2, classCookie); +/* 169 */ super.saveState(s); +/* 170 */ s.saveBoolean(this.loopInfinite); +/* 171 */ s.saveVector(this.actions); +/* 172 */ s.saveInt(this.loopCount); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 177 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 179 */ super.restoreState(r); +/* 180 */ this.loopInfinite = r.restoreBoolean(); +/* 181 */ this.actions = r.restoreVectorActions(); +/* 182 */ this.loopCount = r.restoreInt(); +/* 183 */ break; +/* */ case 1: +/* 185 */ super.restoreState(r); +/* 186 */ this.actions = r.restoreVectorActions(); +/* 187 */ this.loopCount = r.restoreInt(); +/* 188 */ this.loopInfinite = (this.loopCount < 0); +/* 189 */ this.loopCount = Math.abs(this.loopCount); +/* 190 */ break; +/* */ case 0: +/* 192 */ r.setOldFlag(); +/* 193 */ super.restoreState(r); +/* 194 */ this.actions = r.restoreVectorActions(); +/* 195 */ this.loopCount = r.restoreInt(); +/* 196 */ this.loopInfinite = (this.loopCount < 0); +/* 197 */ this.loopCount = Math.abs(this.loopCount); +/* 198 */ r.restoreBoolean(); +/* 199 */ break; +/* */ default: +/* 201 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SequenceAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SequenceActionState.java b/NET/worlds/scape/SequenceActionState.java new file mode 100644 index 0000000..a427c87 --- /dev/null +++ b/NET/worlds/scape/SequenceActionState.java @@ -0,0 +1,314 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SequenceActionState +/* */ implements Persister +/* */ { +/* */ int currentLoop; +/* */ boolean loopInfinite; +/* */ Vector actions; +/* */ Persister seqID; +/* */ int currentAct; +/* */ +/* */ SequenceActionState() {} +/* */ +/* */ SequenceActionState(SequenceAction sa) +/* */ { +/* 226 */ this.currentLoop = sa.loopCount; +/* 227 */ this.loopInfinite = sa.loopInfinite; +/* */ +/* 229 */ this.actions = ((Vector)sa.actions.clone()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean run(Event evt) +/* */ { +/* 238 */ if ((this.currentLoop <= 0) && (!this.loopInfinite)) { +/* 239 */ return false; +/* */ } +/* 243 */ for (; +/* */ +/* 243 */ this.currentAct < this.actions.size(); this.currentAct += 1) +/* */ { +/* 245 */ Action act = (Action)this.actions.elementAt(this.currentAct); +/* */ +/* */ +/* 248 */ if ((this.seqID = act.trigger(evt, this.seqID)) != null) +/* 249 */ return true; +/* */ } +/* 251 */ this.currentAct = 0; +/* */ +/* 253 */ if (this.currentLoop > 0) { +/* 254 */ this.currentLoop -= 1; +/* */ } +/* 256 */ return true; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 261 */ String stateString = "Action #" + this.currentAct + " of loop " + this.currentLoop + +/* 262 */ ", status " + this.seqID; +/* 263 */ if (!this.loopInfinite) +/* 264 */ stateString = stateString + " NOT"; +/* 265 */ stateString = stateString + " Infinite"; +/* */ +/* 267 */ return stateString; +/* */ } +/* */ +/* */ +/* */ +/* 272 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 276 */ s.saveVersion(1, classCookie); +/* 277 */ s.saveBoolean(this.loopInfinite); +/* 278 */ s.saveInt(this.currentLoop); +/* 279 */ s.saveInt(this.currentAct); +/* 280 */ s.saveVector(this.actions); +/* 281 */ s.saveMaybeNull(this.seqID); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 286 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 288 */ this.loopInfinite = r.restoreBoolean(); +/* 289 */ this.currentLoop = r.restoreInt(); +/* 290 */ this.currentAct = r.restoreInt(); +/* 291 */ this.actions = r.restoreVectorActions(); +/* 292 */ this.seqID = r.restoreMaybeNull(); +/* 293 */ break; +/* */ case 0: +/* 295 */ this.currentLoop = r.restoreInt(); +/* 296 */ this.loopInfinite = (this.currentLoop < 0); +/* 297 */ this.currentLoop = Math.abs(this.currentLoop); +/* 298 */ this.currentAct = r.restoreInt(); +/* 299 */ this.actions = r.restoreVectorActions(); +/* 300 */ this.seqID = r.restoreMaybeNull(); +/* 301 */ break; +/* */ default: +/* 303 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SequenceActionState.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetBooleanAction.java b/NET/worlds/scape/SetBooleanAction.java new file mode 100644 index 0000000..f9e2fe6 --- /dev/null +++ b/NET/worlds/scape/SetBooleanAction.java @@ -0,0 +1,75 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetBooleanAction +/* */ extends SetPropertyAction +/* */ { +/* */ private boolean _value; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 21 */ if (useParam()) +/* 22 */ this._value = Boolean.valueOf(param()).booleanValue(); +/* 23 */ set(new Boolean(this._value)); +/* 24 */ return null; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 30 */ Object ret = null; +/* 31 */ switch (index - offset) { +/* */ case 0: +/* 33 */ if (mode == 0) { +/* 34 */ ret = BooleanPropertyEditor.make( +/* 35 */ new Property(this, index, "Set To"), +/* 36 */ "False", "True"); +/* 37 */ } else if (mode == 1) { +/* 38 */ ret = new Boolean(this._value); +/* 39 */ } else if (mode == 2) +/* 40 */ this._value = ((Boolean)value).booleanValue(); +/* 41 */ break; +/* */ default: +/* 43 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 45 */ return ret; +/* */ } +/* */ +/* 48 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 52 */ s.saveVersion(1, classCookie); +/* 53 */ super.saveState(s); +/* 54 */ s.saveBoolean(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 59 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 61 */ super.restoreState(r); +/* 62 */ this._value = r.restoreBoolean(); +/* 63 */ break; +/* */ +/* */ default: +/* 66 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetBooleanAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetColorAction.java b/NET/worlds/scape/SetColorAction.java new file mode 100644 index 0000000..deac3ef --- /dev/null +++ b/NET/worlds/scape/SetColorAction.java @@ -0,0 +1,131 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetColorAction +/* */ extends SlidePropertyAction +/* */ { +/* 18 */ private Color _value = null; +/* */ +/* */ private Color _start; +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 25 */ Persister ret = null; +/* 26 */ Color val = null; +/* 27 */ if (useParam()) { +/* */ try { +/* 29 */ this._value = new Color(Integer.valueOf(param()).intValue()); +/* */ } +/* */ catch (NumberFormatException nfe) { +/* 32 */ System.out.println(getName() + " unable to parse " + +/* 33 */ paramName()); +/* 34 */ this._value = null; +/* */ } +/* */ } +/* 37 */ if (this._value == null) { +/* 38 */ if ((!$assertionsDisabled) && (slide())) throw new AssertionError(); +/* */ } +/* */ else { +/* 41 */ if (slide()) { +/* 42 */ if (seqID == null) { +/* 43 */ start(); +/* 44 */ this._start = ((Color)get()); +/* */ } +/* 46 */ float frac = fraction(); +/* 47 */ if (frac < 1.0D) { +/* 48 */ int red = (int)((this._value.getRed() - this._start.getRed()) * +/* 49 */ frac) + this._start.getRed(); +/* 50 */ int grn = (int)((this._value.getGreen() - this._start.getGreen()) * +/* 51 */ frac) + this._start.getGreen(); +/* 52 */ int blu = (int)((this._value.getBlue() - this._start.getBlue()) * +/* 53 */ frac) + this._start.getBlue(); +/* 54 */ val = new Color(red, grn, blu); +/* 55 */ ret = this; +/* */ } +/* */ } +/* 58 */ if (val == null) +/* 59 */ val = this._value; +/* */ } +/* 61 */ set(val); +/* 62 */ return ret; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 68 */ Object ret = null; +/* 69 */ switch (index - offset) { +/* */ case 0: +/* 71 */ if (mode == 0) { +/* 72 */ ret = ColorPropertyEditor.make(new Property(this, index, +/* 73 */ "Set To").allowSetNull()); +/* 74 */ if (this._value == null) { +/* 75 */ ret = MaybeNullPropertyEditor.make((Property)ret, +/* 76 */ Color.black); +/* */ } +/* */ } +/* 79 */ else if (mode == 1) { +/* 80 */ ret = this._value; +/* 81 */ } else if (mode == 2) { +/* 82 */ this._value = ((Color)value); +/* 83 */ } else if (mode == 4) { +/* 84 */ this._value = null; } +/* 85 */ break; +/* */ default: +/* 87 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 89 */ return ret; +/* */ } +/* */ +/* 92 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 96 */ s.saveVersion(1, classCookie); +/* 97 */ super.saveState(s); +/* 98 */ if (this._value == null) { +/* 99 */ s.saveBoolean(false); +/* */ } else { +/* 101 */ s.saveBoolean(true); +/* 102 */ s.saveInt(this._value.getRed()); +/* 103 */ s.saveInt(this._value.getGreen()); +/* 104 */ s.saveInt(this._value.getBlue()); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 110 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 112 */ super.restoreState(r); +/* 113 */ if (r.restoreBoolean()) { +/* 114 */ int red = r.restoreInt(); +/* 115 */ int grn = r.restoreInt(); +/* 116 */ int blu = r.restoreInt(); +/* 117 */ this._value = new Color(red, grn, blu); +/* */ } +/* 119 */ break; +/* */ +/* */ default: +/* 122 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetColorAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetFloatAction.java b/NET/worlds/scape/SetFloatAction.java new file mode 100644 index 0000000..5dbc088 --- /dev/null +++ b/NET/worlds/scape/SetFloatAction.java @@ -0,0 +1,100 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetFloatAction +/* */ extends SlidePropertyAction +/* */ { +/* */ private float _value; +/* */ private float _start; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 22 */ Persister ret = null; +/* 23 */ if (useParam()) { +/* */ try { +/* 25 */ this._value = Float.valueOf(param()).floatValue(); +/* */ } +/* */ catch (NumberFormatException nfe) { +/* 28 */ System.out.println(getName() + " unable to parse " + +/* 29 */ paramName()); +/* 30 */ this._value = 0.0F; +/* */ } +/* */ } +/* 33 */ float val = this._value; +/* 34 */ if (slide()) { +/* 35 */ if (seqID == null) { +/* 36 */ start(); +/* 37 */ this._start = ((Float)get()).floatValue(); +/* */ } +/* 39 */ float frac = fraction(); +/* 40 */ if (frac < 1.0D) { +/* 41 */ val = (this._value - this._start) * frac + this._start; +/* 42 */ ret = this; +/* */ } +/* */ } +/* 45 */ set(new Float(val)); +/* 46 */ return ret; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 52 */ Object ret = null; +/* 53 */ switch (index - offset) { +/* */ case 0: +/* 55 */ if (mode == 0) { +/* 56 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 57 */ "Set To")); +/* 58 */ } else if (mode == 1) { +/* 59 */ ret = new Float(this._value); +/* 60 */ } else if (mode == 2) +/* 61 */ this._value = ((Float)value).floatValue(); +/* 62 */ break; +/* */ default: +/* 64 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 66 */ return ret; +/* */ } +/* */ +/* 69 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 73 */ s.saveVersion(2, classCookie); +/* 74 */ super.saveState(s); +/* 75 */ s.saveFloat(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 80 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 82 */ super.restoreState(r); +/* 83 */ this._value = r.restoreFloat(); +/* 84 */ break; +/* */ case 1: +/* 86 */ setPropertyActionRestoreState(r); +/* 87 */ this._value = r.restoreFloat(); +/* 88 */ break; +/* */ +/* */ default: +/* 91 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetFloatAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetIntegerAction.java b/NET/worlds/scape/SetIntegerAction.java new file mode 100644 index 0000000..8ab7b5e --- /dev/null +++ b/NET/worlds/scape/SetIntegerAction.java @@ -0,0 +1,100 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetIntegerAction +/* */ extends SlidePropertyAction +/* */ { +/* */ private int _value; +/* */ private int _start; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 22 */ Persister ret = null; +/* 23 */ if (useParam()) { +/* */ try { +/* 25 */ this._value = Integer.valueOf(param()).intValue(); +/* */ } +/* */ catch (NumberFormatException nfe) { +/* 28 */ System.out.println(getName() + " unable to parse " + +/* 29 */ paramName()); +/* 30 */ this._value = 0; +/* */ } +/* */ } +/* 33 */ int val = this._value; +/* 34 */ if (slide()) { +/* 35 */ if (seqID == null) { +/* 36 */ start(); +/* 37 */ this._start = ((Integer)get()).intValue(); +/* */ } +/* 39 */ float frac = fraction(); +/* 40 */ if (frac < 1.0D) { +/* 41 */ val = (int)((this._value - this._start) * frac + this._start); +/* 42 */ ret = this; +/* */ } +/* */ } +/* 45 */ set(new Integer(val)); +/* 46 */ return ret; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 52 */ Object ret = null; +/* 53 */ switch (index - offset) { +/* */ case 0: +/* 55 */ if (mode == 0) { +/* 56 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 57 */ "Set To")); +/* 58 */ } else if (mode == 1) { +/* 59 */ ret = new Integer(this._value); +/* 60 */ } else if (mode == 2) +/* 61 */ this._value = ((Integer)value).intValue(); +/* 62 */ break; +/* */ default: +/* 64 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 66 */ return ret; +/* */ } +/* */ +/* 69 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 73 */ s.saveVersion(2, classCookie); +/* 74 */ super.saveState(s); +/* 75 */ s.saveInt(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 80 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 82 */ super.restoreState(r); +/* 83 */ this._value = r.restoreInt(); +/* 84 */ break; +/* */ case 1: +/* 86 */ setPropertyActionRestoreState(r); +/* 87 */ this._value = r.restoreInt(); +/* 88 */ break; +/* */ +/* */ default: +/* 91 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetIntegerAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetPoint2Action.java b/NET/worlds/scape/SetPoint2Action.java new file mode 100644 index 0000000..b3a19f5 --- /dev/null +++ b/NET/worlds/scape/SetPoint2Action.java @@ -0,0 +1,134 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetPoint2Action +/* */ extends SlidePropertyAction +/* */ { +/* 18 */ private Point2 _value = null; +/* */ +/* */ private Point2 _start; +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 25 */ Persister ret = null; +/* 26 */ Point2 val = null; +/* 27 */ if (useParam()) { +/* 28 */ String p = param(); +/* 29 */ if (p == null) { +/* 30 */ this._value = null; +/* */ } else { +/* 32 */ float x = 0.0F;float y = 0.0F; +/* 33 */ boolean ok = true; +/* 34 */ int comma = p.indexOf(','); +/* 35 */ if (comma == -1) { +/* 36 */ ok = false; +/* */ } else { +/* */ try { +/* 39 */ x = Float.valueOf(p.substring(0, comma)).floatValue(); +/* 40 */ p = p.substring(comma + 1); +/* 41 */ y = Float.valueOf(p).floatValue(); +/* */ } +/* */ catch (NumberFormatException nfe) { +/* 44 */ ok = false; +/* */ } +/* */ } +/* 47 */ if (!ok) { +/* 48 */ x = 0.0F; +/* 49 */ y = 0.0F; +/* 50 */ System.out.println(getName() + " unable to parse " + +/* 51 */ paramName()); +/* */ } +/* 53 */ this._value = new Point2(x, y); +/* */ } +/* */ } +/* 56 */ if (this._value == null) { +/* 57 */ if ((!$assertionsDisabled) && (slide())) throw new AssertionError(); +/* */ } +/* */ else { +/* 60 */ if (slide()) { +/* 61 */ if (seqID == null) { +/* 62 */ start(); +/* 63 */ this._start = ((Point2)get()); +/* */ } +/* 65 */ float frac = fraction(); +/* 66 */ if ((frac < 1.0D) && (this._start != null)) { +/* 67 */ val = new Point2(this._value); +/* 68 */ val.x = ((this._value.x - this._start.x) * frac + this._start.x); +/* 69 */ val.y = ((this._value.y - this._start.y) * frac + this._start.y); +/* 70 */ ret = this; +/* */ } +/* */ } +/* 73 */ if (val == null) +/* 74 */ val = this._value; +/* */ } +/* 76 */ set(val); +/* 77 */ return ret; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 83 */ Object ret = null; +/* 84 */ switch (index - offset) { +/* */ case 0: +/* 86 */ if (mode == 0) { +/* 87 */ ret = Point2PropertyEditor.make(new Property(this, index, +/* 88 */ "Set To").allowSetNull()); +/* 89 */ if (this._value == null) { +/* 90 */ ret = MaybeNullPropertyEditor.make((Property)ret, +/* 91 */ new Point2()); +/* */ } +/* */ } +/* 94 */ else if (mode == 1) { +/* 95 */ ret = this._value; +/* 96 */ } else if (mode == 2) { +/* 97 */ this._value = ((Point2)value); +/* 98 */ } else if (mode == 4) { +/* 99 */ this._value = null; } +/* 100 */ break; +/* */ default: +/* 102 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 104 */ return ret; +/* */ } +/* */ +/* 107 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 111 */ s.saveVersion(1, classCookie); +/* 112 */ super.saveState(s); +/* 113 */ s.saveMaybeNull(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 118 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 120 */ super.restoreState(r); +/* 121 */ this._value = ((Point2)r.restoreMaybeNull()); +/* 122 */ break; +/* */ +/* */ default: +/* 125 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetPoint2Action.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetPoint3Action.java b/NET/worlds/scape/SetPoint3Action.java new file mode 100644 index 0000000..98830dc --- /dev/null +++ b/NET/worlds/scape/SetPoint3Action.java @@ -0,0 +1,143 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetPoint3Action +/* */ extends SlidePropertyAction +/* */ { +/* 17 */ private Point3 _value = null; +/* */ +/* */ private Point3 _start; +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 24 */ Persister ret = null; +/* 25 */ Point3 val = null; +/* 26 */ if (useParam()) { +/* 27 */ String p = param(); +/* 28 */ if (p == null) { +/* 29 */ this._value = null; +/* */ } else { +/* 31 */ float x = 0.0F;float y = 0.0F;float z = 0.0F; +/* 32 */ boolean ok = true; +/* 33 */ int comma = p.indexOf(','); +/* 34 */ if (comma == -1) { +/* 35 */ ok = false; +/* */ } else { +/* */ try { +/* 38 */ x = Float.valueOf(p.substring(0, comma)).floatValue(); +/* 39 */ p = p.substring(comma + 1); +/* 40 */ comma = p.indexOf(','); +/* 41 */ if (comma == -1) { +/* 42 */ ok = false; +/* */ } else { +/* 44 */ y = +/* 45 */ Float.valueOf(p.substring(0, comma)).floatValue(); +/* 46 */ p = p.substring(comma + 1); +/* 47 */ z = Float.valueOf(p).floatValue(); +/* */ } +/* */ } +/* */ catch (NumberFormatException nfe) { +/* 51 */ ok = false; +/* */ } +/* */ } +/* 54 */ if (!ok) { +/* 55 */ System.out.println(getName() + " unable to parse " + +/* 56 */ paramName()); +/* 57 */ x = 0.0F; +/* 58 */ y = 0.0F; +/* 59 */ z = 0.0F; +/* */ } +/* 61 */ this._value = new Point3(x, y, z); +/* */ } +/* */ } +/* 64 */ if (this._value == null) { +/* 65 */ if ((!$assertionsDisabled) && (slide())) throw new AssertionError(); +/* */ } +/* */ else { +/* 68 */ if (slide()) { +/* 69 */ if (seqID == null) { +/* 70 */ start(); +/* 71 */ this._start = ((Point3)get()); +/* */ } +/* 73 */ float frac = fraction(); +/* 74 */ if (frac < 1.0D) { +/* 75 */ val = new Point3(this._value); +/* 76 */ val.x = ((this._value.x - this._start.x) * frac + this._start.x); +/* 77 */ val.y = ((this._value.y - this._start.y) * frac + this._start.y); +/* 78 */ val.z = ((this._value.z - this._start.z) * frac + this._start.z); +/* 79 */ ret = this; +/* */ } +/* */ } +/* 82 */ if (val == null) +/* 83 */ val = this._value; +/* */ } +/* 85 */ set(val); +/* 86 */ return ret; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 92 */ Object ret = null; +/* 93 */ switch (index - offset) { +/* */ case 0: +/* 95 */ if (mode == 0) { +/* 96 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 97 */ "Set To").allowSetNull()); +/* 98 */ if (this._value == null) { +/* 99 */ ret = MaybeNullPropertyEditor.make((Property)ret, +/* 100 */ new Point3()); +/* */ } +/* */ } +/* 103 */ else if (mode == 1) { +/* 104 */ ret = this._value; +/* 105 */ } else if (mode == 2) { +/* 106 */ this._value = ((Point3)value); +/* 107 */ } else if (mode == 4) { +/* 108 */ this._value = null; } +/* 109 */ break; +/* */ default: +/* 111 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 113 */ return ret; +/* */ } +/* */ +/* 116 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 120 */ s.saveVersion(1, classCookie); +/* 121 */ super.saveState(s); +/* 122 */ s.saveMaybeNull(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 127 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 129 */ super.restoreState(r); +/* 130 */ this._value = ((Point3)r.restoreMaybeNull()); +/* 131 */ break; +/* */ +/* */ default: +/* 134 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetPoint3Action.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetPropertyAction.java b/NET/worlds/scape/SetPropertyAction.java new file mode 100644 index 0000000..1160ca1 --- /dev/null +++ b/NET/worlds/scape/SetPropertyAction.java @@ -0,0 +1,385 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Gamma; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class SetPropertyAction +/* */ extends Action +/* */ { +/* */ SuperRoot _target; +/* */ String _targetName; +/* */ String _roomName; +/* */ String _propName; +/* 36 */ private int _propIndex = -1; +/* */ +/* */ +/* */ +/* */ +/* 41 */ private String _paramName = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public SuperRoot getTarget() +/* */ { +/* 60 */ if ((this._target == null) && (this._targetName != null)) { +/* 61 */ Room r = null; +/* 62 */ if (this._roomName != null) { +/* 63 */ World w = getWorld(); +/* 64 */ if (w != null) +/* 65 */ r = w.getRoom(this._roomName); +/* */ } else { +/* 67 */ r = getRoom(); } +/* 68 */ if (r != null) { +/* 69 */ Enumeration list = r.getDeepOwned(); +/* 70 */ this._target = SuperRoot.nameSearch(list, this._targetName); +/* */ } +/* */ } +/* */ +/* 74 */ if (this._target != null) +/* 75 */ return this._target; +/* 76 */ return getOwner(); +/* */ } +/* */ +/* */ +/* 80 */ protected boolean useParam() { return this._paramName != null; } +/* */ +/* 82 */ protected String paramName() { return this._paramName; } +/* */ +/* */ protected String param() +/* */ { +/* 86 */ return this._paramName == null ? +/* 87 */ null : +/* 88 */ Gamma.getParam(this._paramName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static int index(int index, String name, Object target) +/* */ { +/* 97 */ if ((index == -1) && (name != null)) { +/* 98 */ Enumeration pe = new EnumProperties(target); +/* 99 */ while (pe.hasMoreElements()) { +/* 100 */ Property prop = (Property)pe.nextElement(); +/* 101 */ if (prop.getName().equals(name)) { +/* 102 */ index = prop.getIndex(); +/* 103 */ break; +/* */ } +/* */ } +/* */ } +/* 107 */ return index; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Object propHelper(int mode, Object value, String name, SuperRoot target) +/* */ { +/* 116 */ Object ret = null; +/* 117 */ int i = index(-1, name, target); +/* 118 */ if (i != -1) { +/* */ try { +/* 120 */ ret = target.properties(i, 0, mode, value); +/* */ } catch (NoSuchPropertyException localNoSuchPropertyException) {} +/* */ } +/* 123 */ return ret; +/* */ } +/* */ +/* */ +/* */ private Object propHelper(int mode, Object value) +/* */ { +/* 129 */ SuperRoot target = getTarget(); +/* */ +/* 131 */ Object ret = null; +/* 132 */ if ((this._propIndex = index(this._propIndex, this._propName, target)) != -1) { +/* */ try { +/* 134 */ ret = target.properties(this._propIndex, 0, mode, value); +/* */ } catch (NoSuchPropertyException nspe) { +/* 136 */ if ($assertionsDisabled) break label220; } throw new AssertionError(); +/* */ } +/* 138 */ else if (target == null) { +/* 139 */ Console.println( +/* 140 */ getName() + Console.message("null-target")); +/* */ } +/* 142 */ else if (this._propName == null) { +/* 143 */ Object[] arguments = { new String(getName()), +/* 144 */ new String(getTarget().getName()) }; +/* 145 */ Console.println(MessageFormat.format( +/* 146 */ Console.message("null-property"), arguments)); +/* */ } +/* */ else { +/* 149 */ Object[] arguments = { new String(getName()), +/* 150 */ new String(this._propName), new String(getTarget().getName()) }; +/* 151 */ Console.println(MessageFormat.format( +/* 152 */ Console.message("non-property"), arguments)); } +/* */ label220: +/* 154 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final void set(Object value) +/* */ { +/* 163 */ propHelper(2, value); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final Object get() +/* */ { +/* 173 */ return propHelper(1, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final void add(Object value) +/* */ { +/* 182 */ propHelper(3, value); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final void remove(Object value) +/* */ { +/* 192 */ propHelper(4, value); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final Property enumerate() +/* */ { +/* 202 */ return (Property)propHelper(0, null); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 210 */ Object ret = null; +/* 211 */ switch (index - offset) { +/* */ case 0: +/* 213 */ if (mode == 0) { +/* 214 */ Property p = new Property(this, index, "Target"); +/* 215 */ p.allowSetNull(); +/* 216 */ ret = ObjPropertyEditor.make(p, getRoom(), +/* 217 */ "NET.worlds.scape.SuperRoot"); +/* 218 */ } else if (mode == 1) { +/* 219 */ ret = getTarget(); +/* 220 */ } else if (mode == 2) { +/* 221 */ this._target = ((SuperRoot)value); +/* 222 */ this._propIndex = -1; +/* */ } +/* 224 */ break; +/* */ case 1: +/* 226 */ if (mode == 0) { +/* 227 */ ret = StringPropertyEditor.make( +/* 228 */ new Property(this, index, "Target Room")); +/* 229 */ } else if (mode == 1) { +/* 230 */ ret = this._roomName; +/* */ } +/* 232 */ else if (mode == 4) { +/* 233 */ this._roomName = null; +/* 234 */ } else if (mode == 2) { +/* 235 */ this._roomName = ((String)value); +/* 236 */ this._target = null; +/* */ } +/* 238 */ break; +/* */ case 2: +/* 240 */ if (mode == 0) { +/* 241 */ Property p = new Property(this, index, "Target Name"); +/* 242 */ p.allowSetNull(); +/* 243 */ ret = StringPropertyEditor.make(p); +/* 244 */ } else if (mode == 1) { +/* 245 */ ret = this._targetName; +/* */ } +/* 247 */ else if (mode == 4) { +/* 248 */ this._targetName = null; +/* 249 */ } else if (mode == 2) { +/* 250 */ this._targetName = ((String)value); +/* 251 */ this._target = null; +/* */ } +/* 253 */ break; +/* */ case 3: +/* 255 */ if (mode == 0) +/* */ { +/* */ +/* 258 */ ret = new Property(this, index, "Property Name"); +/* 259 */ if (getTarget() != null) { +/* 260 */ ret = PropPropEditor.make((Property)ret, getTarget(), true); +/* */ } +/* 262 */ } else if (mode == 1) { +/* 263 */ SuperRoot t = getTarget(); +/* 264 */ if (((this._propIndex = index(this._propIndex, this._propName, t)) == -1) || +/* 265 */ (t == null)) { +/* 266 */ ret = null; +/* */ } else { +/* 268 */ ret = enumerate(); +/* */ } +/* 270 */ } else if (mode == 2) { +/* 271 */ if (value == null) { +/* 272 */ this._propIndex = -1; +/* 273 */ this._propName = null; +/* 274 */ } else if ((value instanceof String)) { +/* 275 */ this._propIndex = -1; +/* 276 */ this._propName = ((String)value); +/* */ } else { +/* 278 */ this._propIndex = ((Property)value).getIndex(); +/* 279 */ this._propName = ((Property)value).getName(); +/* */ } +/* */ } +/* 282 */ break; +/* */ case 4: +/* 284 */ if (mode == 0) { +/* 285 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 286 */ "Use parameter"), +/* 287 */ "Use 'Set To' value", +/* 288 */ "Use parameter"); +/* */ } +/* 290 */ else if (mode == 1) { +/* 291 */ ret = new Boolean(this._paramName != null); +/* */ } +/* 293 */ else if (mode == 2) { +/* 294 */ if (((Boolean)value).booleanValue()) { +/* 295 */ if (this._paramName == null) { +/* 296 */ this._paramName = ""; +/* */ } +/* */ } else { +/* 299 */ this._paramName = null; +/* */ } +/* */ } +/* 302 */ break; +/* */ case 5: +/* 304 */ if (mode == 0) { +/* 305 */ ret = new Property(this, index, "Parameter Name"); +/* 306 */ if (this._paramName != null) { +/* 307 */ ret = StringPropertyEditor.make((Property)ret); +/* */ } +/* 309 */ } else if (mode == 1) { +/* 310 */ ret = this._paramName == null ? "" : this._paramName; +/* */ } +/* 312 */ else if (mode == 2) { +/* 313 */ this._paramName = ((String)value); +/* */ } +/* 315 */ break; +/* */ default: +/* 317 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 319 */ return ret; +/* */ } +/* */ +/* 322 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 326 */ s.saveVersion(4, classCookie); +/* 327 */ super.saveState(s); +/* 328 */ s.saveMaybeNull(getTarget()); +/* 329 */ s.saveString(this._roomName); +/* 330 */ s.saveString(this._targetName); +/* 331 */ s.saveString(this._propName); +/* 332 */ s.saveString(this._paramName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void setPropertyActionRestoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 342 */ switch (r.restoreVersion(classCookie)) { +/* */ case 4: +/* 344 */ super.restoreState(r); +/* 345 */ this._target = ((SuperRoot)r.restoreMaybeNull()); +/* 346 */ this._roomName = r.restoreString(); +/* 347 */ this._targetName = r.restoreString(); +/* 348 */ this._propName = r.restoreString(); +/* 349 */ this._paramName = r.restoreString(); +/* 350 */ break; +/* */ +/* */ case 3: +/* 353 */ super.restoreState(r); +/* 354 */ this._target = ((SuperRoot)r.restoreMaybeNull()); +/* 355 */ this._propName = r.restoreString(); +/* 356 */ this._paramName = r.restoreString(); +/* 357 */ break; +/* */ +/* */ case 2: +/* 360 */ super.restoreState(r); +/* 361 */ this._target = ((SuperRoot)r.restoreMaybeNull()); +/* 362 */ this._propName = r.restoreString(); +/* 363 */ break; +/* */ +/* */ case 1: +/* 366 */ super.restoreState(r); +/* 367 */ this._target = ((SuperRoot)r.restore()); +/* 368 */ this._propName = r.restoreString(); +/* 369 */ break; +/* */ default: +/* 371 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 377 */ setPropertyActionRestoreState(r); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetPropertyAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetStringAction.java b/NET/worlds/scape/SetStringAction.java new file mode 100644 index 0000000..3a6d416 --- /dev/null +++ b/NET/worlds/scape/SetStringAction.java @@ -0,0 +1,74 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetStringAction +/* */ extends SetPropertyAction +/* */ { +/* */ private String _value; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 21 */ if (useParam()) +/* 22 */ this._value = param(); +/* 23 */ set(this._value); +/* 24 */ return null; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 30 */ Object ret = null; +/* 31 */ switch (index - offset) { +/* */ case 0: +/* 33 */ if (mode == 0) { +/* 34 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 35 */ "Set To")); +/* 36 */ } else if (mode == 1) { +/* 37 */ ret = this._value; +/* 38 */ } else if (mode == 2) +/* 39 */ this._value = ((String)value); +/* 40 */ break; +/* */ default: +/* 42 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 44 */ return ret; +/* */ } +/* */ +/* 47 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 51 */ s.saveVersion(1, classCookie); +/* 52 */ super.saveState(s); +/* 53 */ s.saveString(this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 58 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 60 */ super.restoreState(r); +/* 61 */ this._value = r.restoreString(); +/* 62 */ break; +/* */ +/* */ default: +/* 65 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetStringAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetURLAction.java b/NET/worlds/scape/SetURLAction.java new file mode 100644 index 0000000..8a84be8 --- /dev/null +++ b/NET/worlds/scape/SetURLAction.java @@ -0,0 +1,91 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Cursor; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.net.MalformedURLException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetURLAction +/* */ extends SetPropertyAction +/* */ { +/* */ URL _value; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 24 */ if (useParam()) { +/* */ try { +/* 26 */ this._value = new URL(param()); +/* */ } +/* */ catch (MalformedURLException mue) { +/* 29 */ System.out.println(getName() + " unable to parse " + +/* 30 */ paramName()); +/* */ } +/* */ } +/* 33 */ set(this._value); +/* 34 */ return null; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 40 */ Object ret = null; +/* 41 */ switch (index - offset) { +/* */ case 0: +/* 43 */ if (mode == 0) { +/* 44 */ ret = URLPropertyEditor.make(new Property(this, index, +/* 45 */ "Set To") +/* 46 */ .allowSetNull(), +/* 47 */ "ani;console;cur;drone;mid;mov;pilot;ra;ram;rwg;rwx;wav;wob;world;" + +/* 48 */ TextureDecoder.getAllExts(), +/* 49 */ Cursor.getSysCursorURLs()); +/* */ } +/* 51 */ else if (mode == 1) { +/* 52 */ ret = this._value; +/* */ } +/* 54 */ else if (mode == 2) { +/* 55 */ this._value = ((URL)value); +/* */ } +/* 57 */ break; +/* */ default: +/* 59 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 61 */ return ret; +/* */ } +/* */ +/* 64 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 68 */ s.saveVersion(1, classCookie); +/* 69 */ super.saveState(s); +/* 70 */ URL.save(s, this._value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 75 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 77 */ super.restoreState(r); +/* 78 */ this._value = URL.restore(r); +/* 79 */ break; +/* */ +/* */ default: +/* 82 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetURLAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetVisibleBumpableAction.java b/NET/worlds/scape/SetVisibleBumpableAction.java new file mode 100644 index 0000000..7f0c273 --- /dev/null +++ b/NET/worlds/scape/SetVisibleBumpableAction.java @@ -0,0 +1,109 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetVisibleBumpableAction +/* */ extends Action +/* */ { +/* 19 */ public boolean targetBumpable = true; +/* 20 */ public boolean targetVisible = true; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 29 */ Object owner = getOwner(); +/* 30 */ if ((owner == null) || (!(owner instanceof WObject))) { +/* 31 */ return null; +/* */ } +/* 33 */ WObject o = (WObject)owner; +/* */ +/* 35 */ o.setBumpable(this.targetBumpable); +/* 36 */ o.setVisible(this.targetVisible); +/* */ +/* 38 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 48 */ Object ret = null; +/* 49 */ switch (index - offset) { +/* */ case 0: +/* 51 */ if (mode == 0) { +/* 52 */ ret = BooleanPropertyEditor.make( +/* 53 */ new Property(this, index, "Target Bumpable"), +/* 54 */ "No", "Yes"); +/* 55 */ } else if (mode == 1) { +/* 56 */ ret = new Boolean(this.targetBumpable); +/* 57 */ } else if (mode == 2) +/* 58 */ this.targetBumpable = ((Boolean)value).booleanValue(); +/* 59 */ break; +/* */ case 1: +/* 61 */ if (mode == 0) { +/* 62 */ ret = BooleanPropertyEditor.make( +/* 63 */ new Property(this, index, "Target Visible"), +/* 64 */ "No", "Yes"); +/* 65 */ } else if (mode == 1) { +/* 66 */ ret = new Boolean(this.targetVisible); +/* 67 */ } else if (mode == 2) +/* 68 */ this.targetVisible = ((Boolean)value).booleanValue(); +/* 69 */ break; +/* */ default: +/* 71 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 73 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 79 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 83 */ s.saveVersion(1, classCookie); +/* 84 */ super.saveState(s); +/* */ +/* 86 */ s.saveBoolean(this.targetBumpable); +/* 87 */ s.saveBoolean(this.targetVisible); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 92 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 94 */ super.restoreState(r); +/* */ case 0: +/* 96 */ this.targetBumpable = r.restoreBoolean(); +/* 97 */ this.targetVisible = r.restoreBoolean(); +/* 98 */ break; +/* */ default: +/* 100 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetVisibleBumpableAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SetZoomMode.java b/NET/worlds/scape/SetZoomMode.java new file mode 100644 index 0000000..f5b6e0e --- /dev/null +++ b/NET/worlds/scape/SetZoomMode.java @@ -0,0 +1,94 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Window; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SetZoomMode +/* */ extends Action +/* */ implements MomentumBehavior +/* */ { +/* */ private boolean zoomMode; +/* */ +/* */ public SetZoomMode(boolean on) +/* */ { +/* 28 */ this.zoomMode = on; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public SetZoomMode() {} +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 41 */ SuperRoot owner = getOwner(); +/* 42 */ if ((owner == null) || +/* 43 */ (!(owner instanceof Pilot)) || (!((Pilot)owner).isActive())) { +/* 44 */ return null; +/* */ } +/* 46 */ Window w = Window.getMainWindow(); +/* 47 */ if (w == null) { +/* 48 */ return null; +/* */ } +/* 50 */ w.setDeltaMode(this.zoomMode); +/* 51 */ return null; +/* */ } +/* */ +/* 54 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 58 */ s.saveVersion(0, classCookie); +/* 59 */ super.saveState(s); +/* */ } +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 66 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 68 */ super.restoreState(r); +/* */ +/* */ +/* 71 */ break; +/* */ default: +/* 73 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ public void transferFrom(Enumeration oldMBs) +/* */ { +/* 80 */ while (oldMBs.hasMoreElements()) { +/* 81 */ SuperRoot sr = (SuperRoot)oldMBs.nextElement(); +/* 82 */ if ((sr instanceof SetZoomMode)) { +/* 83 */ this.zoomMode = ((SetZoomMode)sr).zoomMode; +/* 84 */ break; +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SetZoomMode.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Shadow.java b/NET/worlds/scape/Shadow.java new file mode 100644 index 0000000..fea9c1c --- /dev/null +++ b/NET/worlds/scape/Shadow.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface Shadow +{ + public abstract void adjustShadow(WObject paramWObject); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Shadow.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ShallowEnumeration.java b/NET/worlds/scape/ShallowEnumeration.java new file mode 100644 index 0000000..7a667e8 --- /dev/null +++ b/NET/worlds/scape/ShallowEnumeration.java @@ -0,0 +1,72 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ShallowEnumeration +/* */ extends DeepEnumeration +/* */ { +/* */ public ShallowEnumeration(SuperRoot o) +/* */ { +/* 20 */ this.roots.addElement(o); +/* 21 */ o.getChildren(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void getNextElement() +/* */ { +/* 44 */ this.valueRetrieved = false; +/* 45 */ if (!this.roots.isEmpty()) { +/* 46 */ this.nextValue = ((SuperRoot)this.roots.elementAt(this.roots.size() - 1)); +/* 47 */ assert (this.nextValue != null); +/* 48 */ this.roots.removeElementAt(this.roots.size() - 1); +/* 49 */ } else if (this.currentIndex >= 0) { +/* */ try { +/* 51 */ this.nextValue = ((SuperRoot)this.currentVector.elementAt(this.currentIndex--)); +/* */ } catch (ArrayIndexOutOfBoundsException e) { +/* 53 */ this.currentIndex = (this.currentVector.size() - 1); +/* 54 */ getNextElement(); +/* */ } +/* 56 */ if ((!$assertionsDisabled) && (this.nextValue == null)) throw new AssertionError(); +/* 57 */ } else if (!this.vectors.isEmpty()) { +/* 58 */ this.currentVector = ((Vector)this.vectors.elementAt(this.vectors.size() - 1)); +/* 59 */ this.currentIndex = (this.currentVector.size() - 1); +/* 60 */ this.vectors.removeElementAt(this.vectors.size() - 1); +/* 61 */ getNextElement(); +/* */ } else { +/* 63 */ this.nextValue = null; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ShallowEnumeration.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file 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 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 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 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 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 detachList = new Vector(); +/* 692 */ for (Enumeration 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 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 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 diff --git a/NET/worlds/scape/ShapeLoader.java b/NET/worlds/scape/ShapeLoader.java new file mode 100644 index 0000000..6d7d13c --- /dev/null +++ b/NET/worlds/scape/ShapeLoader.java @@ -0,0 +1,182 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ShapeLoader +/* */ implements BGLoaded +/* */ { +/* */ Shape shape; +/* */ int binaryParam; +/* */ private int numTexturesLoading; +/* */ private Vector textures; +/* */ private boolean wasError; +/* */ +/* */ public ShapeLoader(Shape s) +/* */ { +/* 30 */ this.shape = s; +/* */ } +/* */ +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 36 */ return this.shape.getRoom(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteName) +/* */ { +/* 50 */ if (localName == null) { +/* 51 */ return null; +/* */ } +/* */ +/* 54 */ if ((remoteName.endsWith(".rwg")) || (remoteName.endsWith(".RWG"))) { +/* 55 */ this.binaryParam = loadBinaryFile(localName, remoteName); +/* 56 */ return new Object(); } +/* 57 */ if ((remoteName.endsWith(".rwx")) || (remoteName.endsWith(".RWX"))) +/* */ { +/* 59 */ loadTextFile(localName, remoteName); +/* 60 */ return localName; } +/* 61 */ if ((remoteName.endsWith(".bod")) || (remoteName.endsWith(".BOD"))) +/* */ { +/* 63 */ return localName; +/* */ } +/* 65 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncBackgroundLoad(Object o, URL remoteURL) +/* */ { +/* 79 */ if (o == null) { +/* 80 */ return false; +/* */ } +/* */ +/* 83 */ if (this.numTexturesLoading > 0) { +/* 84 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 89 */ if (!remoteURL.equals(this.shape.realFile)) { +/* 90 */ this.wasError = true; +/* 91 */ } else if ((!this.shape.hasClump()) && (this.shape.isDefault)) +/* */ { +/* 93 */ this.wasError = true; +/* */ +/* */ +/* 96 */ if (!this.shape.isLoaded()) { +/* 97 */ this.shape.setState(0, null); +/* */ } +/* */ } +/* */ int newModel; +/* */ int newModel; +/* 102 */ if ((o instanceof String)) { int newModel; +/* 103 */ if (!this.wasError) { int newModel; +/* 104 */ if (remoteURL.endsWith(".bod")) { +/* 105 */ newModel = loadBodFile((String)o, this.shape.getBodPartNum()); +/* */ } else +/* 107 */ newModel = finishLoadingTextFile((String)o); +/* */ } else { +/* 109 */ newModel = 0; +/* */ } +/* 111 */ } else { newModel = finishLoadingBinaryFile(this.binaryParam, this.wasError); +/* */ } +/* */ +/* 114 */ if (newModel != 0) { +/* 115 */ this.shape.setState(newModel, this.textures); +/* */ } +/* 117 */ if ((newModel == 0) || (newModel == -1)) +/* */ { +/* 119 */ if (this.textures != null) +/* */ { +/* 121 */ for (Enumeration en = this.textures.elements(); en.hasMoreElements();) { +/* 122 */ ((Texture)en.nextElement()).decRef(); +/* */ } +/* */ } +/* */ } +/* 126 */ this.textures = null; +/* */ +/* 128 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void startTextureLoad(String relName, URL remoteName) +/* */ { +/* 139 */ this.numTexturesLoading += 1; +/* */ +/* */ +/* 142 */ BackgroundLoader.get(new ShapeTextureLoader(this), +/* 143 */ URL.make(remoteName, relName), +/* 144 */ true); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ synchronized void textureLoadEnd(Texture tex) +/* */ { +/* 157 */ this.numTexturesLoading -= 1; +/* 158 */ if (tex != null) { +/* 159 */ if (this.textures == null) +/* 160 */ this.textures = new Vector(); +/* 161 */ this.textures.addElement(tex); +/* */ } else { +/* 163 */ this.wasError = true; +/* */ } +/* */ } +/* */ +/* */ private native void loadTextFile(String paramString, URL paramURL); +/* */ +/* */ private native int finishLoadingTextFile(String paramString); +/* */ +/* */ private native int loadBodFile(String paramString, int paramInt); +/* */ +/* */ private native int loadBinaryFile(String paramString, URL paramURL); +/* */ +/* */ private native int finishLoadingBinaryFile(int paramInt, boolean paramBoolean); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ShapeLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ShapeLoaderListener.java b/NET/worlds/scape/ShapeLoaderListener.java new file mode 100644 index 0000000..a939baa --- /dev/null +++ b/NET/worlds/scape/ShapeLoaderListener.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface ShapeLoaderListener +{ + public abstract void notifyShapeLoaded(Shape paramShape); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ShapeLoaderListener.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ShapeTextureLoader.java b/NET/worlds/scape/ShapeTextureLoader.java new file mode 100644 index 0000000..9c2ccc8 --- /dev/null +++ b/NET/worlds/scape/ShapeTextureLoader.java @@ -0,0 +1,233 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ShapeTextureLoader +/* */ implements BGLoaded +/* */ { +/* */ ShapeLoader shapeLoader; +/* */ +/* 208 */ public ShapeTextureLoader(ShapeLoader s) { this.shapeLoader = s; } +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteName) { +/* 211 */ this.shapeLoader.textureLoadEnd(TextureDecoder.decode(remoteName, +/* 212 */ remoteName.getBaseWithoutExt(), localName)); +/* 213 */ return null; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) { +/* 217 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 225 */ return this.shapeLoader.getBackgroundLoadRoom(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ShapeTextureLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Sharer.java b/NET/worlds/scape/Sharer.java new file mode 100644 index 0000000..5ed5126 --- /dev/null +++ b/NET/worlds/scape/Sharer.java @@ -0,0 +1,1089 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.InfiniteWaitException; +/* */ import NET.worlds.network.NetworkRoom; +/* */ import NET.worlds.network.ObjID; +/* */ import NET.worlds.network.PacketTooLargeException; +/* */ import NET.worlds.network.PropertyList; +/* */ import NET.worlds.network.PropertySetCmd; +/* */ import NET.worlds.network.WorldServer; +/* */ import NET.worlds.network.net2Property; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Sharer +/* */ extends SuperRoot +/* */ implements MainCallback +/* */ { +/* */ private Vector attributes; +/* 143 */ private ByteArrayOutputStream bs = new ByteArrayOutputStream(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Sharer() +/* */ { +/* 151 */ this.attributes = new Vector(256); +/* 152 */ this.attributes.setSize(256); +/* */ } +/* */ +/* 155 */ private boolean shared = false; +/* */ public static final int FIRST_TIME = 0; +/* */ +/* 158 */ public boolean isShared() { return this.shared; } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int STATIC = 2; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int FORWARDED_STATIC = 3; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int getMaybeDefaultMode() +/* */ { +/* 186 */ return ((WObject)getOwner()).getSharerMode(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getMode() +/* */ { +/* 199 */ int mode = getMaybeDefaultMode(); +/* 200 */ if (mode == 0) { +/* 201 */ setMode(mode); +/* */ } +/* 203 */ return mode; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int DYNAMIC = 4; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int FORWARDED_DYNAMIC = 5; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int FORWARDED = 1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setMode(int mode) +/* */ { +/* 233 */ WObject w = (WObject)getOwner(); +/* */ +/* */ +/* */ +/* 237 */ if ((w instanceof Room)) { +/* 238 */ mode = 2; +/* 239 */ } else if (this.createdFromNet) { +/* 240 */ mode = 4; +/* 241 */ } else if ((mode == 2) || (mode == 4)) +/* */ { +/* 243 */ mode = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 249 */ if (mode == 0) { +/* 250 */ mode = 3; +/* */ } +/* 252 */ int oldMode = getMaybeDefaultMode(); +/* 253 */ if (oldMode != mode) +/* */ { +/* */ +/* 256 */ unshare(); +/* */ +/* */ +/* 259 */ w.setSharerMode(mode); +/* */ } +/* 261 */ share(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void createDynamicForwardedFromNet(DynamicForwardAttribute dfa) +/* */ { +/* 271 */ assert (!((WObject)getOwner()).isActive()); +/* 272 */ this.dfa = dfa; +/* 273 */ ((WObject)getOwner()).setSharerMode(5); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void createDynamicFromNet() +/* */ { +/* 283 */ assert ((!((WObject)getOwner()).isActive()) || (this.createdFromNet)); +/* 284 */ this.createdFromNet = true; +/* 285 */ ((WObject)getOwner()).setSharerMode(4); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void adjustShare() +/* */ { +/* 308 */ share(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void share() +/* */ { +/* 318 */ if (this.shared) { +/* 319 */ return; +/* */ } +/* 321 */ int mode = getMaybeDefaultMode(); +/* */ +/* 323 */ switch (mode) { +/* */ case 0: +/* 325 */ setMode(0); +/* 326 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ case 5: +/* 332 */ if (this.dfa == null) { +/* 333 */ flushQueue(); +/* */ +/* 335 */ WObject w = (WObject)getOwner(); +/* 336 */ WObject terminal = w.getServed(); +/* */ +/* */ +/* 339 */ if ((w.getSourceURL() != null) && (terminal != null)) { +/* 340 */ this.dfa = new DynamicForwardAttribute(-1); +/* 341 */ if (terminal.getSharer().addAttribute(this.dfa) == -1) { +/* 342 */ this.dfa = null; +/* */ } else +/* 344 */ this.dfa.connect(w); +/* */ } +/* */ } +/* 347 */ break; +/* */ +/* */ case 3: +/* 350 */ flushQueue(); +/* 351 */ for (Enumeration e = getAttributes(); e.hasMoreElements();) +/* 352 */ ((Attribute)e.nextElement()).addForwarding(); +/* 353 */ case 4: if ((goto 198) && +/* */ +/* */ +/* 356 */ (!$assertionsDisabled) && (!this.createdFromNet)) { throw new AssertionError(); +/* */ } +/* */ +/* */ break; +/* */ } +/* */ +/* */ +/* 363 */ this.shared = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void unshare() +/* */ { +/* 371 */ if (!this.shared) { +/* 372 */ return; +/* */ } +/* 374 */ int mode = getMaybeDefaultMode(); +/* */ +/* 376 */ switch (mode) { +/* */ case 5: +/* 378 */ if (this.dfa != null) +/* */ { +/* 380 */ this.dfa.unconnect(); +/* 381 */ this.dfa = null; +/* */ } +/* 383 */ break; +/* */ +/* */ case 3: +/* 386 */ Enumeration e = getAttributes(); +/* 387 */ for (;;) { ((Attribute)e.nextElement()).unforward(); +/* 386 */ if (!e.hasMoreElements()) { +/* */ break; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 395 */ this.shared = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int addAttribute(Attribute a) +/* */ { +/* 418 */ setMode(getMaybeDefaultMode()); +/* */ +/* 420 */ a._attrID = getFreeAttrIDFor(a, a._attrID); +/* 421 */ if (a._attrID == -1) { +/* 422 */ return a._attrID; +/* */ } +/* */ +/* */ try +/* */ { +/* 427 */ add(a); +/* */ } catch (ClassCastException e) { +/* 429 */ Console.println(Console.message("Cant-attach") + e); +/* */ +/* 431 */ a._attrID = -1; +/* 432 */ return a._attrID; +/* */ } +/* */ +/* 435 */ this.attributes.setElementAt(a, a._attrID); +/* */ +/* 437 */ if (getMaybeDefaultMode() == 3) { +/* 438 */ a.addForwarding(); +/* */ } +/* 440 */ return a._attrID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean attrIDAvailable(int id) +/* */ { +/* 449 */ return this.attributes.elementAt(id) == null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private int getFreeAttrID(int id, int low, int high) +/* */ { +/* 458 */ if ((id >= 20) && (id <= 255) && (attrIDAvailable(id))) { +/* 459 */ return id; +/* */ } +/* */ +/* */ +/* */ +/* 464 */ int freeCount = countFree(low, high); +/* */ +/* 466 */ if (freeCount == 0) { +/* 467 */ return -1; +/* */ } +/* */ int i; +/* */ do { +/* 471 */ int pos = (int)(Math.random() * freeCount); +/* 472 */ for (i = low;; i++) +/* 473 */ if (this.attributes.elementAt(i) == null) { +/* 474 */ pos--; if (pos < 0) +/* */ break; +/* */ } +/* 477 */ assert (i <= high); +/* 478 */ } while ((i == 150) || (i == 155) || (i == 160)); +/* */ +/* 480 */ return i; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getFreeAttrIDFor(Attribute a, int id) +/* */ { +/* 492 */ if ((a instanceof DynamicForwardAttribute)) { +/* 493 */ return getFreeAttrID(id, 210, 249); +/* */ } +/* 495 */ return getFreeAttrID(id, 100, 249); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void removeAttribute(Attribute a) +/* */ { +/* 503 */ a.detach(); +/* */ +/* */ +/* 506 */ if (a.getOwner() == null) { +/* 507 */ this.attributes.setElementAt(null, a._attrID); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int resetAttributeID(Attribute a, int newID) +/* */ { +/* 519 */ newID = getFreeAttrIDFor(a, newID); +/* 520 */ if (newID == -1) { +/* 521 */ return newID; +/* */ } +/* 523 */ if (this.attributes.elementAt(newID) == null) { +/* 524 */ int oldID = a._attrID; +/* 525 */ this.attributes.setElementAt(a, newID); +/* 526 */ this.attributes.setElementAt(null, oldID); +/* 527 */ a._attrID = newID; +/* */ } +/* */ +/* 530 */ return newID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void moveToSlot(WObject child, int newID) +/* */ { +/* 538 */ if (!child.isDynamic()) +/* 539 */ return; +/* 540 */ Sharer s = child.getSharer(); +/* 541 */ if (s.dfa == null) +/* 542 */ return; +/* 543 */ resetAttributeID(s.dfa, newID); +/* */ } +/* */ +/* */ +/* */ +/* */ public Enumeration getAttributes() +/* */ { +/* 550 */ return getAttributesList().elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Vector getAttributesList() +/* */ { +/* 559 */ Vector v = new Vector(this.attributes.size()); +/* 560 */ fillAttributesList(v); +/* 561 */ return v; +/* */ } +/* */ +/* */ +/* */ +/* */ public void fillAttributesList(Vector v) +/* */ { +/* 568 */ int end = this.attributes.size(); +/* 569 */ for (int i = 0; i < end; i++) { +/* 570 */ Attribute a = (Attribute)this.attributes.elementAt(i); +/* 571 */ if (a != null) { +/* 572 */ v.addElement(a); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public Attribute getAttribute(int id) +/* */ { +/* */ try +/* */ { +/* 582 */ return (Attribute)this.attributes.elementAt(id); +/* */ } catch (ArrayIndexOutOfBoundsException e) {} +/* 584 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isEmpty() +/* */ { +/* 592 */ return countFree(0, 255) == 256; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public int countFree(int low, int high) +/* */ { +/* 600 */ int count = 0; +/* */ +/* 602 */ for (int i = low; i <= high; i++) { +/* 603 */ if (this.attributes.elementAt(i) == null) +/* 604 */ count++; +/* */ } +/* 606 */ return count; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) +/* */ { +/* 618 */ d.addChildVectorWithNulls(this.attributes); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean createdFromNet; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Vector noteQ; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Vector prepQ; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Vector sendQ; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private DynamicForwardAttribute dfa; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ int lastSendTime; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void noteChange(Attribute a, boolean sendTriggers) +/* */ { +/* 666 */ assert (Main.isMainThread()); +/* */ +/* */ +/* 669 */ if (this.prepQ == null) { +/* 670 */ this.noteQ = new Vector(); +/* 671 */ this.prepQ = new Vector(); +/* 672 */ this.sendQ = new Vector(); +/* */ } +/* */ +/* */ +/* */ +/* 677 */ if ((sendTriggers) && +/* 678 */ (!this.noteQ.contains(a))) { +/* 679 */ if ((this.noteQ.isEmpty()) && (this.prepQ.isEmpty()) && (this.sendQ.isEmpty())) { +/* 680 */ Main.register(this); +/* */ } +/* 682 */ this.noteQ.addElement(a); +/* */ } +/* */ +/* */ +/* */ Attribute fa; +/* */ +/* 688 */ if ((getMode() == 3) && +/* 689 */ ((fa = a.getForwardAttribute()) != null)) { +/* 690 */ fa.noteChange(); +/* 691 */ } else if (this.dfa != null) { +/* 692 */ this.dfa.noteChange(); +/* */ +/* */ } +/* 695 */ else if (!this.prepQ.contains(a)) { +/* 696 */ if ((this.noteQ.isEmpty()) && (this.prepQ.isEmpty()) && (this.sendQ.isEmpty())) { +/* 697 */ Main.register(this); +/* */ } +/* 699 */ this.prepQ.addElement(a); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void prepQueue() +/* */ { +/* 713 */ if (!this.noteQ.isEmpty()) { +/* 714 */ int end = this.noteQ.size(); +/* */ +/* 716 */ for (int i = 0; i < end; i++) { +/* 717 */ Attribute a = (Attribute)this.noteQ.elementAt(i); +/* */ +/* */ +/* */ +/* 721 */ ValueEvent e = new ValueEvent( +/* 722 */ Std.getFastTime(), getOwner(), +/* 723 */ (WObject)getOwner(), a); +/* 724 */ a.trigger(e); +/* */ } +/* 726 */ this.noteQ.removeAllElements(); +/* */ } +/* */ +/* 729 */ int end = this.prepQ.size(); +/* 730 */ for (int i = 0; i < end; i++) { +/* 731 */ Attribute a = (Attribute)this.prepQ.elementAt(i); +/* */ +/* */ +/* 734 */ this.bs.reset(); +/* */ try { +/* 736 */ a.generateNetData(new DataOutputStream(this.bs)); +/* */ } catch (IOException ex) { +/* 738 */ System.err.println(ex); +/* 739 */ throw new Error("Fatal in generateNetData"); +/* */ } +/* */ +/* */ +/* 743 */ a._outgoing = this.bs.toByteArray(); +/* */ +/* 745 */ if (Std.byteArraysEqual(a._outgoing, a._serverData)) +/* */ { +/* */ +/* */ +/* */ +/* 750 */ a._outgoing = null; +/* */ } +/* 752 */ else if (!this.sendQ.contains(a)) { +/* 753 */ this.sendQ.addElement(a); +/* */ } +/* */ } +/* */ +/* 757 */ this.prepQ.removeAllElements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void mainCallback() +/* */ { +/* 782 */ if ((this.noteQ.isEmpty()) && (this.prepQ.isEmpty()) && (this.sendQ.isEmpty())) { +/* 783 */ Main.unregister(this); +/* 784 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 790 */ int frameTime = Std.getFastTime(); +/* 791 */ if (frameTime > this.lastSendTime + 250) +/* */ { +/* 793 */ sendQueue(); +/* */ +/* */ +/* 796 */ Main.unregister(this); +/* */ +/* 798 */ this.lastSendTime = frameTime; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void flushQueue() +/* */ { +/* 808 */ if (this.prepQ == null) { +/* 809 */ return; +/* */ } +/* 811 */ prepQueue(); +/* */ +/* 813 */ if (this.sendQ.isEmpty()) { +/* 814 */ return; +/* */ } +/* 816 */ int i = this.sendQ.size(); +/* 817 */ do { Attribute a = (Attribute)this.sendQ.elementAt(i); +/* 818 */ a._waitingForFeedback = false; +/* 819 */ a._serverData = null; +/* 820 */ a._outgoing = null;i--; +/* 816 */ } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 822 */ this.sendQ.removeAllElements(); +/* */ } +/* */ +/* */ +/* */ +/* */ private void sendQueue() +/* */ { +/* 829 */ prepQueue(); +/* */ +/* 831 */ WorldServer rs = ((WObject)getOwner()).getServer(); +/* */ +/* */ +/* */ +/* 835 */ if (rs != null) { +/* 836 */ int end = this.sendQ.size(); +/* 837 */ for (int i = 0; i < end; i++) { +/* 838 */ Attribute a = (Attribute)this.sendQ.elementAt(i); +/* */ +/* */ +/* 841 */ if (a._outgoing != null) { +/* 842 */ share(rs, a); +/* 843 */ a._serverData = a._outgoing; +/* 844 */ a._outgoing = null; +/* 845 */ a._waitingForFeedback = true; +/* */ } +/* */ } +/* */ } +/* */ +/* 850 */ this.sendQ.removeAllElements(); +/* */ } +/* */ +/* */ +/* */ +/* */ private void share(WorldServer ws, Attribute a) +/* */ { +/* 857 */ SuperRoot w = getOwner(); +/* */ +/* */ +/* 860 */ ObjID objID = null; +/* */ +/* 862 */ if ((w instanceof Room)) { +/* 863 */ Pilot pilot = Pilot.getActive(); +/* 864 */ if ((pilot == null) || (pilot.getLastServedRoom() == w)) { +/* 865 */ objID = new ObjID(253); +/* */ } else +/* 867 */ objID = new ObjID(((Room)w).getNetworkRoom().getLongID()); +/* 868 */ } else if ((w instanceof Pilot)) { +/* 869 */ objID = new ObjID(1); +/* */ } else { +/* 871 */ objID = new ObjID(w.getName()); +/* */ } +/* */ try { +/* 874 */ PropertyList propList = new PropertyList(); +/* 875 */ propList.addProperty(new net2Property(a._attrID, +/* 876 */ a.getFlags(), a.getAccessFlags(), a._outgoing)); +/* 877 */ ws.sendNetworkMsg(new PropertySetCmd(objID, +/* 878 */ propList)); +/* */ } catch (InfiniteWaitException e) { +/* 880 */ Console.println(Console.message("Net-shutdown") + e.toString()); +/* */ } catch (PacketTooLargeException e) { +/* 882 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setFromNetData(int attrID, byte[] data) +/* */ { +/* 892 */ if (this.prepQ != null) { +/* 893 */ prepQueue(); +/* */ } +/* 895 */ Attribute a = getAttribute(attrID); +/* 896 */ if (a == null) +/* */ { +/* */ +/* */ +/* 900 */ if ((getMode() & 0x1) == 0) { +/* 901 */ a = new DynamicForwardAttribute(attrID); +/* 902 */ addAttribute(a); +/* */ } else { +/* 904 */ Object[] arguments = { new String(attrID), +/* 905 */ new String(getOwner().getName()) }; +/* 906 */ Console.println(MessageFormat.format( +/* 907 */ Console.message("Unknown-attr"), arguments)); +/* 908 */ return; +/* */ } +/* */ } +/* */ +/* */ +/* 913 */ setData(a, data); +/* */ +/* 915 */ if (!a.loaded) { +/* 916 */ a.loaded = true; +/* 917 */ if ((a.callbacks != null) && (a.callbacks.size() > 0)) { +/* 918 */ Enumeration e = a.callbacks.elements(); +/* 919 */ while (e.hasMoreElements()) { +/* 920 */ LoadedAttribute la = (LoadedAttribute)e.nextElement(); +/* 921 */ la.loadedAttribute(a, null); +/* */ } +/* 923 */ a.callbacks.removeAllElements(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void setData(Attribute a, byte[] data) +/* */ { +/* 933 */ boolean matchesLastSent = Std.byteArraysEqual(data, a._serverData); +/* */ +/* 935 */ if (a._waitingForFeedback) { +/* 936 */ if (matchesLastSent) +/* */ { +/* 938 */ a._waitingForFeedback = false; +/* */ +/* 940 */ if ((data.length == 0) && (a._outgoing == null)) { +/* */ break label44; +/* */ } +/* */ +/* */ } +/* */ } +/* 946 */ else if (matchesLastSent) { +/* 947 */ return; +/* */ } +/* */ label44: +/* 950 */ a._serverData = data; +/* */ +/* 952 */ if (Std.byteArraysEqual(data, a._outgoing)) +/* */ { +/* */ +/* */ +/* */ +/* 957 */ a._outgoing = null; +/* 958 */ } else if (a._outgoing == null) +/* */ { +/* */ try { +/* 961 */ a.setFromNetData(new DataInputStream(new ByteArrayInputStream( +/* 962 */ data)), data.length); +/* */ } catch (IOException e) { +/* 964 */ e.printStackTrace(); +/* 965 */ Console.println(Console.message("Unrec-format") + a.getName()); +/* */ } +/* */ +/* */ +/* 969 */ ValueEvent e = new ValueEvent(Std.getFastTime(), +/* 970 */ this, (WObject)getOwner(), a); +/* 971 */ a.trigger(e); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 980 */ throw new NoSuchPropertyException(); +/* */ } +/* */ +/* */ +/* */ +/* 985 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 989 */ s.saveVersion(2, classCookie); +/* */ +/* 991 */ super.saveState(s); +/* */ +/* 993 */ s.saveVector(getAttributesList()); +/* */ } +/* */ +/* 996 */ private Vector restoredAttributes = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 1010 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 1012 */ setName(r.restoreString()); +/* */ +/* 1014 */ int nSharedAtts = r.restoreInt(); +/* 1015 */ this.restoredAttributes = new Vector(nSharedAtts); +/* 1016 */ for (int i = 0; i < nSharedAtts; i++) { +/* 1017 */ this.restoredAttributes.addElement(r.restoreString()); +/* */ } +/* 1019 */ break; +/* */ +/* */ case 1: +/* 1022 */ setName(r.restoreString()); +/* */ +/* */ +/* */ +/* */ +/* 1027 */ this.restoredAttributes = r.restoreVector(); +/* 1028 */ break; +/* */ +/* */ case 2: +/* 1031 */ super.restoreState(r); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1037 */ this.restoredAttributes = r.restoreVector(); +/* 1038 */ break; +/* */ +/* */ default: +/* 1041 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void ownerPostRestore() +/* */ { +/* 1052 */ int desiredMode = getMaybeDefaultMode(); +/* 1053 */ ((WObject)getOwner()).setSharerMode(0); +/* 1054 */ setMode(desiredMode); +/* */ +/* 1056 */ for (Enumeration e = this.restoredAttributes.elements(); e.hasMoreElements();) { +/* 1057 */ Attribute a = (Attribute)e.nextElement(); +/* */ +/* */ +/* 1060 */ addAttribute(a); +/* */ } +/* 1062 */ this.restoredAttributes = null; +/* */ } +/* */ +/* */ +/* */ public void releaseAuxilaryData() +/* */ { +/* 1068 */ for (int i = 0; i < 256; i++) { +/* 1069 */ Attribute a = (Attribute)this.attributes.elementAt(i); +/* */ +/* 1071 */ if (a != null) { +/* 1072 */ a.releaseAuxilaryData(); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Sharer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SlidePropertyAction.java b/NET/worlds/scape/SlidePropertyAction.java new file mode 100644 index 0000000..d548f46 --- /dev/null +++ b/NET/worlds/scape/SlidePropertyAction.java @@ -0,0 +1,95 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class SlidePropertyAction +/* */ extends SetPropertyAction +/* */ { +/* 17 */ private float _duration = 0.0F; +/* 18 */ private int _startMilliTime = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean slide() +/* */ { +/* 28 */ return this._duration != 0.0F; +/* */ } +/* */ +/* */ protected void start() +/* */ { +/* 33 */ this._startMilliTime = Std.getFastTime(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected float fraction() +/* */ { +/* 43 */ return (Std.getFastTime() - this._startMilliTime) / (1000.0F * this._duration); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 51 */ Object ret = null; +/* 52 */ switch (index - offset) { +/* */ case 0: +/* 54 */ if (mode == 0) { +/* 55 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 56 */ "Duration")); +/* 57 */ } else { if (mode == 1) +/* 58 */ return new Float(this._duration); +/* 59 */ if (mode == 2) +/* 60 */ this._duration = ((Float)value).floatValue(); } +/* 61 */ break; +/* */ default: +/* 63 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 65 */ return ret; +/* */ } +/* */ +/* 68 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 72 */ s.saveVersion(1, classCookie); +/* 73 */ super.saveState(s); +/* 74 */ s.saveFloat(this._duration); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 79 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 81 */ super.restoreState(r); +/* 82 */ this._duration = r.restoreFloat(); +/* 83 */ break; +/* */ +/* */ default: +/* 86 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SlidePropertyAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SmoothDriver.java b/NET/worlds/scape/SmoothDriver.java new file mode 100644 index 0000000..ef9d50d --- /dev/null +++ b/NET/worlds/scape/SmoothDriver.java @@ -0,0 +1,684 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Window; +/* */ import java.io.IOException; +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SmoothDriver +/* */ extends SwitchableBehavior +/* */ implements MouseDeltaHandler, KeyUpHandler, KeyDownHandler, FrameHandler, MouseDownHandler, MouseUpHandler, MomentumBehavior +/* */ { +/* */ protected float FB_force; +/* */ protected boolean FB_forceFromMouse; +/* */ protected float FB_vel; +/* */ protected float LR_force; +/* */ protected float LR_vel; +/* */ protected int lastTime; +/* */ +/* */ public boolean handle(MouseDeltaEvent e) +/* */ { +/* 68 */ if (UniverseHandler.handle(e)) { +/* 69 */ return true; +/* */ } +/* 71 */ if ((e.dx != 0) || (e.dy != 0)) +/* */ { +/* 73 */ applyFrameForce(e); +/* */ +/* 75 */ float dx2 = e.dx * e.dx; +/* 76 */ float dy2 = e.dy * e.dy; +/* 77 */ double arrrr = Math.sqrt(dx2 + dy2); +/* */ +/* 79 */ if (e.dy < 0) +/* 80 */ dy2 = -dy2; +/* 81 */ this.FB_vel -= (float)(1.1D * dy2 / arrrr); +/* */ +/* 83 */ if (e.dx < 0) +/* 84 */ dx2 = -dx2; +/* 85 */ this.LR_vel -= (float)(0.5D * dx2 / arrrr); +/* */ } +/* 87 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 104 */ protected float maxdvFB = 300.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 110 */ protected float FB_damp = -2.5F; +/* */ +/* */ public void setVelocityDamping(float pDamp) +/* */ { +/* 114 */ this.FB_damp = pDamp; +/* */ } +/* */ +/* */ public float getVelocityDamping() +/* */ { +/* 119 */ return this.FB_damp; +/* */ } +/* */ +/* */ +/* 123 */ protected float minFB_vel = 4.0F; +/* */ +/* */ +/* 126 */ protected float minFB_pixDouble = 40.0F; +/* */ +/* */ +/* 129 */ protected float maxdvLR = 166.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 135 */ protected float LR_damp = -5.0F; +/* */ +/* */ +/* 138 */ protected float minLR_vel = 3.0F; +/* */ +/* */ +/* 141 */ protected float minLR_pixDouble = 40.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 147 */ protected float eyeHeight = 150.0F; +/* */ +/* */ public void setEyeHeight(float newHeight) +/* */ { +/* 151 */ this.eyeHeight = newHeight; +/* */ } +/* */ +/* */ public float getEyeHeight() +/* */ { +/* 156 */ return this.eyeHeight; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void applyFrameForce(Event e) +/* */ { +/* 171 */ if (!(e.receiver instanceof Pilot)) { +/* 172 */ return; +/* */ } +/* 174 */ Pilot pilot = (Pilot)e.receiver; +/* 175 */ if (!pilot.isActive()) { +/* 176 */ return; +/* */ } +/* 178 */ this.appliedForceThisFrame += 1; +/* */ +/* */ +/* 181 */ int now = e.time; +/* 182 */ float dt = (now - this.lastTime) / 1000.0F; +/* */ +/* */ +/* */ +/* 186 */ if (dt <= 0.0F) { +/* 187 */ return; +/* */ } +/* */ +/* */ +/* 191 */ if (dt > 0.33F) { +/* 192 */ dt = 0.33F; +/* */ } +/* 194 */ this.lastTime = now; +/* */ +/* */ +/* 197 */ float dx = this.FB_vel * dt; +/* */ +/* */ +/* */ +/* 201 */ float dv = 0.0F; +/* */ +/* */ +/* 204 */ if (this.FB_force != 0.0F) +/* */ { +/* 206 */ dv += this.FB_force * dt; +/* */ +/* */ +/* */ +/* */ +/* 211 */ dv = this.maxdvFB * (float)Math.atan(dv / this.maxdvFB); +/* */ +/* 213 */ this.FB_vel += dv; +/* 214 */ dx += dv * dt; +/* */ } +/* */ +/* */ +/* 218 */ float dz = this.eyeHeight - pilot.getZ(); +/* 219 */ Room room = pilot.getRoom(); +/* 220 */ if (room != null) { +/* 221 */ dz += room.floorHeight( +/* 222 */ pilot.getX(), pilot.getY(), pilot.getZ()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 229 */ if ((dx != 0.0F) || (dz != 0.0F)) { +/* 230 */ moveLevel(pilot, dx, dz); +/* */ } +/* */ +/* 233 */ this.FB_vel = ((float)(this.FB_vel * Math.exp(this.FB_damp * dt))); +/* 234 */ if (Math.abs(this.FB_vel) < this.minFB_vel) { +/* 235 */ this.FB_vel = 0.0F; +/* */ } +/* */ +/* */ +/* */ +/* 240 */ float dTheta = this.LR_vel * dt; +/* */ +/* */ +/* 243 */ float dv = 0.0F; +/* */ +/* 245 */ if (this.LR_force != 0.0F) +/* */ { +/* 247 */ dv += this.LR_force * dt; +/* */ +/* */ +/* */ +/* 251 */ dv = this.maxdvLR * (float)Math.atan(dv / this.maxdvLR); +/* */ +/* 253 */ this.LR_vel += dv; +/* 254 */ dTheta += dv * dt; +/* */ } +/* */ +/* 257 */ if (dTheta != 0.0F) { +/* 258 */ yawLevel(pilot, dTheta); +/* */ } +/* 260 */ this.LR_vel = ((float)(this.LR_vel * Math.exp(this.LR_damp * dt))); +/* 261 */ if (Math.abs(this.LR_vel) < this.minLR_vel) { +/* 262 */ this.LR_vel = 0.0F; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void moveLevel(Pilot pilot, float dx, float dz) +/* */ { +/* 272 */ float currentYaw = pilot.getYaw(); +/* 273 */ Point3Temp currentSpinAxis = Point3Temp.make(); +/* 274 */ float currentSpin = pilot.getSpin(currentSpinAxis); +/* 275 */ Point3Temp currentPosition = pilot.getPosition(); +/* */ +/* 277 */ pilot.makeIdentity() +/* 278 */ .moveTo(currentPosition) +/* 279 */ .yaw(-currentYaw); +/* */ +/* 281 */ pilot.premoveThrough(Point3Temp.make(0.0F, dx, dz)); +/* */ +/* 283 */ pilot.yaw(currentYaw); +/* 284 */ pilot.spin(currentSpinAxis, currentSpin); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void yawLevel(Pilot pilot, float dTheta) +/* */ { +/* 293 */ float currentYaw = pilot.getYaw(); +/* 294 */ Point3Temp currentSpinAxis = Point3Temp.make(); +/* 295 */ float currentSpin = pilot.getSpin(currentSpinAxis); +/* 296 */ Point3Temp currentPosition = pilot.getPosition(); +/* */ +/* 298 */ pilot.makeIdentity() +/* 299 */ .moveTo(currentPosition) +/* 300 */ .yaw(-currentYaw); +/* */ +/* 302 */ pilot.yaw(dTheta); +/* */ +/* 304 */ pilot.yaw(currentYaw); +/* 305 */ pilot.spin(currentSpinAxis, currentSpin); +/* */ } +/* */ +/* 308 */ private int appliedForceThisFrame = 0; +/* 309 */ private int forceDouble = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 317 */ if ((this.FB_forceFromMouse) && (!isDelta(e))) { +/* 318 */ applyFrameForce(e); +/* 319 */ this.FB_force = 0.0F; +/* 320 */ this.FB_forceFromMouse = false; +/* */ } +/* */ +/* */ +/* 324 */ if (this.appliedForceThisFrame == 0) +/* 325 */ applyFrameForce(e); +/* 326 */ this.appliedForceThisFrame = 0; +/* 327 */ return true; +/* */ } +/* */ +/* */ +/* 331 */ protected float FB_key = 1200.0F; +/* */ +/* */ +/* 334 */ protected float LR_key = 500.0F; +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(KeyDownEvent e) +/* */ { +/* 341 */ if (UniverseHandler.handle(e)) { +/* 342 */ return true; +/* */ } +/* */ +/* */ float FB; +/* 346 */ if (e.key == 58150) { +/* 347 */ FB = this.FB_key; } else { float FB; +/* 348 */ if (e.key == 58152) { +/* 349 */ FB = -this.FB_key; +/* */ } +/* */ else { +/* */ float LR; +/* 353 */ if (e.key == 58149) { +/* 354 */ LR = this.LR_key; } else { float LR; +/* 355 */ if (e.key == 58151) { +/* 356 */ LR = -this.LR_key; +/* */ } else +/* 358 */ return true; } +/* */ float LR; +/* 360 */ applyFrameForce(e); +/* */ +/* */ +/* 363 */ this.LR_force = LR; +/* 364 */ return true; +/* */ } } +/* */ float FB; +/* 367 */ applyFrameForce(e); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 377 */ this.FB_force = FB; +/* 378 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(KeyUpEvent e) +/* */ { +/* 386 */ if (UniverseHandler.handle(e)) { +/* 387 */ return true; +/* */ } +/* */ +/* 390 */ if ((e.key == 58150) || (e.key == 58152)) { +/* 391 */ applyFrameForce(e); +/* 392 */ this.FB_force = 0.0F; +/* 393 */ } else if ((e.key == 58149) || (e.key == 58151)) { +/* 394 */ applyFrameForce(e); +/* 395 */ this.LR_force = 0.0F; +/* */ } +/* 397 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ private boolean isDelta(Event e) +/* */ { +/* 404 */ if ((!(e.receiver instanceof Pilot)) || (!((Pilot)e.receiver).isActive())) { +/* 405 */ return false; +/* */ } +/* 407 */ Window w = Window.getMainWindow(); +/* 408 */ if ((w == null) || (!w.getDeltaMode())) { +/* 409 */ return false; +/* */ } +/* 411 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 419 */ if ((e.key == 58114) && (isDelta(e))) { +/* 420 */ applyFrameForce(e); +/* */ +/* */ +/* 423 */ this.FB_force = this.FB_key; +/* 424 */ this.FB_forceFromMouse = true; +/* */ } +/* 426 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseUpEvent e) +/* */ { +/* 434 */ if ((e.key == 58114) && (isDelta(e))) { +/* 435 */ applyFrameForce(e); +/* */ +/* */ +/* 438 */ this.FB_force = 0.0F; +/* 439 */ this.FB_forceFromMouse = false; +/* */ } +/* 441 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 450 */ Object ret = null; +/* 451 */ switch (index - offset) { +/* */ case 0: +/* 453 */ if (mode == 0) { +/* 454 */ ret = FloatPropertyEditor.make( +/* 455 */ new Property(this, index, "Eye Height")); +/* 456 */ } else if (mode == 1) { +/* 457 */ ret = new Float(getEyeHeight()); +/* 458 */ } else if (mode == 2) +/* 459 */ setEyeHeight(((Float)value).floatValue()); +/* 460 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ case 1: +/* 472 */ if (mode == 0) { +/* 473 */ ret = FloatPropertyEditor.make( +/* 474 */ new Property(this, index, "Fore/aft max acceleration")); +/* 475 */ } else if (mode == 1) { +/* 476 */ ret = new Float(this.maxdvFB); +/* 477 */ } else if (mode == 2) +/* 478 */ this.maxdvFB = ((Float)value).floatValue(); +/* 479 */ break; +/* */ case 2: +/* 481 */ if (mode == 0) { +/* 482 */ ret = FloatPropertyEditor.make( +/* 483 */ new Property(this, index, "Fore/aft velocity damping")); +/* 484 */ } else if (mode == 1) { +/* 485 */ ret = new Float(this.FB_damp); +/* 486 */ } else if (mode == 2) +/* 487 */ this.FB_damp = ((Float)value).floatValue(); +/* 488 */ break; +/* */ case 3: +/* 490 */ if (mode == 0) { +/* 491 */ ret = FloatPropertyEditor.make( +/* 492 */ new Property(this, index, "Fore/aft min velocity")); +/* 493 */ } else if (mode == 1) { +/* 494 */ ret = new Float(this.minFB_vel); +/* 495 */ } else if (mode == 2) +/* 496 */ this.minFB_vel = ((Float)value).floatValue(); +/* 497 */ break; +/* */ case 4: +/* 499 */ if (mode == 0) { +/* 500 */ ret = FloatPropertyEditor.make( +/* 501 */ new Property(this, index, +/* 502 */ "Fore/aft velocity threshold for pixel doubling")); +/* 503 */ } else if (mode == 1) { +/* 504 */ ret = new Float(this.minFB_pixDouble); +/* 505 */ } else if (mode == 2) +/* 506 */ this.minFB_pixDouble = ((Float)value).floatValue(); +/* 507 */ break; +/* */ case 5: +/* 509 */ if (mode == 0) { +/* 510 */ ret = FloatPropertyEditor.make( +/* 511 */ new Property(this, index, "Yaw max acceleration")); +/* 512 */ } else if (mode == 1) { +/* 513 */ ret = new Float(this.maxdvLR); +/* 514 */ } else if (mode == 2) +/* 515 */ this.maxdvLR = ((Float)value).floatValue(); +/* 516 */ break; +/* */ case 6: +/* 518 */ if (mode == 0) { +/* 519 */ ret = FloatPropertyEditor.make( +/* 520 */ new Property(this, index, "Yaw rate damping")); +/* 521 */ } else if (mode == 1) { +/* 522 */ ret = new Float(this.LR_damp); +/* 523 */ } else if (mode == 2) +/* 524 */ this.LR_damp = ((Float)value).floatValue(); +/* 525 */ break; +/* */ case 7: +/* 527 */ if (mode == 0) { +/* 528 */ ret = FloatPropertyEditor.make( +/* 529 */ new Property(this, index, "Yaw min rate")); +/* 530 */ } else if (mode == 1) { +/* 531 */ ret = new Float(this.minLR_vel); +/* 532 */ } else if (mode == 2) +/* 533 */ this.minLR_vel = ((Float)value).floatValue(); +/* 534 */ break; +/* */ case 8: +/* 536 */ if (mode == 0) { +/* 537 */ ret = FloatPropertyEditor.make( +/* 538 */ new Property(this, index, +/* 539 */ "Yaw rate threshold for pixel doubling")); +/* 540 */ } else if (mode == 1) { +/* 541 */ ret = new Float(this.minLR_pixDouble); +/* 542 */ } else if (mode == 2) +/* 543 */ this.minLR_pixDouble = ((Float)value).floatValue(); +/* 544 */ break; +/* */ case 9: +/* 546 */ if (mode == 0) { +/* 547 */ ret = FloatPropertyEditor.make( +/* 548 */ new Property(this, index, +/* 549 */ "Fore/aft velocity increment for up/down arrow keys")); +/* 550 */ } else if (mode == 1) { +/* 551 */ ret = new Float(this.FB_key); +/* 552 */ } else if (mode == 2) +/* 553 */ this.FB_key = ((Float)value).floatValue(); +/* 554 */ break; +/* */ case 10: +/* 556 */ if (mode == 0) { +/* 557 */ ret = FloatPropertyEditor.make( +/* 558 */ new Property(this, index, +/* 559 */ "Yaw rate increment for up/down arrow keys")); +/* 560 */ } else if (mode == 1) { +/* 561 */ ret = new Float(this.LR_key); +/* 562 */ } else if (mode == 2) +/* 563 */ this.LR_key = ((Float)value).floatValue(); +/* 564 */ break; +/* */ default: +/* 566 */ ret = super.properties(index, offset + 11, mode, value); +/* */ } +/* 568 */ return ret; +/* */ } +/* */ +/* 571 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 575 */ s.saveVersion(3, classCookie); +/* 576 */ super.saveState(s); +/* 577 */ s.saveFloat(this.FB_vel); +/* 578 */ s.saveFloat(this.LR_vel); +/* 579 */ s.saveFloat(this.maxdvFB); +/* 580 */ s.saveFloat(this.FB_damp); +/* 581 */ s.saveFloat(this.minFB_vel); +/* 582 */ s.saveFloat(this.maxdvLR); +/* 583 */ s.saveFloat(this.LR_damp); +/* 584 */ s.saveFloat(this.minLR_vel); +/* 585 */ s.saveFloat(this.eyeHeight); +/* 586 */ s.saveFloat(this.FB_key); +/* 587 */ s.saveFloat(this.LR_key); +/* 588 */ s.saveInt(this.forceDouble); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 593 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 595 */ r.setOldFlag(); +/* 596 */ super.restoreState(r); +/* 597 */ r.restoreFloat(); +/* 598 */ this.FB_vel = r.restoreFloat(); +/* 599 */ r.restoreFloat(); +/* 600 */ this.LR_vel = r.restoreFloat(); +/* 601 */ break; +/* */ case 1: +/* 603 */ r.setOldFlag(); +/* 604 */ super.restoreState(r); +/* 605 */ r.restoreFloat(); +/* 606 */ this.FB_vel = r.restoreFloat(); +/* 607 */ r.restoreFloat(); +/* 608 */ this.LR_vel = r.restoreFloat(); +/* 609 */ this.maxdvFB = r.restoreFloat(); +/* 610 */ this.FB_damp = r.restoreFloat(); +/* 611 */ this.minFB_vel = r.restoreFloat(); +/* 612 */ this.maxdvLR = r.restoreFloat(); +/* 613 */ this.LR_damp = r.restoreFloat(); +/* 614 */ this.minLR_vel = r.restoreFloat(); +/* 615 */ this.eyeHeight = r.restoreFloat(); +/* 616 */ this.FB_key = r.restoreFloat(); +/* 617 */ this.LR_key = r.restoreFloat(); +/* 618 */ break; +/* */ case 2: +/* 620 */ r.setOldFlag(); +/* 621 */ super.restoreState(r); +/* 622 */ r.restoreFloat(); +/* 623 */ this.FB_vel = r.restoreFloat(); +/* 624 */ r.restoreFloat(); +/* 625 */ this.LR_vel = r.restoreFloat(); +/* 626 */ this.maxdvFB = r.restoreFloat(); +/* 627 */ this.FB_damp = r.restoreFloat(); +/* 628 */ this.minFB_vel = r.restoreFloat(); +/* 629 */ this.maxdvLR = r.restoreFloat(); +/* 630 */ this.LR_damp = r.restoreFloat(); +/* 631 */ this.minLR_vel = r.restoreFloat(); +/* 632 */ this.eyeHeight = r.restoreFloat(); +/* 633 */ this.FB_key = r.restoreFloat(); +/* 634 */ this.LR_key = r.restoreFloat(); +/* 635 */ this.forceDouble = r.restoreInt(); +/* 636 */ break; +/* */ case 3: +/* 638 */ super.restoreState(r); +/* 639 */ this.FB_vel = r.restoreFloat(); +/* 640 */ this.LR_vel = r.restoreFloat(); +/* 641 */ this.maxdvFB = r.restoreFloat(); +/* 642 */ this.FB_damp = r.restoreFloat(); +/* 643 */ this.minFB_vel = r.restoreFloat(); +/* 644 */ this.maxdvLR = r.restoreFloat(); +/* 645 */ this.LR_damp = r.restoreFloat(); +/* 646 */ this.minLR_vel = r.restoreFloat(); +/* 647 */ this.eyeHeight = r.restoreFloat(); +/* 648 */ this.FB_key = r.restoreFloat(); +/* 649 */ this.LR_key = r.restoreFloat(); +/* 650 */ this.forceDouble = r.restoreInt(); +/* 651 */ break; +/* */ default: +/* 653 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void transferFrom(Enumeration oldMBs) +/* */ { +/* 659 */ this.FB_force = 0.0F; +/* 660 */ this.LR_force = 0.0F; +/* */ +/* */ +/* 663 */ while (oldMBs.hasMoreElements()) { +/* 664 */ SuperRoot sr = (SuperRoot)oldMBs.nextElement(); +/* 665 */ if ((sr instanceof SmoothDriver)) { +/* 666 */ SmoothDriver sd = (SmoothDriver)sr; +/* 667 */ this.FB_vel = sd.FB_vel; +/* 668 */ this.LR_vel = sd.LR_vel; +/* 669 */ this.lastTime = sd.lastTime; +/* 670 */ return; +/* */ } +/* */ } +/* */ +/* 674 */ this.FB_vel = 0.0F; +/* 675 */ this.LR_vel = 0.0F; +/* 676 */ this.lastTime = 0; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SmoothDriver.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Sound.java b/NET/worlds/scape/Sound.java new file mode 100644 index 0000000..256bde9 --- /dev/null +++ b/NET/worlds/scape/Sound.java @@ -0,0 +1,940 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Sound +/* */ extends Action +/* */ implements BGLoaded, StateContext +/* */ { +/* */ static int debugLevel; +/* */ private String cachedName; +/* */ private URL soundURL; +/* */ +/* */ static +/* */ { +/* 81 */ debugLevel = IniFile.gamma().getIniInt("sounddebug", 0); +/* 82 */ debugOut(1, "SOUND DEBUGGING LEVEL = " + debugLevel); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static void debugOut(int n, String s) +/* */ { +/* 92 */ if (debugLevel > n) { System.out.println(s); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 102 */ protected CacheFile cachedFile = null; +/* */ +/* */ +/* */ +/* */ +/* 107 */ protected float soundVolume = 1.0F; +/* 108 */ protected float stopDistance = 1000.0F; +/* */ +/* */ +/* */ +/* */ +/* 113 */ private int repeat = 1; +/* 114 */ private boolean continuous = false; +/* */ +/* */ +/* */ +/* */ +/* 119 */ private boolean attenuateOn = true; +/* */ +/* */ +/* */ +/* */ +/* 124 */ private boolean panningOn = true; +/* */ +/* */ +/* */ protected SuperRoot activeSeq; +/* */ +/* */ +/* */ SoundPlayer player; +/* */ +/* */ +/* */ +/* */ public Sound(URL soundURL) +/* */ { +/* 136 */ Transform.countClass(this, 1); +/* 137 */ debugOut(9, "Sound " + soundURL); +/* 138 */ setURL(soundURL); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Sound() +/* */ { +/* 146 */ Transform.countClass(this, 1); +/* 147 */ debugOut(9, "Sound "); +/* 148 */ setURL(null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 159 */ AudibilityFilter aFilter = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final void setURL(URL url) +/* */ { +/* 168 */ if (this.activeSeq != null) +/* 169 */ closePlayer(); +/* 170 */ this.soundURL = url; +/* */ } +/* */ +/* */ +/* */ public final URL getURL() +/* */ { +/* 176 */ return this.soundURL; +/* */ } +/* */ +/* */ public final void setSoundVolume(float vol) +/* */ { +/* 181 */ this.soundVolume = vol; +/* */ } +/* */ +/* */ public final float getSoundVolume() +/* */ { +/* 186 */ return this.soundVolume; +/* */ } +/* */ +/* */ public final void setStopDistance(float i) { +/* 190 */ this.stopDistance = i; +/* */ } +/* */ +/* */ public final float getStopDistance() +/* */ { +/* 195 */ return this.stopDistance; +/* */ } +/* */ +/* */ public final void setRepeat(int i) +/* */ { +/* 200 */ this.repeat = i; +/* */ } +/* */ +/* */ public final int getRepeat() +/* */ { +/* 205 */ return this.repeat; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final void setContinuous(boolean c) +/* */ { +/* 215 */ this.continuous = c; +/* */ } +/* */ +/* */ public final boolean isContinuous() +/* */ { +/* 220 */ return this.continuous; +/* */ } +/* */ +/* */ public final void setAttenuate(boolean b) +/* */ { +/* 225 */ this.attenuateOn = b; +/* */ } +/* */ +/* */ public final boolean getAttenuate() +/* */ { +/* 230 */ return this.attenuateOn; +/* */ } +/* */ +/* */ +/* */ public final void setPanning(boolean b) +/* */ { +/* 236 */ this.panningOn = b; +/* */ } +/* */ +/* */ public final boolean getPanning() +/* */ { +/* 241 */ return this.panningOn; +/* */ } +/* */ +/* */ public final int getState() +/* */ { +/* 246 */ return this.player.getState(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 253 */ private int maxHopcount = 1; +/* */ +/* */ public final int getHopcount() { +/* 256 */ return this.maxHopcount; +/* */ } +/* */ +/* */ public final void setHopcount(int i) { +/* 260 */ this.maxHopcount = i; +/* 261 */ if (this.aFilter != null) { +/* 262 */ this.aFilter.setHopcount(this.maxHopcount); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 270 */ private boolean doorMovementFlag = false; +/* */ +/* */ public boolean getDoorMovementFlag() { +/* 273 */ return this.doorMovementFlag; +/* */ } +/* */ +/* */ public void setDoorMovementFlag(boolean b) { +/* 277 */ this.doorMovementFlag = b; +/* 278 */ if (this.aFilter != null) +/* 279 */ startAudibilityFilter(); +/* */ } +/* */ +/* */ private void startAudibilityFilter() { +/* 283 */ debugOut(9, "startAudibilityFilter " + getURL()); +/* 284 */ WObject owner = (WObject)getOwner(); +/* */ +/* 286 */ if (owner != null) { +/* 287 */ if (this.doorMovementFlag) { +/* 288 */ this.aFilter = new DoorBasedFilter(this, owner, this.maxHopcount, +/* 289 */ this.stopDistance); +/* */ } else { +/* 291 */ this.aFilter = new AudibilityFilter(this, owner, this.maxHopcount); +/* */ } +/* 293 */ this.aFilter.moveEmitter(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 300 */ private static boolean soundOn = true; +/* */ +/* */ +/* */ +/* */ public static void turnSoundOn() +/* */ { +/* 306 */ soundOn = true; +/* */ } +/* */ +/* */ +/* */ +/* */ public static void turnSoundOff() +/* */ { +/* 313 */ soundOn = false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 322 */ boolean playAfterLoading = true; +/* */ +/* */ public void setPlayAfterLoading(boolean b) { +/* 325 */ this.playAfterLoading = b; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected boolean isRealAudio(URL s) +/* */ { +/* 333 */ return (s.endsWith(".ram")) || (s.endsWith(".ra")) || (s.endsWith(".rm")); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 339 */ protected int state = 0; +/* */ protected static final int SYNC = 1; +/* */ protected static final int ASYNC = 2; +/* */ +/* 343 */ public void changeState(int s) { debugOut(9, "changeState to " + s); +/* 344 */ this.state = s; +/* */ } +/* */ +/* */ protected Object doState(Object obj) +/* */ { +/* 349 */ return SoundState.instance().doState(this, obj); +/* */ } +/* */ +/* */ +/* */ private boolean isBackgroundProcessing() +/* */ { +/* 355 */ if (this.state != 0) { +/* 356 */ debugOut(9, "backgroundProcessing " + this.state); +/* */ } +/* 358 */ return this.state != 0; +/* */ } +/* */ +/* */ +/* */ +/* 363 */ protected int backgroundState = 1; +/* */ +/* */ +/* */ private static SoundCallback closer; +/* */ +/* */ +/* */ static Vector cachedEntries; +/* */ +/* */ +/* */ private boolean mainRan; +/* */ +/* */ +/* */ private boolean opened; +/* */ +/* */ +/* */ +/* */ private void startSound() +/* */ { +/* 381 */ this.backgroundState = 1; +/* 382 */ if (this.aFilter == null) +/* 383 */ startAudibilityFilter(); +/* 384 */ if (this.aFilter != null) { +/* 385 */ this.aFilter.setEmitterOn(true); +/* */ } +/* 387 */ if (this.state == 0) +/* 388 */ this.state = 1; +/* 389 */ doState(this.soundURL); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteName) +/* */ { +/* 404 */ this.backgroundState = 2; +/* 405 */ return doState(URL.make(localName)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 419 */ this.backgroundState = 1; +/* 420 */ doState(obj); +/* 421 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Room getBackgroundLoadRoom() +/* */ { +/* 430 */ WObject owner = (WObject)getOwner(); +/* 431 */ return owner == null ? null : owner.getRoom(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void ensureClosure() +/* */ { +/* 458 */ if (closer == null) { +/* 459 */ closer = new SoundCallback(); +/* 460 */ Main.register(closer); +/* */ } +/* 462 */ if (cachedEntries == null) +/* 463 */ cachedEntries = new Vector(); +/* 464 */ cachedEntries.addElement(this.cachedFile); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void unlockCache() +/* */ { +/* 473 */ if (this.cachedFile != null) { +/* 474 */ debugOut(6, "unlocking " + this.soundURL); +/* 475 */ this.cachedFile.finalize(); +/* */ +/* 477 */ assert (cachedEntries != null); +/* 478 */ assert (cachedEntries.indexOf(this.cachedFile, 0) >= 0); +/* 479 */ cachedEntries.removeElement(this.cachedFile); +/* 480 */ this.cachedFile = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ synchronized boolean openPlayer(URL url) +/* */ { +/* 494 */ assert (this.player == null); +/* */ +/* 496 */ this.cachedName = url.unalias(); +/* 497 */ debugOut(4, "openPlayer on:: " + this.cachedName); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 505 */ if (url.endsWith(".wav")) { +/* 506 */ this.player = new WavSoundPlayer(this); +/* 507 */ } else if (url.endsWith(".mid")) { +/* 508 */ this.player = new MCISoundPlayer(this); +/* */ } else { +/* 510 */ this.player = new WMPSoundPlayer(this); +/* */ } +/* */ +/* 513 */ if (Main.isMainThread()) { +/* 514 */ openInMainThread(); +/* */ } +/* */ else { +/* 517 */ this.mainRan = false; +/* 518 */ Main.register(new MainCallback() { +/* */ public void mainCallback() { +/* 520 */ Sound.this.openInMainThread(); +/* 521 */ Main.unregister(this); +/* */ } +/* */ }); +/* */ +/* 525 */ while (!this.mainRan) { +/* */ try { +/* 527 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ } +/* 532 */ return this.opened; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void openInMainThread() +/* */ { +/* 540 */ this.opened = this.player.open(this.soundVolume, this.stopDistance, +/* 541 */ this.attenuateOn, this.panningOn); +/* 542 */ if (!this.opened) { +/* 543 */ closePlayer(); +/* */ } +/* 545 */ this.mainRan = true; +/* 546 */ notify(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ void closePlayer() +/* */ { +/* 555 */ if (this.player != null) { +/* 556 */ this.player.stop(); +/* 557 */ unlockCache(); +/* 558 */ if (SoundResource.instance().syncUnlock()) +/* 559 */ this.player.close(); +/* 560 */ this.player = null; +/* */ } +/* 562 */ debugOut(2, " closePlayer"); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 583 */ debugOut(9, "trigger in: seqID " + seqID + " activeSeq " + this.activeSeq); +/* 584 */ if (isBackgroundProcessing()) +/* 585 */ return this.activeSeq; +/* 586 */ if (seqID == null) +/* */ { +/* 588 */ if ((this.soundURL == null) || (getOwner() == null)) { +/* 589 */ return null; +/* */ } +/* */ +/* 592 */ if (this.activeSeq != null) { +/* 593 */ closePlayer(); +/* */ } +/* */ +/* 596 */ this.activeSeq = this; +/* 597 */ seqID = this.activeSeq; +/* 598 */ debugOut(6, "triggering new sound " + seqID); +/* 599 */ startSound(); +/* 600 */ } else if (seqID != this.activeSeq) +/* */ { +/* */ +/* */ +/* 604 */ unlockCache(); +/* 605 */ if (!isContinuous()) +/* 606 */ this.aFilter.setEmitterOn(false); +/* 607 */ return null; +/* */ } +/* */ +/* 610 */ if ((this.player != null) && (this.player.getState() != 0) && +/* 611 */ (!isContinuous())) { +/* 612 */ this.aFilter.setEmitterOn(false); +/* */ } +/* 614 */ if (((!isBackgroundProcessing()) && ( +/* 615 */ (!updateSound()) || (this.player.getState() != 0))) || +/* 616 */ (getOwner() == null)) +/* */ { +/* 618 */ this.activeSeq = null; +/* 619 */ closePlayer(); +/* 620 */ return null; +/* */ } +/* 622 */ return this.activeSeq; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean updateSound() +/* */ { +/* 648 */ debugOut(9, "Sound::updateSound:: in"); +/* 649 */ if (this.player == null) { +/* 650 */ debugOut(6, "update returning false because player is null"); +/* 651 */ return false; +/* */ } +/* */ +/* */ +/* 655 */ if (!SoundResource.instance().isOK()) { +/* 656 */ debugOut(2, "update registering not OK"); +/* 657 */ return false; +/* */ } +/* */ +/* 660 */ if (!this.aFilter.isAudible()) { +/* 661 */ debugOut(4, "update stopping sound because isAudible false"); +/* 662 */ return false; +/* */ } +/* */ +/* 665 */ Point3Temp pilot = Point3Temp.make(); +/* 666 */ Point3Temp up = Point3Temp.make(); +/* 667 */ Point3Temp forward = Point3Temp.make(); +/* 668 */ Point3Temp obj = Point3Temp.make(); +/* */ +/* 670 */ this.aFilter.getListenerPosition(pilot, up, forward); +/* 671 */ this.aFilter.getEmitterPosition(obj); +/* */ +/* 673 */ if (!this.player.position(pilot, obj, forward, up)) { +/* 674 */ debugOut(6, "update returning false because position false"); +/* 675 */ return false; +/* */ } +/* */ +/* 678 */ float vol = -1.0F; +/* 679 */ if (soundOn) { +/* 680 */ vol = this.aFilter.getEmitterVolume(); +/* */ } +/* 682 */ if (!this.player.setVolume(vol * this.soundVolume)) { +/* 683 */ debugOut(6, "update returning false because volume false"); +/* 684 */ return false; +/* */ } +/* */ +/* 687 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 697 */ super.postRestore(version); +/* 698 */ startAudibilityFilter(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 707 */ Object ret = null; +/* 708 */ switch (index - offset) +/* */ { +/* */ case 0: +/* 711 */ if (mode == 0) { +/* 712 */ ret = URLPropertyEditor.make( +/* 713 */ new Property(this, index, "Sound File URL") +/* 714 */ .allowSetNull(), +/* 715 */ "asf;wav;mid;ram;ra;rm;mp3"); +/* 716 */ } else if (mode == 1) { +/* 717 */ ret = this.soundURL; +/* 718 */ } else if (mode == 2) +/* 719 */ this.soundURL = ((URL)value); +/* 720 */ break; +/* */ case 1: +/* 722 */ if (mode == 0) { +/* 723 */ ret = FloatPropertyEditor.make( +/* 724 */ new Property(this, index, "Max Volume")); +/* 725 */ } else if (mode == 1) { +/* 726 */ ret = new Float(this.soundVolume); +/* 727 */ } else if (mode == 2) +/* 728 */ this.soundVolume = ((Float)value).floatValue(); +/* 729 */ break; +/* */ case 2: +/* 731 */ if (mode == 0) { +/* 732 */ ret = FloatPropertyEditor.make( +/* 733 */ new Property(this, index, "Stop Distance")); +/* 734 */ } else if (mode == 1) { +/* 735 */ ret = new Float(this.stopDistance); +/* 736 */ } else if (mode == 2) +/* 737 */ this.stopDistance = ((Float)value).floatValue(); +/* 738 */ break; +/* */ case 3: +/* 740 */ if (mode == 0) { +/* 741 */ ret = IntegerPropertyEditor.make( +/* 742 */ new Property(this, index, "Times to Repeat")); +/* 743 */ } else if (mode == 1) { +/* 744 */ ret = new Integer(this.repeat); +/* 745 */ } else if (mode == 2) +/* 746 */ this.repeat = ((Integer)value).intValue(); +/* 747 */ break; +/* */ case 4: +/* 749 */ if (mode == 0) { +/* 750 */ ret = BooleanPropertyEditor.make( +/* 751 */ new Property(this, index, "Attenuate With Distance"), +/* 752 */ "No", "Yes"); +/* 753 */ } else if (mode == 1) { +/* 754 */ ret = new Boolean(this.attenuateOn); +/* 755 */ } else if (mode == 2) +/* 756 */ this.attenuateOn = ((Boolean)value).booleanValue(); +/* 757 */ break; +/* */ case 5: +/* 759 */ if (mode == 0) { +/* 760 */ ret = BooleanPropertyEditor.make( +/* 761 */ new Property(this, index, "Do panning"), +/* 762 */ "No", "Yes"); +/* 763 */ } else if (mode == 1) { +/* 764 */ ret = new Boolean(this.panningOn); +/* 765 */ } else if (mode == 2) +/* 766 */ this.panningOn = ((Boolean)value).booleanValue(); +/* 767 */ break; +/* */ case 6: +/* 769 */ if (mode == 0) { +/* 770 */ ret = IntegerPropertyEditor.make( +/* 771 */ new Property(this, index, +/* 772 */ "Room hops till sound dies")); +/* 773 */ } else if (mode == 1) { +/* 774 */ ret = new Integer(this.maxHopcount); +/* 775 */ } else if (mode == 2) +/* 776 */ setHopcount(((Integer)value).intValue()); +/* 777 */ break; +/* */ case 7: +/* 779 */ if (mode == 0) { +/* 780 */ ret = BooleanPropertyEditor.make( +/* 781 */ new Property(this, index, "Door based audibility"), +/* 782 */ "No", "Yes"); +/* 783 */ } else if (mode == 1) { +/* 784 */ ret = new Boolean(getDoorMovementFlag()); +/* 785 */ } else if (mode == 2) +/* 786 */ setDoorMovementFlag(((Boolean)value).booleanValue()); +/* 787 */ break; +/* */ case 8: +/* 789 */ if (mode == 0) { +/* 790 */ ret = BooleanPropertyEditor.make( +/* 791 */ new Property(this, index, "Play after loading"), +/* 792 */ "No", "Yes"); +/* 793 */ } else if (mode == 1) { +/* 794 */ ret = new Boolean(this.playAfterLoading); +/* 795 */ } else if (mode == 2) +/* 796 */ setPlayAfterLoading(((Boolean)value).booleanValue()); +/* 797 */ break; +/* */ case 9: +/* 799 */ if (mode == 0) { +/* 800 */ ret = BooleanPropertyEditor.make( +/* 801 */ new Property(this, index, "Loop Infinite"), +/* 802 */ "No", "Yes"); +/* 803 */ } else if (mode == 1) { +/* 804 */ ret = new Boolean(this.continuous); +/* 805 */ } else if (mode == 2) +/* 806 */ setContinuous(((Boolean)value).booleanValue()); +/* 807 */ break; +/* */ +/* */ default: +/* 810 */ ret = super.properties(index, offset + 10, mode, value); +/* */ } +/* */ +/* 813 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* 818 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 822 */ s.saveVersion(7, classCookie); +/* 823 */ s.saveBoolean(this.playAfterLoading); +/* 824 */ s.saveBoolean(this.doorMovementFlag); +/* 825 */ s.saveBoolean(this.panningOn); +/* 826 */ s.saveBoolean(this.attenuateOn); +/* 827 */ s.saveInt(this.maxHopcount); +/* 828 */ super.saveState(s); +/* 829 */ URL.save(s, this.soundURL); +/* 830 */ s.saveFloat(this.soundVolume); +/* 831 */ s.saveFloat(this.stopDistance); +/* 832 */ s.saveInt(this.repeat); +/* 833 */ s.saveBoolean(this.continuous); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 839 */ int vers = r.restoreVersion(classCookie); +/* 840 */ switch (vers) { +/* */ case 7: +/* 842 */ setPlayAfterLoading(r.restoreBoolean()); +/* 843 */ setDoorMovementFlag(r.restoreBoolean()); +/* 844 */ setPanning(r.restoreBoolean()); +/* 845 */ setAttenuate(r.restoreBoolean()); +/* 846 */ setHopcount(r.restoreInt()); +/* 847 */ super.restoreState(r); +/* 848 */ setURL(URL.restore(r)); +/* 849 */ this.soundVolume = r.restoreFloat(); +/* 850 */ this.stopDistance = r.restoreFloat(); +/* 851 */ this.repeat = r.restoreInt(); +/* 852 */ setContinuous(r.restoreBoolean()); +/* 853 */ break; +/* */ case 6: +/* 855 */ setPlayAfterLoading(r.restoreBoolean()); +/* 856 */ setDoorMovementFlag(r.restoreBoolean()); +/* 857 */ setPanning(r.restoreBoolean()); +/* 858 */ setAttenuate(r.restoreBoolean()); +/* 859 */ setHopcount(r.restoreInt()); +/* 860 */ super.restoreState(r); +/* 861 */ setURL(URL.restore(r)); +/* 862 */ this.soundVolume = r.restoreFloat(); +/* 863 */ this.stopDistance = r.restoreFloat(); +/* 864 */ this.repeat = r.restoreInt(); +/* 865 */ if (this.repeat < 0) +/* 866 */ setContinuous(true); +/* 867 */ break; +/* */ case 5: +/* 869 */ setPlayAfterLoading(r.restoreBoolean()); +/* 870 */ setDoorMovementFlag(r.restoreBoolean()); +/* 871 */ setPanning(r.restoreBoolean()); +/* 872 */ setAttenuate(r.restoreBoolean()); +/* 873 */ setHopcount(r.restoreInt()); +/* 874 */ super.restoreState(r); +/* 875 */ setURL(URL.restore(r)); +/* 876 */ this.soundVolume = r.restoreFloat(); +/* 877 */ this.stopDistance = r.restoreFloat(); +/* 878 */ this.repeat = r.restoreInt(); +/* 879 */ if (this.repeat < 0) +/* 880 */ setContinuous(true); +/* 881 */ break; +/* */ case 4: +/* 883 */ setDoorMovementFlag(r.restoreBoolean()); +/* 884 */ setPanning(r.restoreBoolean()); +/* 885 */ setAttenuate(r.restoreBoolean()); +/* 886 */ setHopcount(r.restoreInt()); +/* 887 */ super.restoreState(r); +/* 888 */ setURL(URL.restore(r)); +/* 889 */ this.soundVolume = r.restoreFloat(); +/* 890 */ this.stopDistance = r.restoreFloat(); +/* 891 */ this.repeat = r.restoreInt(); +/* 892 */ if (this.repeat < 0) +/* 893 */ setContinuous(true); +/* 894 */ break; +/* */ case 3: +/* 896 */ setHopcount(r.restoreInt()); +/* 897 */ super.restoreState(r); +/* 898 */ setURL(URL.restore(r)); +/* 899 */ this.soundVolume = r.restoreFloat(); +/* 900 */ this.stopDistance = r.restoreFloat(); +/* 901 */ this.repeat = r.restoreInt(); +/* 902 */ if (this.repeat < 0) +/* 903 */ setContinuous(true); +/* 904 */ break; +/* */ case 2: +/* 906 */ super.restoreState(r); +/* 907 */ setURL(URL.restore(r)); +/* 908 */ this.soundVolume = r.restoreFloat(); +/* 909 */ this.stopDistance = r.restoreFloat(); +/* 910 */ this.repeat = r.restoreInt(); +/* 911 */ if (this.repeat < 0) +/* 912 */ setContinuous(true); +/* 913 */ break; +/* */ case 1: +/* 915 */ setURL(URL.restore(r)); +/* 916 */ this.soundVolume = r.restoreFloat(); +/* 917 */ this.stopDistance = r.restoreFloat(); +/* 918 */ this.repeat = r.restoreInt(); +/* 919 */ if (this.repeat < 0) +/* 920 */ setContinuous(true); +/* 921 */ break; +/* */ case 0: +/* 923 */ setURL(URL.restore(r)); +/* 924 */ break; +/* */ default: +/* 926 */ throw new TooNewException(); +/* */ } +/* */ +/* */ +/* 930 */ if ((vers < 6) && (this.continuous)) { +/* 931 */ setContinuous(false); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Sound.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SoundCallback.java b/NET/worlds/scape/SoundCallback.java new file mode 100644 index 0000000..fb33983 --- /dev/null +++ b/NET/worlds/scape/SoundCallback.java @@ -0,0 +1,962 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MainTerminalCallback; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.CacheFile; +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SoundCallback +/* */ implements MainCallback, MainTerminalCallback +/* */ { +/* */ public void mainCallback() {} +/* */ +/* */ public void terminalCallback() +/* */ { +/* 947 */ while (!Sound.cachedEntries.isEmpty()) { +/* 948 */ CacheFile file = (CacheFile)Sound.cachedEntries.firstElement(); +/* 949 */ if (IniFile.gamma().getIniInt("sounddebug", 0) > 6) +/* 950 */ System.out.println("terminal unlocking " + file.getLocalName()); +/* 951 */ Sound.cachedEntries.removeElementAt(0); +/* 952 */ file.finalize(); +/* */ } +/* 954 */ Main.unregister(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SoundCallback.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SoundPlayer.java b/NET/worlds/scape/SoundPlayer.java new file mode 100644 index 0000000..0b12bef --- /dev/null +++ b/NET/worlds/scape/SoundPlayer.java @@ -0,0 +1,65 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class SoundPlayer +/* */ { +/* */ Sound owner; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int IS_PLAYING = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int IS_STOPPED = 1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static final int IS_TERMINATED = 2; +/* */ +/* */ +/* */ +/* */ +/* */ public static final int IS_ERROR = 3; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ SoundPlayer(Sound owner) +/* */ { +/* 41 */ this.owner = owner; +/* */ } +/* */ +/* 44 */ public Sound getOwner() { return this.owner; } +/* */ +/* */ public abstract boolean open(float paramFloat1, float paramFloat2, boolean paramBoolean1, boolean paramBoolean2); +/* */ +/* */ public abstract void start(int paramInt); +/* */ +/* */ public abstract boolean position(Point3Temp paramPoint3Temp1, Point3Temp paramPoint3Temp2, Point3Temp paramPoint3Temp3, Point3Temp paramPoint3Temp4); +/* */ +/* */ public abstract int getState(); +/* */ +/* */ public abstract void stop(); +/* */ +/* */ public abstract void close(); +/* */ +/* */ public abstract boolean setVolume(float paramFloat); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SoundPlayer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SoundResource.java b/NET/worlds/scape/SoundResource.java new file mode 100644 index 0000000..a564a8c --- /dev/null +++ b/NET/worlds/scape/SoundResource.java @@ -0,0 +1,167 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SoundResource +/* */ { +/* 38 */ private static SoundResource instance = null; +/* */ +/* */ public static final int RSX = 1; +/* */ +/* */ public static final int RA = 2; +/* */ +/* */ private static void debugOut(int n, String s) +/* */ { +/* 46 */ if (Sound.debugLevel > n) System.out.println(s); +/* */ } +/* */ +/* */ public static SoundResource instance() +/* */ { +/* 51 */ if (instance == null) { +/* 52 */ debugOut(6, "Instantiating a new SoundResource"); +/* 53 */ instance = new SoundResource(); +/* */ } +/* 55 */ return instance; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 64 */ private int currentPlayer = 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 70 */ private int counter = 0; +/* */ +/* */ +/* */ +/* */ +/* 75 */ private boolean isShutdownTime = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncLock(int type) +/* */ { +/* 89 */ debugOut(6, "Calling syncLock with type " + type + " counter " + this.counter); +/* 90 */ if (this.isShutdownTime) +/* 91 */ return false; +/* 92 */ if (type != this.currentPlayer) { +/* 93 */ this.currentPlayer = type; +/* 94 */ if (this.counter > 0) { +/* 95 */ this.isShutdownTime = true; +/* */ } +/* */ else { +/* 98 */ this.currentPlayer = type; +/* 99 */ this.counter = 1; +/* */ } +/* */ } +/* */ else { +/* 103 */ this.counter += 1; } +/* 104 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void asyncLock() +/* */ { +/* 114 */ debugOut(6, "SoundResource::asyncLock with " + this.isShutdownTime); +/* */ +/* 116 */ boolean shutdown = false; +/* 117 */ while (this.isShutdownTime) { +/* 118 */ shutdown = true; +/* 119 */ Thread.yield(); +/* 120 */ debugOut(6, "asyncLock yield"); +/* */ } +/* */ +/* */ +/* */ +/* 125 */ if (shutdown) { +/* 126 */ debugOut(6, "asyncLock: adding artificial delay"); +/* 127 */ try { Thread.sleep(500L); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncUnlock() +/* */ { +/* 139 */ debugOut(6, "SoundResource::syncUnlock with " + this.counter); +/* */ +/* 141 */ boolean rv = false; +/* 142 */ this.counter -= 1; +/* 143 */ if (this.counter <= 0) +/* 144 */ rv = true; +/* 145 */ if ((this.counter <= 0) && (this.isShutdownTime)) { +/* 146 */ this.counter = 1; +/* 147 */ this.isShutdownTime = false; +/* */ } +/* */ +/* 150 */ return rv; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isOK() +/* */ { +/* 159 */ return !this.isShutdownTime; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SoundResource.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SoundState.java b/NET/worlds/scape/SoundState.java new file mode 100644 index 0000000..a98d01f --- /dev/null +++ b/NET/worlds/scape/SoundState.java @@ -0,0 +1,411 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class SoundState +/* */ implements State +/* */ { +/* */ public static final int IDLE = 0; +/* */ public static final int start = 1; +/* */ public static final int intel0 = 1000; +/* */ public static final int intel10 = 1010; +/* */ public static final int intel11 = 1011; +/* */ public static final int intel20 = 1020; +/* */ public static final int intel21 = 1021; +/* */ public static final int intel30 = 1030; +/* */ public static final int intel31 = 1031; +/* */ public static final int intel32 = 1032; +/* */ public static final int intel33 = 1033; +/* */ public static final int realAudio0 = 2000; +/* */ public static final int realAudio10 = 2010; +/* */ public static final int realAudio11 = 2011; +/* 81 */ private static SoundState instance = new SoundState(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void debugOut(int n, String s) +/* */ { +/* 89 */ if (Sound.debugLevel > n) System.out.println(s); +/* */ } +/* */ +/* */ public static State instance() { +/* 93 */ return instance; +/* */ } +/* */ +/* */ public Object doState(StateContext sc, Object obj) { +/* 97 */ Sound sound = (Sound)sc; +/* */ Object rv; +/* 99 */ Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; Object rv; switch (sound.state) { +/* */ case 1: +/* 101 */ rv = start(sound, obj); +/* 102 */ break; +/* */ case 1000: +/* 104 */ rv = intel0(sound, obj); +/* 105 */ break; +/* */ case 1010: +/* 107 */ rv = intel10(sound, obj); +/* 108 */ break; +/* */ case 1011: +/* 110 */ rv = intel11(sound, obj); +/* 111 */ break; +/* */ case 1020: +/* 113 */ rv = intel20(sound, obj); +/* 114 */ break; +/* */ case 1021: +/* 116 */ rv = intel21(sound, obj); +/* 117 */ break; +/* */ case 1030: +/* 119 */ rv = intel30(sound, obj); +/* 120 */ break; +/* */ case 1031: +/* 122 */ rv = intel31(sound, obj); +/* 123 */ break; +/* */ case 1032: +/* 125 */ rv = intel32(sound, obj); +/* 126 */ break; +/* */ case 1033: +/* 128 */ rv = intel33(sound, obj); +/* 129 */ break; +/* */ case 2000: +/* 131 */ rv = realAudio0(sound, obj); +/* 132 */ break; +/* */ case 2010: +/* 134 */ rv = realAudio10(sound, obj); +/* 135 */ break; +/* */ case 2011: +/* 137 */ rv = realAudio11(sound, obj); +/* 138 */ break; +/* */ default: +/* 140 */ rv = error(sound, obj); +/* */ } +/* */ +/* 143 */ return rv; +/* */ } +/* */ +/* */ private Object error(Sound sound, Object obj) { +/* 147 */ debugOut(2, "Unknown state in SoundState " + sound.state); +/* 148 */ return null; +/* */ } +/* */ +/* 151 */ private static URL dummy = URL.make("home:dummy.wav"); +/* */ +/* */ private Object start(Sound sound, Object obj) { +/* 154 */ debugOut(6, "Entering SoundState "); +/* 155 */ assert (sound.backgroundState == 1); +/* */ +/* 157 */ if (sound.isRealAudio(sound.getURL())) { +/* 158 */ sound.changeState(2000); +/* */ } +/* */ else { +/* 161 */ sound.changeState(1000); +/* */ } +/* 163 */ sound.doState(null); +/* 164 */ return null; +/* */ } +/* */ +/* */ private Object intel0(Sound sound, Object obj) { +/* 168 */ debugOut(6, "Entering intel0 "); +/* 169 */ assert (sound.backgroundState == 1); +/* */ +/* */ +/* 172 */ if (!SoundResource.instance().syncLock(1)) { +/* 173 */ return null; +/* */ } +/* 175 */ if (!sound.getURL().isRemote()) { +/* 176 */ sound.changeState(1010); +/* 177 */ BackgroundLoader.get(sound, sound.getURL()); +/* 178 */ return null; +/* */ } +/* 180 */ sound.cachedFile = Cache.getFile(sound.getURL()); +/* 181 */ if (sound.cachedFile.done()) { +/* 182 */ sound.ensureClosure(); +/* 183 */ sound.changeState(1020); +/* 184 */ BackgroundLoader.get(sound, sound.getURL()); +/* 185 */ return null; +/* */ } +/* */ +/* */ +/* 189 */ sound.cachedFile.finalize(); +/* 190 */ sound.cachedFile = null; +/* */ +/* 192 */ sound.changeState(1030); +/* 193 */ BackgroundLoader.get(sound, dummy); +/* 194 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object intel10(Sound sound, Object localName) +/* */ { +/* 201 */ assert (sound.backgroundState == 2); +/* 202 */ assert (localName != null); +/* */ +/* 204 */ SoundResource.instance().asyncLock(); +/* */ +/* 206 */ sound.changeState(1011); +/* */ +/* 208 */ if (sound.openPlayer((URL)localName)) { +/* 209 */ return localName; +/* */ } +/* */ +/* 212 */ debugOut(2, "intel10: couldn't open sound " + sound.getURL()); +/* 213 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Object intel11(Sound sound, Object obj) +/* */ { +/* 222 */ debugOut(6, "Entering intel11 "); +/* 223 */ assert (sound.backgroundState == 1); +/* 224 */ if (obj != null) { +/* 225 */ if (sound.updateSound()) { +/* 226 */ sound.player.start(sound.getRepeat()); +/* */ } +/* */ else +/* 229 */ sound.closePlayer(); +/* */ } +/* 231 */ sound.changeState(0); +/* 232 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object intel20(Sound sound, Object obj) +/* */ { +/* 239 */ debugOut(6, "Entering intel20 "); +/* 240 */ assert (sound.backgroundState == 2); +/* */ +/* 242 */ SoundResource.instance().asyncLock(); +/* */ +/* 244 */ if (sound.openPlayer((URL)obj)) { +/* 245 */ sound.changeState(1021); +/* 246 */ return obj; +/* */ } +/* */ +/* 249 */ debugOut(2, "intel20: couldn't open player on sound " + +/* 250 */ sound.getURL()); +/* 251 */ sound.changeState(1021); +/* 252 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private Object intel21(Sound sound, Object obj) +/* */ { +/* 260 */ debugOut(6, "Entering intel21 "); +/* 261 */ assert (sound.backgroundState == 1); +/* */ +/* 263 */ if (obj == null) { +/* 264 */ sound.unlockCache(); +/* */ } +/* 266 */ else if (sound.updateSound()) { +/* 267 */ debugOut(6, "intel21 starting sound"); +/* 268 */ sound.player.start(sound.getRepeat()); +/* */ } +/* */ else { +/* 271 */ debugOut(6, "intel21 closing player"); +/* 272 */ sound.closePlayer(); +/* */ } +/* */ +/* 275 */ sound.changeState(0); +/* 276 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object intel30(Sound sound, Object obj) +/* */ { +/* 283 */ debugOut(6, "Entering intel30 "); +/* 284 */ assert (sound.backgroundState == 2); +/* */ +/* 286 */ SoundResource.instance().asyncLock(); +/* */ +/* 288 */ if (sound.openPlayer(dummy)) { +/* 289 */ sound.changeState(1031); +/* 290 */ return obj; +/* */ } +/* */ +/* 293 */ debugOut(2, "intel30: couldn't open player on file " + +/* 294 */ sound.getURL()); +/* 295 */ sound.changeState(1031); +/* 296 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private Object intel31(Sound sound, Object obj) +/* */ { +/* 304 */ debugOut(6, "Entering intel31 "); +/* 305 */ assert (sound.backgroundState == 1); +/* */ +/* 307 */ if (obj == null) { +/* 308 */ sound.changeState(0); +/* */ } +/* 310 */ else if (sound.updateSound()) { +/* 311 */ sound.player.start(1); +/* 312 */ sound.changeState(1032); +/* 313 */ BackgroundLoader.get(sound, sound.getURL()); +/* */ } +/* */ else { +/* 316 */ sound.closePlayer(); +/* 317 */ sound.changeState(0); +/* */ } +/* */ +/* 320 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object intel32(Sound sound, Object obj) +/* */ { +/* 327 */ debugOut(6, "Entering intel32 "); +/* 328 */ assert (sound.backgroundState == 2); +/* */ +/* 330 */ sound.changeState(1033); +/* 331 */ return obj; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object intel33(Sound sound, Object obj) +/* */ { +/* 338 */ debugOut(6, "Entering intel33 "); +/* 339 */ assert (sound.backgroundState == 1); +/* */ +/* 341 */ if ((obj != null) && (sound.playAfterLoading)) { +/* 342 */ sound.closePlayer(); +/* */ +/* */ +/* 345 */ sound.changeState(1000); +/* 346 */ sound.doState(obj); +/* */ } +/* */ else { +/* 349 */ sound.changeState(0); } +/* 350 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object realAudio0(Sound sound, Object obj) +/* */ { +/* 357 */ debugOut(6, "Entering RealAudio0 "); +/* 358 */ assert (sound.backgroundState == 1); +/* */ +/* */ +/* 361 */ if (!SoundResource.instance().syncLock(2)) { +/* 362 */ return null; +/* */ } +/* */ +/* 365 */ sound.changeState(2010); +/* 366 */ BackgroundLoader.get(sound, dummy); +/* 367 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object realAudio10(Sound sound, Object obj) +/* */ { +/* 374 */ debugOut(6, "Entering realAudio10 "); +/* 375 */ assert (sound.backgroundState == 2); +/* */ +/* 377 */ SoundResource.instance().asyncLock(); +/* */ +/* 379 */ if (sound.openPlayer(sound.getURL())) { +/* 380 */ sound.changeState(2011); +/* 381 */ return sound; +/* */ } +/* */ +/* 384 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private Object realAudio11(Sound sound, Object obj) +/* */ { +/* 391 */ debugOut(6, "Entering realAudio11 "); +/* 392 */ assert (sound.backgroundState == 1); +/* */ +/* 394 */ if (obj != null) { +/* 395 */ if (sound.updateSound()) { +/* 396 */ sound.player.start(sound.getRepeat()); +/* */ } +/* */ else { +/* 399 */ sound.closePlayer(); +/* */ } +/* */ } +/* 402 */ sound.changeState(0); +/* 403 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SoundState.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SpinBehavior.java b/NET/worlds/scape/SpinBehavior.java new file mode 100644 index 0000000..f41f633 --- /dev/null +++ b/NET/worlds/scape/SpinBehavior.java @@ -0,0 +1,152 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SpinBehavior +/* */ extends SwitchableBehavior +/* */ implements FrameHandler +/* */ { +/* */ protected float cycleTime; +/* */ protected float ax; +/* */ protected float ay; +/* */ protected float az; +/* */ +/* */ public SpinBehavior() +/* */ { +/* 31 */ this(5.0F); +/* */ } +/* */ +/* */ public SpinBehavior(float cycleTime) +/* */ { +/* 36 */ this(cycleTime, 0.0F, 0.0F, 1.0F); +/* */ } +/* */ +/* */ public SpinBehavior(Point3Temp axis) +/* */ { +/* 41 */ this(5.0F, axis); +/* */ } +/* */ +/* */ public SpinBehavior(float ax, float ay, float az) +/* */ { +/* 46 */ this(5.0F, ax, ay, az); +/* */ } +/* */ +/* */ public SpinBehavior(float cycleTime, Point3Temp axis) +/* */ { +/* 51 */ this(cycleTime, axis.x, axis.y, axis.z); +/* */ } +/* */ +/* */ public SpinBehavior(float cycleTime, float ax, float ay, float az) +/* */ { +/* 56 */ this.cycleTime = cycleTime; +/* 57 */ this.ax = ax; +/* 58 */ this.ay = ay; +/* 59 */ this.az = az; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 65 */ public float getCycleTime() { return this.cycleTime; } +/* 66 */ public void setCycleTime(float t) { this.cycleTime = t; } +/* */ +/* 68 */ public Point3Temp getAxis() { return Point3Temp.make(this.ax, this.ay, this.az); } +/* */ +/* */ public void setAxis(Point3Temp axis) { +/* 71 */ this.ax = axis.x; +/* 72 */ this.ay = axis.y; +/* 73 */ this.az = axis.z; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 78 */ if ((this.enabled) && (this.cycleTime > 0.0F)) +/* 79 */ e.receiver.spin(this.ax, this.ay, this.az, 0.36F * e.dt / this.cycleTime); +/* 80 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 89 */ Object ret = null; +/* 90 */ switch (index - offset) { +/* */ case 0: +/* 92 */ if (mode == 0) { +/* 93 */ ret = FloatPropertyEditor.make( +/* 94 */ new Property(this, index, "Cycle Time")); +/* 95 */ } else if (mode == 1) { +/* 96 */ ret = new Float(this.cycleTime); +/* 97 */ } else if (mode == 2) +/* 98 */ this.cycleTime = ((Float)value).floatValue(); +/* 99 */ break; +/* */ case 1: +/* 101 */ if (mode == 0) { +/* 102 */ ret = Point3PropertyEditor.make( +/* 103 */ new Property(this, index, "Axis")); +/* 104 */ } else if (mode == 1) { +/* 105 */ ret = new Point3(getAxis()); +/* 106 */ } else if (mode == 2) +/* 107 */ setAxis((Point3)value); +/* 108 */ break; +/* */ default: +/* 110 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 112 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 117 */ return +/* */ +/* 119 */ super.toString() + "[axis " + getAxis() + ", cycleTime " + this.cycleTime + ", enabled " + this.enabled + "]"; +/* */ } +/* */ +/* 122 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 126 */ s.saveVersion(0, classCookie); +/* 127 */ s.saveFloat(this.cycleTime); +/* 128 */ s.saveFloat(this.ax); +/* 129 */ s.saveFloat(this.ay); +/* 130 */ s.saveFloat(this.az); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 135 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 137 */ this.cycleTime = r.restoreFloat(); +/* 138 */ this.ax = r.restoreFloat(); +/* 139 */ this.ay = r.restoreFloat(); +/* 140 */ this.az = r.restoreFloat(); +/* 141 */ break; +/* */ default: +/* 143 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SpinBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StandardTexture.java b/NET/worlds/scape/StandardTexture.java new file mode 100644 index 0000000..2b3df13 --- /dev/null +++ b/NET/worlds/scape/StandardTexture.java @@ -0,0 +1,79 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StandardTexture +/* */ extends Texture +/* */ implements Persister +/* */ { +/* */ private String urlName; +/* */ +/* */ public StandardTexture(String urlName, String filename) +/* */ { +/* 29 */ this.urlName = urlName; +/* 30 */ makeTexture(urlName, filename); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected StandardTexture() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void makeTexture(String urlName, String filename) +/* */ { +/* 45 */ this.textureID = new ImageConverter(urlName, filename).convert(); +/* */ } +/* */ +/* */ +/* */ +/* 50 */ public String getName() { return this.urlName; } +/* */ +/* 52 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 56 */ s.saveVersion(0, classCookie); +/* 57 */ super.saveState(s); +/* 58 */ s.saveString(this.urlName); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 63 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 65 */ super.restoreState(r); +/* 66 */ this.urlName = r.restoreString(); +/* 67 */ makeTexture(this.urlName, this.urlName); +/* 68 */ break; +/* */ default: +/* 70 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StandardTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StandardTextureDecoder.java b/NET/worlds/scape/StandardTextureDecoder.java new file mode 100644 index 0000000..0d22571 --- /dev/null +++ b/NET/worlds/scape/StandardTextureDecoder.java @@ -0,0 +1,175 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class StandardTextureDecoder +/* */ extends TextureDecoder +/* */ { +/* 156 */ private String exts = "gif;jpg;jpeg;jpe;jfif;xbm"; +/* */ +/* */ +/* */ protected String getExts() +/* */ { +/* 161 */ return this.exts; +/* */ } +/* */ +/* */ +/* */ protected Texture read(String urlName, String filename) +/* */ { +/* 167 */ return new StandardTexture(urlName, filename); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StandardTextureDecoder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StartupSensor.java b/NET/worlds/scape/StartupSensor.java new file mode 100644 index 0000000..92b5bb4 --- /dev/null +++ b/NET/worlds/scape/StartupSensor.java @@ -0,0 +1,77 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StartupSensor +/* */ extends Sensor +/* */ implements FrameHandler +/* */ { +/* 26 */ private boolean hasTriggered = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void addAction(Action o) +/* */ { +/* 34 */ this.hasTriggered = false; +/* 35 */ super.addAction(o); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 42 */ if (!this.hasTriggered) +/* */ { +/* 44 */ this.hasTriggered = true; +/* 45 */ trigger(e); +/* */ } +/* 47 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 53 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 57 */ s.saveVersion(0, classCookie); +/* 58 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 63 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 65 */ super.restoreState(r); +/* 66 */ break; +/* */ default: +/* 68 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StartupSensor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/State.java b/NET/worlds/scape/State.java new file mode 100644 index 0000000..133145f --- /dev/null +++ b/NET/worlds/scape/State.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface State +{ + public abstract Object doState(StateContext paramStateContext, Object paramObject); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\State.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StateContext.java b/NET/worlds/scape/StateContext.java new file mode 100644 index 0000000..caedec9 --- /dev/null +++ b/NET/worlds/scape/StateContext.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface StateContext +{ + public abstract void changeState(int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StateContext.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StdoutAction.java b/NET/worlds/scape/StdoutAction.java new file mode 100644 index 0000000..37a7f09 --- /dev/null +++ b/NET/worlds/scape/StdoutAction.java @@ -0,0 +1,143 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StdoutAction +/* */ extends Action +/* */ { +/* 25 */ String txt = null; +/* 26 */ boolean dumpArg = false; +/* */ +/* */ +/* */ +/* */ +/* */ public StdoutAction() {} +/* */ +/* */ +/* */ +/* */ public StdoutAction(String text) +/* */ { +/* 37 */ this.txt = text; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 47 */ if (this.txt != null) { +/* 48 */ System.out.println(this.txt); +/* */ } else +/* 50 */ System.out.println("StdoutAction " + getName() + ", no text!"); +/* 51 */ if (this.dumpArg) +/* 52 */ if (arg == null) { +/* 53 */ System.out.println(""); +/* */ } else +/* 55 */ System.out.println("<" + arg + ">"); +/* 56 */ System.out.flush(); +/* */ +/* 58 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 69 */ Object ret = null; +/* 70 */ switch (index - offset) { +/* */ case 0: +/* 72 */ if (mode == 0) { +/* 73 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 74 */ "Text Out")); +/* 75 */ } else if (mode == 1) { +/* 76 */ ret = this.txt; +/* 77 */ } else if (mode == 2) +/* 78 */ this.txt = ((String)value); +/* 79 */ break; +/* */ case 1: +/* 81 */ if (mode == 0) { +/* 82 */ ret = BooleanPropertyEditor.make( +/* 83 */ new Property(this, index, "Dump Event"), +/* 84 */ "Don't print event", "Print event"); +/* 85 */ } else if (mode == 1) { +/* 86 */ ret = new Boolean(this.dumpArg); +/* 87 */ } else if (mode == 2) +/* 88 */ this.dumpArg = ((Boolean)value).booleanValue(); +/* 89 */ break; +/* */ default: +/* 91 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 93 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 100 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 104 */ s.saveVersion(1, classCookie); +/* 105 */ super.saveState(s); +/* 106 */ s.saveString(this.txt); +/* 107 */ s.saveBoolean(this.dumpArg); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 113 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 115 */ super.restoreState(r); +/* 116 */ this.txt = r.restoreString(); +/* 117 */ r.setOldFlag(); +/* 118 */ break; +/* */ case 1: +/* 120 */ super.restoreState(r); +/* 121 */ this.txt = r.restoreString(); +/* 122 */ this.dumpArg = r.restoreBoolean(); +/* 123 */ break; +/* */ default: +/* 125 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 135 */ return super.toString() + "[" + this.txt + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StdoutAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StopRecordingAction.java b/NET/worlds/scape/StopRecordingAction.java new file mode 100644 index 0000000..9792e3f --- /dev/null +++ b/NET/worlds/scape/StopRecordingAction.java @@ -0,0 +1,52 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.BlackBox; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StopRecordingAction +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister p) +/* */ { +/* 16 */ BlackBox.getInstance().stop(); +/* 17 */ return null; +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 23 */ return super.properties(index, offset, mode, value); +/* */ } +/* */ +/* 26 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 30 */ s.saveVersion(1, classCookie); +/* 31 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 36 */ switch (r.restoreVersion(classCookie)) +/* */ { +/* */ case 1: +/* 39 */ super.restoreState(r); +/* 40 */ break; +/* */ +/* */ default: +/* 43 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StopRecordingAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StringAttribute.java b/NET/worlds/scape/StringAttribute.java new file mode 100644 index 0000000..fa57f66 --- /dev/null +++ b/NET/worlds/scape/StringAttribute.java @@ -0,0 +1,111 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StringAttribute +/* */ extends Attribute +/* */ { +/* */ public StringAttribute(int attrID) +/* */ { +/* 20 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 28 */ String value = ""; +/* */ +/* */ +/* */ public StringAttribute() {} +/* */ +/* */ +/* */ public void set(String x) +/* */ { +/* 36 */ this.value = x; +/* */ +/* 38 */ noteChange(); +/* */ } +/* */ +/* */ public String get() { +/* 42 */ return this.value; +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException { +/* 46 */ s.writeUTF(this.value); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException { +/* 50 */ this.value = ds.readUTF(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 59 */ Object ret = null; +/* 60 */ switch (index - offset) { +/* */ case 0: +/* 62 */ if (mode == 0) { +/* 63 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 64 */ "value")); +/* 65 */ } else if (mode == 1) { +/* 66 */ ret = get(); +/* 67 */ } else if (mode == 2) +/* 68 */ set((String)value); +/* 69 */ break; +/* */ default: +/* 71 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 73 */ return ret; +/* */ } +/* */ +/* */ +/* 77 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 81 */ s.saveVersion(0, classCookie); +/* 82 */ super.saveState(s); +/* */ +/* 84 */ s.saveString(this.value); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 89 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 91 */ super.restoreState(r); +/* 92 */ this.value = r.restoreString(); +/* 93 */ break; +/* */ default: +/* 95 */ throw new TooNewException(); +/* */ } +/* */ +/* 98 */ set(this.value); +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 103 */ return super.toString() + "[" + get() + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StringAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StringFieldEditorDialog.java b/NET/worlds/scape/StringFieldEditorDialog.java new file mode 100644 index 0000000..cf4b7b8 --- /dev/null +++ b/NET/worlds/scape/StringFieldEditorDialog.java @@ -0,0 +1,53 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class StringFieldEditorDialog +/* */ extends FieldEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ Property property; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ StringFieldEditorDialog(EditTile parent, String title, Property property) +/* */ { +/* 26 */ super(parent, title); +/* 27 */ this.property = property; +/* 28 */ ready(); +/* */ } +/* */ +/* */ protected String getValue() +/* */ { +/* 33 */ String s = (String)this.property.get(); +/* 34 */ return s != null ? s : ""; +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 39 */ if (text.length() == 0) { +/* 40 */ if (!this.property.canSetNull()) +/* 41 */ return false; +/* 42 */ text = null; +/* */ } +/* 44 */ this.parent.addUndoableSet(this.property, text); +/* 45 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StringFieldEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StringPropertyEditor.java b/NET/worlds/scape/StringPropertyEditor.java new file mode 100644 index 0000000..22a407f --- /dev/null +++ b/NET/worlds/scape/StringPropertyEditor.java @@ -0,0 +1,71 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StringPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private StringPropertyEditor(Property property) +/* */ { +/* 52 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 57 */ return new StringFieldEditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) +/* */ { +/* 62 */ property.setPropertyType(3); +/* 63 */ return property.setEditor(new StringPropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StringPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/StringTexture.java b/NET/worlds/scape/StringTexture.java new file mode 100644 index 0000000..f5c3fe4 --- /dev/null +++ b/NET/worlds/scape/StringTexture.java @@ -0,0 +1,119 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class StringTexture +/* */ extends Texture +/* */ implements Persister +/* */ { +/* */ private String _text; +/* */ private String _font; +/* */ private int _size; +/* */ private Color _fore; +/* */ private Color _back; +/* */ private char[] _array; +/* */ private int _length; +/* */ +/* */ static {} +/* */ +/* */ public StringTexture(String text, String font, int size, Color fore, Color back) +/* */ { +/* 36 */ this._text = text; +/* 37 */ this._font = font; +/* 38 */ this._size = size; +/* 39 */ this._fore = fore; +/* 40 */ this._back = back; +/* 41 */ this._array = text.toCharArray(); +/* 42 */ this._length = text.length(); +/* 43 */ makeStringTexture(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected StringTexture() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 68 */ private static Object classCookie = new Object(); +/* */ +/* */ private native void makeStringTexture(); +/* */ +/* 72 */ public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie); +/* 73 */ super.saveState(s); +/* 74 */ s.saveString(this._text); +/* 75 */ s.saveString(this._font); +/* 76 */ s.saveInt(this._size); +/* 77 */ s.saveInt(this._fore.getRGB()); +/* 78 */ s.saveInt(this._back.getRGB()); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 83 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 85 */ super.restoreState(r); +/* 86 */ this._text = r.restoreString(); +/* 87 */ this._array = this._text.toCharArray(); +/* 88 */ this._length = this._text.length(); +/* 89 */ this._font = r.restoreString(); +/* 90 */ this._size = r.restoreInt(); +/* 91 */ this._fore = new Color(r.restoreInt()); +/* 92 */ this._back = new Color(r.restoreInt()); +/* 93 */ makeStringTexture(); +/* 94 */ break; +/* */ default: +/* 96 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* 100 */ public String getText() { return this._text; } +/* 101 */ public String getFont() { return this._font; } +/* 102 */ public int getSize() { return this._size; } +/* 103 */ public Color getForegroundColor() { return this._fore; } +/* 104 */ public Color getBackgroundColor() { return this._back; } +/* */ +/* */ public String toString() { +/* 107 */ return +/* */ +/* */ +/* */ +/* 111 */ super.toString() + "[" + this._text + ", Font " + this._font + ", Size " + this._size + ", Forground " + this._fore + ", Background " + this._back + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\StringTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SubclumpShape.java b/NET/worlds/scape/SubclumpShape.java new file mode 100644 index 0000000..c5a02c8 --- /dev/null +++ b/NET/worlds/scape/SubclumpShape.java @@ -0,0 +1,81 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SubclumpShape +/* */ extends Shape +/* */ implements ShapeLoaderListener +/* */ { +/* 11 */ private Material pendingMaterial = null; +/* */ +/* */ private static final boolean debug = false; +/* */ +/* */ public void setMaterial(Material m) +/* */ { +/* 17 */ SuperRoot parentObj = getOwner(); +/* */ +/* 19 */ if (!(parentObj instanceof Shape)) +/* */ { +/* */ +/* */ +/* */ +/* 24 */ super.setMaterial(m); +/* 25 */ return; +/* */ } +/* */ +/* 28 */ Shape parent = (Shape)parentObj; +/* */ +/* 30 */ if (!parent.isFullyLoaded()) +/* */ { +/* */ +/* */ +/* 34 */ parent.addLoadListener(this); +/* 35 */ this.pendingMaterial = m; +/* */ } +/* */ else { +/* 38 */ super.setMaterial(m); +/* */ } +/* */ } +/* */ +/* */ protected synchronized void addRwChildren(WObject container) { +/* 43 */ SuperRoot o = getOwner(); +/* */ +/* 45 */ if ((o instanceof Shape)) +/* */ { +/* 47 */ Shape parent = (Shape)o; +/* 48 */ if (!parent.isFullyLoaded()) +/* */ { +/* 50 */ setState(LOADING, null); +/* 51 */ parent.addLoadListener(this); +/* */ } +/* */ } +/* */ +/* 55 */ super.addRwChildren(container); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void notifyShapeLoaded(Shape s) +/* */ { +/* 63 */ setState(NORMAL, null); +/* */ +/* 65 */ shapeRedraw(); +/* */ +/* 67 */ if (this.pendingMaterial != null) +/* */ { +/* */ +/* */ +/* 71 */ super.setMaterial(this.pendingMaterial); +/* */ } +/* 73 */ this.pendingMaterial = null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SubclumpShape.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SuperRoot.java b/NET/worlds/scape/SuperRoot.java new file mode 100644 index 0000000..9a3b9e7 --- /dev/null +++ b/NET/worlds/scape/SuperRoot.java @@ -0,0 +1,742 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.ByteArrayInputStream; +/* */ import java.io.ByteArrayOutputStream; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.FileNotFoundException; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SuperRoot +/* */ implements Properties, Persister +/* */ { +/* */ private String name; +/* */ +/* */ public final String getShortClassName() +/* */ { +/* 128 */ String s = getClass().getName(); +/* */ int index; +/* 130 */ if ((index = s.lastIndexOf('.')) != -1) +/* 131 */ s = s.substring(index + 1); +/* 132 */ return s; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getName() +/* */ { +/* 150 */ if (this.name == null) { +/* 151 */ int digits = 0; +/* 152 */ String classname = getShortClassName(); +/* */ +/* 154 */ Enumeration en = getRoot().getDeepOwned(); +/* */ +/* 156 */ while (en.hasMoreElements()) { +/* 157 */ SuperRoot x = (SuperRoot)en.nextElement(); +/* 158 */ if ((x.name != null) && (x.name.startsWith(classname))) { +/* */ try +/* */ { +/* 161 */ int tmp = Integer.valueOf( +/* 162 */ x.name.substring(classname.length())) +/* 163 */ .intValue(); +/* 164 */ if (tmp > digits) { +/* 165 */ digits = tmp; +/* */ } +/* */ } +/* */ catch (NumberFormatException localNumberFormatException) {} +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 174 */ digits++; +/* */ +/* */ +/* */ +/* 178 */ this.name = (classname + digits); +/* */ } +/* */ +/* 181 */ return this.name; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String getNameMaybeNull() +/* */ { +/* 189 */ return this.name; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setName(String v) +/* */ { +/* 200 */ if ((v == null) && +/* 201 */ (this.owner != null)) { +/* 202 */ Object[] arguments = { new String(this.owner.getName()) }; +/* 203 */ Console.println(MessageFormat.format( +/* 204 */ Console.message("Warning-null-name"), arguments)); +/* */ } +/* */ +/* 207 */ this.name = v; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static SuperRoot nameSearch(Enumeration enumeration, String name) +/* */ { +/* 216 */ while (enumeration.hasMoreElements()) { +/* 217 */ SuperRoot n = (SuperRoot)enumeration.nextElement(); +/* 218 */ if (name.equals(n.name)) { +/* 219 */ return n; +/* */ } +/* */ } +/* 222 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 236 */ protected static String helpURL = "home:internal/"; +/* */ private SuperRoot owner; +/* */ +/* 239 */ public URL getHelpURL() { String helpString = helpURL + getClass().getName() + +/* 240 */ Console.message(".html"); +/* 241 */ URL helpPage = URL.make(helpString); +/* */ +/* 243 */ if (Console.wasHttpNoSuchFile(helpString)) +/* 244 */ helpPage = URL.make(helpURL + getClass().getName() + ".html"); +/* 245 */ return helpPage; +/* */ } +/* */ +/* */ +/* */ +/* */ public URL getHelpURL(Property p) +/* */ { +/* 252 */ String namesub = p.getName().replace(' ', '_'); +/* 253 */ String helpString = helpURL + getClass().getName() + "#" + namesub + +/* 254 */ Console.message(".html"); +/* 255 */ URL helpPage = URL.make(helpString); +/* 256 */ if (Console.wasHttpNoSuchFile(helpString)) +/* 257 */ helpPage = URL.make(helpURL + getClass().getName() + "#" + namesub + +/* 258 */ ".html"); +/* 259 */ return helpPage; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 267 */ if (isActive()) { +/* 268 */ return getName(); +/* */ } +/* 270 */ return getName() + "(inactive)"; +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 277 */ Object ret = null; +/* 278 */ switch (index - offset) { +/* */ case 0: +/* 280 */ if (mode == 0) { +/* 281 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 282 */ "Name")); +/* 283 */ } else if (mode == 1) { +/* 284 */ ret = getName(); +/* 285 */ } else if (mode == 4) { +/* 286 */ setName(null); +/* 287 */ } else if (mode == 2) { +/* 288 */ String s = (String)value; +/* 289 */ if ((s.equals(this.name)) || (this.owner == null) || +/* 290 */ (nameSearch(getRoot().getDeepOwned(), s) == null)) { +/* 291 */ setName((String)value); +/* */ } else { +/* 293 */ Object[] arguments = { new String(s), +/* 294 */ new String(getRoot().getName()) }; +/* 295 */ Console.println(MessageFormat.format( +/* 296 */ Console.message("Name-in-use"), arguments)); +/* */ } +/* */ } +/* 299 */ break; +/* */ +/* */ case 1: +/* 302 */ if (mode == 0) +/* */ { +/* */ +/* 305 */ ret = URLPropertyEditor.make(new Property(this, index, +/* 306 */ "Source URL").allowSetNull(), "*wob", false); +/* 307 */ } else if (mode == 1) { +/* 308 */ ret = this.sourceURL; +/* 309 */ } else if (mode == 2) +/* 310 */ setSourceURL((URL)value); +/* 311 */ break; +/* */ +/* */ default: +/* 314 */ throw new NoSuchPropertyException(); +/* */ } +/* 316 */ return ret; +/* */ } +/* */ +/* */ public Object propertyParent() { +/* 320 */ return this.owner; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public SuperRoot getOwner() +/* */ { +/* 328 */ return this.owner; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void discard() +/* */ { +/* 342 */ detach(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void add(SuperRoot x) +/* */ { +/* 353 */ if ((x.owner != null) && (x.owner != this)) { +/* 354 */ System.out.println("double-setting owner of " + x + " from " + +/* 355 */ x.owner + " to " + this); +/* 356 */ throw new Error("double-setting owner of " + x); +/* */ } +/* 358 */ x.noteAddingTo(this); +/* 359 */ x.owner = this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 368 */ if (this.owner != null) +/* */ { +/* 370 */ this.owner.noteUnadding(this); +/* */ +/* 372 */ this.owner = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot s) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteUnadding(SuperRoot s) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getOwned() +/* */ { +/* 395 */ return new ShallowEnumeration(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Enumeration getDeepOwned() +/* */ { +/* 404 */ return new DeepEnumeration(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public World getWorld() +/* */ { +/* 420 */ SuperRoot owner = getOwner(); +/* */ +/* 422 */ if (owner == null) { +/* 423 */ return null; +/* */ } +/* 425 */ return owner.getWorld(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Room getRoom() +/* */ { +/* 436 */ SuperRoot owner = getOwner(); +/* */ +/* 438 */ if (owner == null) { +/* 439 */ return null; +/* */ } +/* 441 */ return owner.getRoom(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public SuperRoot getRoot() +/* */ { +/* 449 */ SuperRoot owner = getOwner(); +/* */ +/* 451 */ if (owner == null) { +/* 452 */ return this; +/* */ } +/* 454 */ return owner.getRoot(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isActive() +/* */ { +/* 464 */ return getWorld() != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public URL getSourceURL() +/* */ { +/* 476 */ return this.sourceURL; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setSourceURL(URL s) +/* */ { +/* 484 */ this.sourceURL = s; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public URL getContainingSourceURL() +/* */ { +/* 492 */ if (this.sourceURL != null) { +/* 493 */ return this.sourceURL; +/* */ } +/* 495 */ if (this.owner != null) { +/* 496 */ return this.owner.getContainingSourceURL(); +/* */ } +/* 498 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void markEdited() +/* */ { +/* 511 */ if (this.owner != null) { +/* 512 */ this.owner.markEdited(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public static SuperRoot readFile(String urlLocal, URL url) +/* */ { +/* */ Exception ex; +/* */ +/* */ try +/* */ { +/* 524 */ Restorer r = new Restorer(urlLocal, url); +/* 525 */ SuperRoot o = (SuperRoot)r.restore(); +/* 526 */ r.done(); +/* 527 */ o.setSourceURL(url); +/* 528 */ return o; +/* */ } catch (FileNotFoundException e) { +/* 530 */ ex = e; +/* */ } catch (ClassCastException e) { Exception ex; +/* 532 */ ex = e; +/* */ } catch (IOException e) { Exception ex; +/* 534 */ ex = e; +/* */ } catch (TooNewException e) { Exception ex; +/* 536 */ ex = e; +/* */ } catch (BadFormatException e) { Exception ex; +/* 538 */ ex = e; +/* */ } +/* */ +/* */ +/* */ +/* 543 */ return null; +/* */ } +/* */ +/* */ public static SuperRoot readFile(URL url) { +/* 547 */ return readFile(url.unalias(), url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected URL sourceURL; +/* */ +/* */ +/* */ +/* */ +/* */ public void loadInit() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveFile(URL url) +/* */ throws IOException +/* */ { +/* 568 */ if ((this instanceof NonPersister)) { +/* 569 */ throw new IOException("Can't save NonPersister"); +/* */ } +/* 571 */ Saver s = new Saver(url); +/* 572 */ s.save(this); +/* 573 */ s.done(); +/* 574 */ setSourceURL(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object clone() +/* */ { +/* 584 */ byte[] b = getByteCopy(); +/* */ +/* 586 */ return getCopyFromBytes(b); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public byte[] getByteCopy() +/* */ { +/* 595 */ if ((this instanceof NonPersister)) { +/* 596 */ return null; +/* */ } +/* 598 */ ByteArrayOutputStream buffer = new ByteArrayOutputStream(); +/* */ try { +/* 600 */ Saver saver = new Saver(new DataOutputStream(buffer)); +/* 601 */ saver.save(this); +/* 602 */ saver.done(); +/* 603 */ return buffer.toByteArray(); +/* */ } catch (Exception e) { +/* 605 */ e.printStackTrace(System.out); +/* 606 */ throw new Error("Can't save"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public static SuperRoot getCopyFromBytes(byte[] b) +/* */ { +/* 615 */ if (b == null) { +/* 616 */ return null; +/* */ } +/* */ try { +/* 619 */ Restorer r = new Restorer(new DataInputStream( +/* 620 */ new ByteArrayInputStream(b))); +/* 621 */ SuperRoot obj = (SuperRoot)r.restore(); +/* 622 */ r.done(); +/* 623 */ return obj; +/* */ } catch (Exception e) { +/* 625 */ e.printStackTrace(System.out); +/* 626 */ throw new Error("Can't restore"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 632 */ private static Object classCookie = new Object(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 643 */ s.saveVersion(2, classCookie); +/* 644 */ s.saveString(this.name); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 658 */ restoreStateSuperRoot(r); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final void restoreStateSuperRoot(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 668 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 670 */ r.setOldFlag(); +/* 671 */ String n; if ((n = r.restoreString()) != null) +/* 672 */ setName(n); +/* 673 */ r.restoreMaybeNull(); +/* 674 */ break; +/* */ case 0: +/* 676 */ r.setOldFlag(); +/* */ case 2: String n; +/* 678 */ if ((n = r.restoreString()) != null) +/* 679 */ setName(n); +/* 680 */ break; +/* */ +/* */ default: +/* 683 */ throw new TooNewException(); +/* */ } +/* */ +/* */ +/* */ String n; +/* */ } +/* */ +/* */ +/* */ public void postRestore(int version) {} +/* */ +/* */ +/* 694 */ static Hashtable, Integer> finalizedClasses = new Hashtable(); +/* */ +/* */ public static void finalizeCounter(Object o) { +/* 697 */ Class c = o.getClass(); +/* 698 */ Integer icnt = (Integer)finalizedClasses.get(c); +/* 699 */ int cnt = 0; +/* 700 */ if (icnt != null) { +/* 701 */ cnt = icnt.intValue(); +/* */ } +/* 703 */ cnt++; if (cnt == 1000) { +/* 704 */ System.out.println("Finalized 1000 times: " + c); +/* 705 */ cnt = 0; +/* */ } +/* */ +/* 708 */ finalizedClasses.put(o.getClass(), new Integer(cnt)); +/* */ } +/* */ +/* */ +/* */ protected void finalize() {} +/* */ +/* */ +/* 715 */ static Hashtable, Integer> classCounter = new Hashtable(); +/* */ +/* */ public static void countClass(Object o, int inc) { +/* 718 */ Class c = o.getClass(); +/* 719 */ Integer icnt = (Integer)classCounter.get(c); +/* 720 */ int cnt = 0; +/* 721 */ if (icnt != null) { +/* 722 */ cnt = icnt.intValue(); +/* */ } +/* 724 */ cnt += inc; +/* */ +/* 726 */ classCounter.put(c, new Integer(cnt)); +/* */ } +/* */ +/* */ public static void printClassCounts() { +/* 730 */ for (Enumeration> e = classCounter.keys(); e.hasMoreElements();) { +/* 731 */ Class c = (Class)e.nextElement(); +/* 732 */ System.out.println("Class " + c.getName() + " has " + +/* 733 */ classCounter.get(c)); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SuperRoot.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Surface.java b/NET/worlds/scape/Surface.java new file mode 100644 index 0000000..5e9dd93 --- /dev/null +++ b/NET/worlds/scape/Surface.java @@ -0,0 +1,290 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ import java.awt.Color; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Surface +/* */ extends WObject +/* */ implements Animatable +/* */ { +/* */ private int[] polygonIDs; +/* */ protected Material material; +/* */ +/* */ public Surface(Material m) +/* */ { +/* 58 */ if ((m != null) && (m.getOwner() != null)) { +/* 59 */ m = (Material)m.clone(); +/* */ } +/* 61 */ setMaterial(m); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 72 */ nativeInit(); +/* */ } +/* */ +/* */ public void loadInit() { +/* 76 */ setMaterial(null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 86 */ super.markVoid(); +/* */ +/* */ +/* 89 */ this.polygonIDs = null; +/* */ +/* 91 */ this.material.markVoid(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recursiveAddRwChildren(WObject container) +/* */ { +/* 100 */ this.material.addRwChildren(); +/* */ +/* 102 */ super.recursiveAddRwChildren(container); +/* */ +/* 104 */ int hres = this.material.getHRes(); +/* 105 */ int vres = this.material.getVRes(); +/* */ +/* */ +/* */ +/* 109 */ int numVerts = getNumVerts(); +/* */ +/* */ +/* 112 */ if ((numVerts == 4) && ((this.material.getHiRes()) || (uvOutOfRange()))) { +/* 113 */ int numTiles = addSubPolys(hres, vres); +/* 114 */ if ((numTiles >= 100) && (Console.getFrame().isShaperVisible())) { +/* 115 */ Object[] arguments = { new Integer(numTiles), +/* 116 */ new String(getRoom().getName()), new String(getName()) }; +/* 117 */ Console.println(MessageFormat.format( +/* 118 */ Console.message("Memory-hog"), arguments)); +/* */ } +/* */ } else { +/* 121 */ assert (numVerts > 0); +/* 122 */ int[] vi = new int[numVerts]; +/* */ +/* 124 */ for (int i = 0; i < numVerts; i++) { +/* 125 */ vi[i] = (i + 1); +/* */ } +/* 127 */ this.polygonIDs = new int[1]; +/* 128 */ addPolygon(vi); +/* */ } +/* */ +/* 131 */ nativeSetMaterial(); +/* 132 */ doneWithEditing(); +/* */ } +/* */ +/* */ protected void setVFlip(boolean b) { +/* 136 */ if (b) { +/* 137 */ this.flags |= 0x100000; +/* */ } else +/* 139 */ this.flags &= 0xFFEFFFFF; +/* */ } +/* */ +/* */ protected void setUFlip(boolean b) { +/* 143 */ if (b) { +/* 144 */ this.flags |= 0x80000; +/* */ } else +/* 146 */ this.flags &= 0xFFF7FFFF; +/* */ } +/* */ +/* */ protected boolean getUFlip() { +/* 150 */ return (this.flags & 0x80000) != 0; +/* */ } +/* */ +/* */ protected boolean getVFlip() { +/* 154 */ return (this.flags & 0x100000) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setMaterial(Material m) +/* */ { +/* 162 */ setMaterial(m, false); +/* */ } +/* */ +/* */ public void setMaterial(Material m, boolean forceReload) { +/* 166 */ if (m == null) { +/* 167 */ m = new Material(new Color((int)(Math.random() * 1.6777216E7D))); +/* 168 */ } else if ((this.material == m) && (!forceReload)) { +/* 169 */ return; +/* */ } +/* 171 */ boolean sameSize = (this.polygonIDs != null) && (this.polygonIDs.length >= 1) && +/* 172 */ (this.material.getHRes() == m.getHRes()) && +/* 173 */ (this.material.getVRes() == m.getVRes()); +/* */ +/* 175 */ if (this.material != m) { +/* 176 */ if (this.material != null) +/* 177 */ this.material.detach(); +/* 178 */ add(m); +/* 179 */ this.material = m; +/* */ } +/* */ +/* 182 */ if (this.polygonIDs != null) { +/* 183 */ if (sameSize) { +/* 184 */ nativeSetMaterial(); +/* */ } else { +/* 186 */ reclump(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Material getMaterial() +/* */ { +/* 204 */ return this.material; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) +/* */ { +/* 227 */ super.getChildren(d); +/* */ +/* 229 */ d.addChildElement(this.material); +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException +/* */ { +/* 234 */ Object ret = null; +/* 235 */ switch (index - offset) { +/* */ case 0: +/* 237 */ if (mode == 0) { +/* 238 */ ret = new Property(this, index, "Material"); +/* 239 */ } else if (mode == 1) +/* 240 */ ret = this.material; +/* 241 */ break; +/* */ default: +/* 243 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 245 */ return ret; +/* */ } +/* */ +/* 248 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 251 */ s.saveVersion(1, classCookie); +/* 252 */ super.saveState(s); +/* 253 */ s.save(this.material); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException { +/* 257 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 259 */ super.restoreState(r); +/* 260 */ setMaterial((Material)r.restore()); +/* 261 */ break; +/* */ case 0: +/* 263 */ super.restoreState(r); +/* 264 */ setMaterial(Material.restore(r)); +/* 265 */ break; +/* */ default: +/* 267 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ Surface() {} +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ private native void nativeSetMaterial(); +/* */ +/* */ private native boolean uvOutOfRange(); +/* */ +/* */ native void addVertex(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4, float paramFloat5); +/* */ +/* */ native void addPolygon(int[] paramArrayOfInt); +/* */ +/* */ private native int addSubPolys(int paramInt1, int paramInt2); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Surface.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/SwitchableBehavior.java b/NET/worlds/scape/SwitchableBehavior.java new file mode 100644 index 0000000..774e17d --- /dev/null +++ b/NET/worlds/scape/SwitchableBehavior.java @@ -0,0 +1,90 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class SwitchableBehavior +/* */ extends SuperRoot +/* */ { +/* 22 */ protected boolean enabled = true; +/* 23 */ public boolean getEnabled() { return this.enabled; } +/* */ +/* */ public SwitchableBehavior setEnabled(boolean s) +/* */ { +/* 27 */ this.enabled = s; +/* 28 */ return this; +/* */ } +/* */ +/* */ public SwitchableBehavior toggleEnabled() +/* */ { +/* 33 */ setEnabled(!getEnabled()); +/* 34 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 43 */ Object ret = null; +/* 44 */ switch (index - offset) { +/* */ case 0: +/* 46 */ if (mode == 0) { +/* 47 */ ret = BooleanPropertyEditor.make( +/* 48 */ new Property(this, index, "Enabled"), +/* 49 */ "No", "Yes"); +/* 50 */ } else if (mode == 1) { +/* 51 */ ret = new Boolean(this.enabled); +/* 52 */ } else if (mode == 2) +/* 53 */ this.enabled = ((Boolean)value).booleanValue(); +/* 54 */ break; +/* */ default: +/* 56 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 58 */ return ret; +/* */ } +/* */ +/* 61 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 66 */ s.saveVersion(1, classCookie); +/* 67 */ super.saveState(s); +/* 68 */ s.saveBoolean(this.enabled); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 74 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 76 */ super.restoreState(r); +/* */ case 0: +/* 78 */ this.enabled = r.restoreBoolean(); +/* 79 */ break; +/* */ default: +/* 81 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\SwitchableBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TCompressor.java b/NET/worlds/scape/TCompressor.java new file mode 100644 index 0000000..72ce751 --- /dev/null +++ b/NET/worlds/scape/TCompressor.java @@ -0,0 +1,647 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TCompressor +/* */ { +/* */ private static final int CMAP_MAXPOSCOMP = 128; +/* */ private static final int CMAP_DEFAULTAXIS = 0; +/* */ private static final int CMAP_XUNITARY = 32; +/* */ private static final int CMAP_YUNITARY = 64; +/* */ private static final int CMAP_ZUNITARY = 96; +/* */ private static final int CMAP_ROTATION = 16; +/* */ private static final int CMAP_ROTSIGN1 = 8; +/* */ private static final int CMAP_ROTSIGN2 = 4; +/* */ private static final int CMAP_SCALE = 2; +/* */ private static final int CMAP_UNIFORMSCALE = 1; +/* */ private static final int MODE_SENDCMAP = 8388608; +/* */ private static final int MODE_SENDZ = 4194304; +/* */ private static final int MODE_MAXPOSCOMP = 128; +/* */ private static final int MODE_SENDROTAXIS = 96; +/* */ private static final int MODE_SENDROTATION = 16; +/* */ private static final int MODE_SENDSCALE = 2; +/* */ public static final int USER_SEND_POSITION = 32768; +/* */ public static final int USER_SEND_ROTATION = 16384; +/* */ public static final int USER_SEND_SCALE = 8192; +/* */ public static final int USER_SEND_ALL = 57344; +/* */ private static final int LOW21BITSMASK = 2097151; +/* */ private static final int LOW18BITSMASK = 262143; +/* */ private static final int LOW12BITSMASK = 4095; +/* */ private static final int LOW10BITSMASK = 1023; +/* */ private static final int LOW8BITSMASK = 255; +/* */ private static final int BIT20 = 1048576; +/* */ private static final double SCFACT = 16.0D; +/* */ private static final double SCOFFSET = 121.6D; +/* 88 */ static int wroteBytes = 0; +/* */ +/* 90 */ public static boolean dontSend = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void compress(WObject w, Point3Temp defPos, Point3Temp defRAxis, float defRotation, Point3Temp defScale, int inputModes, DataOutputStream ds) +/* */ throws IOException +/* */ { +/* 100 */ Point3Temp pos = w.getPosition(); +/* 101 */ Point3Temp rAxis = Point3Temp.make(); +/* 102 */ float rotation = w.getSpin(rAxis); +/* 103 */ Point3Temp scale = w.getScale(); +/* */ +/* 105 */ if (dontSend) +/* */ { +/* 107 */ System.err.println("DONTSEND is TRUE on COMPRESS CALL"); +/* 108 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 119 */ int mode = inputModes; +/* */ +/* 121 */ if ((mode & 0x8000) != 0) +/* */ { +/* */ +/* 124 */ if ((pos.x >= 0.0F) && (pos.x <= 4095.0D) && +/* 125 */ (pos.y >= 0.0F) && (pos.y <= 4095.0D) && ( +/* 126 */ ((pos.z >= 0.0F) && (pos.z <= 255.0D)) || (pos.z == defPos.z))) +/* 127 */ mode |= 0x80; +/* 128 */ if (pos.z != defPos.z) { mode |= 0x400000; +/* */ } +/* */ } +/* */ +/* */ +/* 133 */ int outaxis1 = 0;int outaxis2 = 0; +/* */ +/* 135 */ if (((mode & 0x4000) != 0) && (!rAxis.sameValue(defRAxis))) +/* */ { +/* 137 */ int axisFlag = 0; +/* */ +/* */ +/* */ +/* */ +/* 142 */ float maxAxis = rAxis.x; +/* 143 */ axisFlag = 32; +/* */ +/* 145 */ if (Math.abs(rAxis.y) > Math.abs(maxAxis)) +/* */ { +/* 147 */ maxAxis = rAxis.y; +/* 148 */ axisFlag = 64; +/* */ } +/* 150 */ if (Math.abs(rAxis.z) > Math.abs(maxAxis)) +/* */ { +/* 152 */ maxAxis = rAxis.z; +/* 153 */ axisFlag = 96; +/* */ } +/* */ +/* 156 */ rAxis.x /= maxAxis; +/* 157 */ rAxis.y /= maxAxis; +/* 158 */ rAxis.z /= maxAxis; +/* */ +/* 160 */ mode |= axisFlag; +/* */ +/* 162 */ if (maxAxis < 0.0F) { +/* 163 */ rotation *= -1.0F; +/* */ } +/* */ +/* 166 */ switch (axisFlag) +/* */ { +/* */ case 32: +/* 169 */ if (rAxis.y < 0.0F) mode |= 0x8; +/* 170 */ if (rAxis.z < 0.0F) mode |= 0x4; +/* 171 */ outaxis1 = Math.round(Math.abs(255.0F * rAxis.y)); +/* 172 */ outaxis2 = Math.round(Math.abs(255.0F * rAxis.z)); +/* 173 */ break; +/* */ case 64: +/* 175 */ if (rAxis.x < 0.0F) mode |= 0x8; +/* 176 */ if (rAxis.z < 0.0F) mode |= 0x4; +/* 177 */ outaxis1 = Math.round(Math.abs(255.0F * rAxis.x)); +/* 178 */ outaxis2 = Math.round(Math.abs(255.0F * rAxis.z)); +/* 179 */ break; +/* */ case 96: +/* 181 */ if (rAxis.x < 0.0F) mode |= 0x8; +/* 182 */ if (rAxis.y < 0.0F) mode |= 0x4; +/* 183 */ outaxis1 = Math.round(Math.abs(255.0F * rAxis.x)); +/* 184 */ outaxis2 = Math.round(Math.abs(255.0F * rAxis.y)); +/* 185 */ break; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 194 */ if ((outaxis1 == 0) && (outaxis2 == 0) && (maxAxis < 0.0F)) +/* */ { +/* 196 */ mode |= 0x8; +/* 197 */ mode |= 0x4; +/* */ } +/* */ +/* 200 */ while (rotation >= 360.0F) +/* 201 */ rotation -= 360.0F; +/* 202 */ while (rotation < 0.0F) { +/* 203 */ rotation += 360.0F; +/* */ } +/* 205 */ if (rotation != defRotation) +/* */ { +/* 207 */ mode |= 0x800000; +/* 208 */ mode |= 0x10; +/* */ } +/* */ } +/* */ +/* 212 */ if ((mode & 0x2000) != 0) +/* */ { +/* 214 */ if (!scale.sameValue(defScale)) +/* */ { +/* 216 */ mode |= 0x800000; +/* 217 */ mode |= 0x2; +/* 218 */ if ((scale.x == scale.y) && (scale.x == scale.z)) { +/* 219 */ mode |= 0x1; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 228 */ if ((mode & 0x800000) != 0) +/* */ { +/* 230 */ ds.writeByte(mode & 0xFF); +/* 231 */ wroteBytes += 1; +/* */ } +/* */ +/* 234 */ if ((mode & 0x8000) != 0) +/* */ { +/* 236 */ if ((mode & 0x80) != 0) +/* */ { +/* 238 */ maxCompressXY(pos.x, pos.y, ds); +/* 239 */ if (((mode & 0x400000) != 0) || +/* 240 */ ((mode & 0x800000) != 0)) +/* */ { +/* 242 */ short iz = (short)Math.round(pos.z); +/* 243 */ int outbyte = iz & 0xFF; +/* 244 */ ds.writeByte(outbyte); +/* 245 */ wroteBytes += 1; +/* */ } +/* */ } +/* */ else +/* */ { +/* 250 */ minCompressXYZ(pos.x, pos.y, pos.z, ds); +/* */ } +/* */ } +/* */ +/* */ +/* 255 */ if ((mode & 0x60) != 0) +/* */ { +/* 257 */ ds.writeByte(outaxis1); +/* 258 */ ds.writeByte(outaxis2); +/* 259 */ wroteBytes += 2; +/* */ } +/* */ +/* */ +/* 263 */ if ((mode & 0x10) != 0) +/* */ { +/* 265 */ int outbyte = (int)Math.round(256.0D * (rotation / 360.0D)); +/* 266 */ ds.writeByte(outbyte); +/* 267 */ wroteBytes += 1; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 278 */ if ((mode & 0x2) != 0) +/* */ { +/* 280 */ double y = 16.0D * Math.log(scale.x / defScale.x) + 121.6D; +/* 281 */ if (y < 0.0D) y = 0.0D; +/* 282 */ if (y > 255.0D) y = 255.0D; +/* 283 */ int outbyte = (int)Math.round(y); +/* 284 */ ds.writeByte(outbyte); +/* 285 */ wroteBytes += 1; +/* 286 */ if ((mode & 0x1) == 0) +/* */ { +/* 288 */ y = 16.0D * Math.log(scale.y / defScale.y) + 121.6D; +/* 289 */ if (y < 0.0D) y = 0.0D; +/* 290 */ if (y > 255.0D) y = 255.0D; +/* 291 */ outbyte = (int)Math.round(y); +/* 292 */ ds.writeByte(outbyte); +/* 293 */ wroteBytes += 1; +/* */ +/* 295 */ y = 16.0D * Math.log(scale.z / defScale.z) + 121.6D; +/* 296 */ if (y < 0.0D) y = 0.0D; +/* 297 */ if (y > 255.0D) y = 255.0D; +/* 298 */ outbyte = (int)Math.round(y); +/* 299 */ ds.writeByte(outbyte); +/* 300 */ wroteBytes += 1; +/* */ } +/* */ } +/* */ +/* */ +/* 305 */ wroteBytes = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ private static void maxCompressXY(float x, float y, DataOutputStream ds) +/* */ throws IOException +/* */ { +/* 313 */ short ix = (short)Math.round(x); +/* 314 */ short iy = (short)Math.round(y); +/* */ +/* */ +/* 317 */ ix = (short)(ix & 0xFFF); +/* 318 */ iy = (short)(iy & 0xFFF); +/* */ +/* */ +/* */ +/* */ +/* 323 */ int posbyte = ix >>> 4; +/* 324 */ ds.writeByte(posbyte); +/* 325 */ wroteBytes += 1; +/* */ +/* */ +/* 328 */ ix = (short)(ix << 4); +/* 329 */ ix = (short)(ix & 0xFF); +/* */ +/* 331 */ posbyte = ix | iy >>> 8; +/* 332 */ ds.writeByte(posbyte); +/* 333 */ wroteBytes += 1; +/* */ +/* */ +/* 336 */ posbyte = iy & 0xFF; +/* 337 */ ds.writeByte(posbyte); +/* 338 */ wroteBytes += 1; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static void minCompressXYZ(float x, float y, float z, DataOutputStream ds) +/* */ throws IOException +/* */ { +/* 348 */ int xval = floatTo21bits(x); +/* 349 */ int yval = floatTo21bits(y); +/* 350 */ int zval = floatTo21bits(z); +/* */ +/* */ +/* */ +/* 354 */ int outbits = xval << 10 | yval >>> 11; +/* 355 */ ds.writeInt(outbits); +/* 356 */ wroteBytes += 4; +/* */ +/* 358 */ outbits = yval << 21 | zval; +/* 359 */ ds.writeInt(outbits); +/* 360 */ wroteBytes += 4; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private static int floatTo21bits(float f) +/* */ { +/* 370 */ for (int e = 0; e <= 3; e++) +/* */ { +/* 372 */ double decimal = Math.pow(10.0D, e - 2); +/* 373 */ float limit = (float)(262144.0D * decimal); +/* 374 */ float af = Math.abs(f); +/* 375 */ if ((af < limit) || (e == 3)) +/* */ { +/* 377 */ int m = (int)Math.round(af / decimal); +/* 378 */ m &= 0x3FFFF; +/* 379 */ m <<= 2; +/* 380 */ m |= e; +/* 381 */ if (f < 0.0F) m |= 0x100000; +/* 382 */ return m; +/* */ } +/* */ } +/* 385 */ return 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void decompress(WObject w, Point3Temp defPos, Point3Temp defRAxis, float defRotation, Point3Temp defScale, int inputModes, int len, DataInputStream ds) +/* */ throws IOException +/* */ { +/* 397 */ int mode = inputModes; +/* */ +/* */ +/* 400 */ Point3Temp pos = w.getPosition(); +/* 401 */ Point3Temp rAxis = Point3Temp.make(); +/* 402 */ float rotation = w.getSpin(rAxis); +/* 403 */ Point3Temp scale = w.getScale(); +/* */ +/* 405 */ dontSend = true; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 416 */ if (len == 0) +/* */ { +/* 418 */ w.moveTo(defPos); +/* 419 */ defScale.x /= scale.x; +/* 420 */ defScale.y /= scale.y; +/* 421 */ defScale.z /= scale.z; +/* 422 */ w.scale(scale); +/* 423 */ dontSend = false; +/* 424 */ return; +/* */ } +/* */ +/* 427 */ if (len == 24) +/* */ { +/* 429 */ pos.x = ds.readFloat(); +/* 430 */ pos.y = ds.readFloat(); +/* 431 */ pos.z = ds.readFloat(); +/* */ +/* 433 */ scale.x = (ds.readFloat() / scale.x); +/* 434 */ scale.y = (ds.readFloat() / scale.y); +/* 435 */ scale.z = (ds.readFloat() / scale.z); +/* */ +/* 437 */ w.moveTo(pos); +/* 438 */ w.scale(scale); +/* 439 */ dontSend = false; +/* 440 */ return; +/* */ } +/* */ +/* 443 */ if (len > 4) { +/* 444 */ mode |= 0x800000; +/* */ } else { +/* 446 */ mode |= 0x80; +/* */ } +/* 448 */ if (len == 4) { +/* 449 */ mode |= 0x400000; +/* */ } +/* 451 */ if ((mode & 0x800000) != 0) +/* */ { +/* 453 */ int inbyte = ds.readUnsignedByte(); +/* 454 */ mode |= inbyte; +/* */ +/* */ +/* 457 */ mode |= 0x400000; +/* */ } +/* */ +/* 460 */ if ((mode & 0x8000) != 0) +/* */ { +/* 462 */ if ((mode & 0x80) != 0) +/* */ { +/* 464 */ pos = maxDecompressXY(pos, ds); +/* 465 */ if ((mode & 0x400000) != 0) +/* */ { +/* 467 */ int iz = ds.readUnsignedByte(); +/* 468 */ pos.z = iz; +/* */ } +/* */ } +/* */ else +/* */ { +/* 473 */ pos = minDecompressXYZ(pos, ds); +/* */ } +/* 475 */ w.moveTo(pos); +/* */ } +/* */ +/* */ +/* */ +/* 480 */ if ((mode & 0x800000) == 0) +/* */ { +/* 482 */ dontSend = false; +/* 483 */ return; +/* */ } +/* */ +/* */ +/* 487 */ if ((mode & 0x10) != 0) { +/* 488 */ w.spin(rAxis.x, rAxis.y, rAxis.z, -rotation); +/* */ } +/* */ +/* */ +/* 492 */ rAxis.x = defRAxis.x; +/* 493 */ rAxis.y = defRAxis.y; +/* 494 */ rAxis.z = defRAxis.z; +/* 495 */ if ((mode & 0x60) != 0) +/* */ { +/* 497 */ int inaxis1 = ds.readUnsignedByte(); +/* 498 */ int inaxis2 = ds.readUnsignedByte(); +/* */ +/* 500 */ switch (mode & 0x60) +/* */ { +/* */ case 0: +/* */ break; +/* */ +/* */ +/* */ case 32: +/* 507 */ rAxis.x = 1.0F; +/* 508 */ rAxis.y = ((float)(inaxis1 / 255.0D)); +/* 509 */ rAxis.z = ((float)(inaxis2 / 255.0D)); +/* 510 */ if ((mode & 0x8) != 0) { Point3Temp tmp529_527 = rAxis;tmp529_527.y = ((float)(tmp529_527.y * -1.0D)); } +/* 511 */ if ((mode & 0x4) != 0) { Point3Temp tmp551_549 = rAxis;tmp551_549.z = ((float)(tmp551_549.z * -1.0D)); +/* */ } +/* 513 */ if ((rAxis.y == 0.0F) && (rAxis.z == 0.0F) && +/* 514 */ ((mode & 0x8) != 0) && ((mode & 0x4) != 0)) { +/* 515 */ rAxis.x = -1.0F; +/* */ } +/* 517 */ break; +/* */ +/* */ +/* */ case 64: +/* 521 */ rAxis.y = 1.0F; +/* 522 */ rAxis.x = ((float)(inaxis1 / 255.0D)); +/* 523 */ rAxis.z = ((float)(inaxis2 / 255.0D)); +/* 524 */ if ((mode & 0x8) != 0) { Point3Temp tmp651_649 = rAxis;tmp651_649.x = ((float)(tmp651_649.x * -1.0D)); } +/* 525 */ if ((mode & 0x4) != 0) { Point3Temp tmp673_671 = rAxis;tmp673_671.z = ((float)(tmp673_671.z * -1.0D)); +/* */ } +/* 527 */ if ((rAxis.x == 0.0F) && (rAxis.z == 0.0F) && +/* 528 */ ((mode & 0x8) != 0) && ((mode & 0x4) != 0)) { +/* 529 */ rAxis.y = -1.0F; +/* */ } +/* 531 */ break; +/* */ +/* */ +/* */ case 96: +/* 535 */ rAxis.z = 1.0F; +/* 536 */ rAxis.x = ((float)(inaxis1 / 255.0D)); +/* 537 */ rAxis.y = ((float)(inaxis2 / 255.0D)); +/* 538 */ if ((mode & 0x8) != 0) { Point3Temp tmp773_771 = rAxis;tmp773_771.x = ((float)(tmp773_771.x * -1.0D)); } +/* 539 */ if ((mode & 0x4) != 0) { Point3Temp tmp795_793 = rAxis;tmp795_793.y = ((float)(tmp795_793.y * -1.0D)); +/* */ } +/* 541 */ if ((rAxis.x == 0.0F) && (rAxis.y == 0.0F) && +/* 542 */ ((mode & 0x8) != 0) && ((mode & 0x4) != 0)) { +/* 543 */ rAxis.z = -1.0F; +/* */ } +/* */ break; +/* */ } +/* */ +/* */ } +/* 549 */ if ((mode & 0x10) != 0) +/* */ { +/* 551 */ int inbyte = ds.readUnsignedByte(); +/* 552 */ rotation = (float)(360.0D * (inbyte / 256.0D)); +/* 553 */ w.worldSpin(rAxis.x, rAxis.y, rAxis.z, rotation); +/* */ } +/* */ +/* */ +/* 557 */ if ((mode & 0x2) != 0) +/* */ { +/* 559 */ int inbyte = ds.readUnsignedByte(); +/* 560 */ double s = defScale.x * Math.exp((inbyte - 121.6D) / 16.0D); +/* 561 */ scale.x = ((float)s); +/* */ +/* 563 */ if ((mode & 0x1) != 0) +/* */ { +/* 565 */ scale.y = scale.x; +/* 566 */ scale.z = scale.x; +/* */ } +/* */ else +/* */ { +/* 570 */ inbyte = ds.readUnsignedByte(); +/* 571 */ s = defScale.y * Math.exp((inbyte - 121.6D) / 16.0D); +/* 572 */ scale.y = ((float)s); +/* 573 */ inbyte = ds.readUnsignedByte(); +/* 574 */ s = defScale.z * Math.exp((inbyte - 121.6D) / 16.0D); +/* 575 */ scale.z = ((float)s); +/* */ } +/* 577 */ Point3Temp oldScale = w.getScale(); +/* 578 */ scale.x /= oldScale.x; +/* 579 */ scale.y /= oldScale.y; +/* 580 */ scale.z /= oldScale.z; +/* 581 */ w.scale(scale); +/* */ } +/* */ +/* 584 */ dontSend = false; +/* */ } +/* */ +/* */ private static Point3Temp maxDecompressXY(Point3Temp pos, DataInputStream ds) +/* */ throws IOException +/* */ { +/* 590 */ int ix = ds.readUnsignedByte(); +/* 591 */ ix <<= 4; +/* */ +/* 593 */ int iy = ds.readUnsignedByte(); +/* 594 */ ix |= iy >>> 4; +/* */ +/* 596 */ iy &= 0xF; +/* 597 */ iy <<= 8; +/* */ +/* 599 */ iy |= ds.readUnsignedByte(); +/* */ +/* 601 */ pos.x = ix; +/* 602 */ pos.y = iy; +/* */ +/* 604 */ return pos; +/* */ } +/* */ +/* */ +/* */ +/* */ private static Point3Temp minDecompressXYZ(Point3Temp pos, DataInputStream ds) +/* */ throws IOException +/* */ { +/* 612 */ int i1 = ds.readInt(); +/* 613 */ int i2 = ds.readInt(); +/* */ +/* 615 */ int tmp = i1 >>> 10; +/* 616 */ pos.x = floatFrom21bits(tmp); +/* */ +/* 618 */ tmp = (i1 & 0x3FF) << 11; +/* 619 */ tmp |= i2 >>> 21; +/* 620 */ pos.y = floatFrom21bits(tmp); +/* */ +/* 622 */ tmp = i2 & 0x1FFFFF; +/* 623 */ pos.z = floatFrom21bits(tmp); +/* */ +/* 625 */ return pos; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private static float floatFrom21bits(int bits) +/* */ { +/* 633 */ int e = bits & 0x3; +/* 634 */ int s = (bits & 0x100000) << 11 | 0x1; +/* */ +/* 636 */ int m = (bits & 0xFFEFFFFF) >>> 2; +/* 637 */ double d = Math.pow(10.0D, e - 2); +/* */ +/* 639 */ return (float)(m * d * s); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TCompressor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TabbedDisplayPanel.java b/NET/worlds/scape/TabbedDisplayPanel.java new file mode 100644 index 0000000..63144cd --- /dev/null +++ b/NET/worlds/scape/TabbedDisplayPanel.java @@ -0,0 +1,429 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.awt.CardLayout; +/* */ import java.awt.Color; +/* */ import java.awt.Component; +/* */ import java.awt.Dimension; +/* */ import java.awt.Graphics; +/* */ import java.awt.Insets; +/* */ import java.awt.Panel; +/* */ import java.awt.Point; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class TabbedDisplayPanel +/* */ extends Panel +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private int count; +/* 331 */ private Vector cards = new Vector(); +/* 332 */ private Vector cardNames = new Vector(); +/* */ +/* */ TabbedDisplayPanel() +/* */ { +/* 336 */ setLayout(new CardLayout()); +/* */ } +/* */ +/* */ void addItem(Component c) +/* */ { +/* 341 */ insertItem(this.cards.size(), c); +/* */ } +/* */ +/* */ void insertItem(int index, Component c) +/* */ { +/* 346 */ String cardName = this.count++; +/* 347 */ this.cardNames.insertElementAt(cardName, index); +/* 348 */ this.cards.insertElementAt(c, index); +/* 349 */ add(cardName, c); +/* 350 */ validate(); +/* 351 */ repaint(); +/* */ } +/* */ +/* */ void removeItem(int index) +/* */ { +/* 356 */ remove((Component)this.cards.elementAt(index)); +/* 357 */ this.cards.removeElementAt(index); +/* 358 */ this.cardNames.removeElementAt(index); +/* */ } +/* */ +/* */ public Component getComponent(int index) +/* */ { +/* 363 */ return (Component)this.cards.elementAt(index); +/* */ } +/* */ +/* */ void setChoice(int index) +/* */ { +/* 368 */ ((CardLayout)getLayout()).show(this, +/* 369 */ (String)this.cardNames.elementAt(index)); +/* */ } +/* */ +/* */ public Insets insets() +/* */ { +/* 374 */ return new Insets(0, 2, 2, 0); +/* */ } +/* */ +/* */ public void paint(Graphics g) +/* */ { +/* 379 */ g.setColor(getBackground()); +/* 380 */ if (this.cards.size() != 0) { +/* 381 */ Dimension size = getSize(); +/* 382 */ vLine(g, 1, 0, size.height); +/* 383 */ g.setColor(getBackground().brighter()); +/* 384 */ vLine(g, 0, 0, size.height - 2); +/* 385 */ g.setColor(getBackground().darker()); +/* 386 */ hLine(g, 0, size.height - 1, size.width - 1); +/* 387 */ vLine(g, size.width - 1, size.height - 1, 0); +/* 388 */ hLine(g, 1, size.height - 2, size.width - 2); +/* 389 */ vLine(g, size.width - 2, size.height - 2, 0); +/* */ } +/* */ else { +/* 392 */ g.fillRect(0, 0, getSize().width, getSize().height); +/* */ } +/* */ } +/* */ +/* */ private static void vLine(Graphics g, int x1, int y1, int y2) { +/* 397 */ g.drawLine(x1, y1, x1, y2); +/* */ } +/* */ +/* */ private static void hLine(Graphics g, int x1, int y1, int x2) +/* */ { +/* 402 */ g.drawLine(x1, y1, x2, y1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ @Deprecated +/* */ public Component locate(int x, int y) +/* */ { +/* 412 */ if (!contains(x, y)) +/* 413 */ return null; +/* 414 */ int n = getComponentCount(); +/* 415 */ for (int i = 0; i < n; i++) { +/* 416 */ Component c = getComponent(i); +/* 417 */ Point loc = c.getLocation(); +/* 418 */ if ((c != null) && (c.isVisible()) && (c.contains(x - loc.x, y - loc.y))) +/* 419 */ return c; +/* */ } +/* 421 */ return this; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TabbedDisplayPanel.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TabbedPanel.java b/NET/worlds/scape/TabbedPanel.java new file mode 100644 index 0000000..5de0751 --- /dev/null +++ b/NET/worlds/scape/TabbedPanel.java @@ -0,0 +1,329 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogDisabled; +/* */ import java.awt.BorderLayout; +/* */ import java.awt.Color; +/* */ import java.awt.Component; +/* */ import java.awt.Dimension; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.FontMetrics; +/* */ import java.awt.Graphics; +/* */ import java.awt.Insets; +/* */ import java.awt.Panel; +/* */ import java.awt.Point; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TabbedPanel +/* */ extends Panel +/* */ implements ClickEventHandler, DialogDisabled +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 36 */ private Vector entries = new Vector(); +/* */ private int rows; +/* */ private int itemWidth; +/* */ private int itemHeight; +/* */ private int itemsPerRow; +/* */ private int choice; +/* */ private Font nFont; +/* */ private FontMetrics nFontMetrics; +/* */ private Font bFont; +/* */ private FontMetrics bFontMetrics; +/* */ private int fontHeight; +/* 47 */ private TabbedDisplayPanel disp = new TabbedDisplayPanel(); +/* */ private ClickEventHandler handler; +/* */ private boolean needRecalc; +/* */ private boolean isDialogDisabled; +/* */ +/* */ public TabbedPanel(ClickEventHandler handler) +/* */ { +/* 54 */ this.handler = handler; +/* 55 */ setLayout(new BorderLayout()); +/* 56 */ add("Center", this.disp); +/* */ } +/* */ +/* */ public TabbedPanel() +/* */ { +/* 61 */ this(null); +/* 62 */ this.handler = this; +/* */ } +/* */ +/* */ public void addItem(String name, Component c) +/* */ { +/* 67 */ this.entries.addElement(name); +/* 68 */ this.needRecalc = true; +/* 69 */ repaint(); +/* 70 */ this.disp.addItem(c); +/* */ } +/* */ +/* */ public void insertItem(int index, String name, Component c) +/* */ { +/* 75 */ this.entries.insertElementAt(name, index); +/* 76 */ this.disp.insertItem(index, c); +/* 77 */ if (index <= this.choice) +/* 78 */ this.choice = Math.min(this.choice + 1, this.entries.size() - 1); +/* 79 */ this.needRecalc = true; +/* 80 */ repaint(); +/* */ } +/* */ +/* */ public void removeItem(int index) +/* */ { +/* 85 */ this.entries.removeElementAt(index); +/* 86 */ this.disp.removeItem(index); +/* 87 */ if (index == this.choice) { +/* 88 */ int count = this.entries.size(); +/* 89 */ if (count > 0) { +/* 90 */ this.choice = Math.min(this.choice, count - 1); +/* 91 */ this.disp.setChoice(this.choice); +/* */ } +/* */ } +/* 94 */ else if (index < this.choice) { +/* 95 */ this.choice -= 1; } +/* 96 */ this.needRecalc = true; +/* 97 */ repaint(); +/* */ } +/* */ +/* */ public void select(int index) +/* */ { +/* 102 */ this.choice = index; +/* 103 */ repaint(); +/* 104 */ this.disp.setChoice(index); +/* */ } +/* */ +/* */ public String getName(int index) +/* */ { +/* 109 */ return (String)this.entries.elementAt(index); +/* */ } +/* */ +/* */ public void setName(int index, String name) +/* */ { +/* 114 */ this.entries.setElementAt(name, index); +/* 115 */ this.needRecalc = true; +/* 116 */ repaint(); +/* */ } +/* */ +/* */ public Component getComponent(int index) +/* */ { +/* 121 */ if (index < this.entries.size()) +/* 122 */ return this.disp.getComponent(index); +/* 123 */ return null; +/* */ } +/* */ +/* */ public int selected() +/* */ { +/* 128 */ return this.choice; +/* */ } +/* */ +/* */ public int itemAt(Point p) +/* */ { +/* 133 */ if (!this.needRecalc) { +/* 134 */ Point tab = new Point(0, 0); +/* 135 */ int count = this.entries.size(); +/* 136 */ for (int i = 0; i < count; i++) { +/* 137 */ getPosition(i, tab); +/* 138 */ if ((p.x >= tab.x) && (p.y >= tab.y) && (p.x < tab.x + this.itemWidth) && +/* 139 */ (p.y < tab.y + this.itemHeight)) +/* 140 */ return i; +/* */ } +/* */ } +/* 143 */ return -1; +/* */ } +/* */ +/* */ public void addNotify() +/* */ { +/* 148 */ super.addNotify(); +/* 149 */ this.nFont = new Font(Console.message("NotifyFont"), 0, 13); +/* */ +/* 151 */ this.nFontMetrics = getFontMetrics(this.nFont); +/* 152 */ this.bFont = new Font(Console.message("NotifyFont"), 1, 14); +/* */ +/* 154 */ this.bFontMetrics = getFontMetrics(this.bFont); +/* 155 */ this.fontHeight = Math.max(this.nFontMetrics.getHeight(), +/* 156 */ this.bFontMetrics.getHeight()); +/* 157 */ this.itemHeight = (this.fontHeight + 5); +/* */ } +/* */ +/* */ public Insets insets() +/* */ { +/* 162 */ if (this.needRecalc) +/* 163 */ recalc(); +/* 164 */ return new Insets(this.rows * this.itemHeight, 0, 0, 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setBounds(int x, int y, int width, int height) +/* */ { +/* 175 */ super.setBounds(x, y, width, height); +/* 176 */ this.needRecalc = true; +/* 177 */ repaint(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void recalc() +/* */ { +/* 185 */ int count = this.entries.size(); +/* 186 */ this.itemWidth = 0; +/* 187 */ for (int i = 0; i < count; i++) { +/* 188 */ String name = (String)this.entries.elementAt(i); +/* 189 */ int w = Math.max(this.bFontMetrics.stringWidth(name), +/* 190 */ this.nFontMetrics.stringWidth(" " + name + " ")); +/* 191 */ this.itemWidth = Math.max(w, this.itemWidth); +/* */ } +/* 193 */ this.itemWidth += 4; +/* 194 */ this.itemsPerRow = Math.max(1, getSize().width / this.itemWidth); +/* 195 */ this.rows = ((count + this.itemsPerRow - 1) / this.itemsPerRow); +/* 196 */ this.needRecalc = false; +/* 197 */ invalidate(); +/* 198 */ validate(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void getPosition(int entry, Point pos) +/* */ { +/* 207 */ int entryRow = entry / this.itemsPerRow; +/* 208 */ int displayRow = entryRow; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 221 */ int column = entry - entryRow * this.itemsPerRow; +/* 222 */ pos.x = (column * this.itemWidth); +/* 223 */ pos.y = ((this.rows - 1 - displayRow) * this.itemHeight - 2); +/* */ } +/* */ +/* */ private static void vLine(Graphics g, int x1, int y1, int y2) +/* */ { +/* 228 */ g.drawLine(x1, y1, x1, y2); +/* */ } +/* */ +/* */ private static void hLine(Graphics g, int x1, int y1, int x2) +/* */ { +/* 233 */ g.drawLine(x1, y1, x2, y1); +/* */ } +/* */ +/* */ public void paint(Graphics g) +/* */ { +/* 238 */ if (this.needRecalc) { +/* 239 */ recalc(); +/* */ } +/* 241 */ g.setColor(getBackground()); +/* 242 */ g.fillRect(0, 0, getSize().width, getSize().height); +/* */ +/* 244 */ int count = this.entries.size(); +/* 245 */ if (count != 0) { +/* 246 */ Point p = new Point(0, 0); +/* 247 */ int maxWidth = this.itemWidth - 4; +/* 248 */ for (int i = 0; i < count; i++) { +/* 249 */ getPosition(i, p); +/* 250 */ String ent = (String)this.entries.elementAt(i); +/* 251 */ int x1 = p.x; +/* 252 */ int y1 = p.y + 4; +/* 253 */ int y2 = y1 + this.fontHeight; +/* 254 */ int yFont = y1; +/* 255 */ Font font = this.nFont; +/* 256 */ FontMetrics fm = this.nFontMetrics; +/* 257 */ boolean selected = i == this.choice; +/* 258 */ if (selected) { +/* 259 */ y1 = p.y + 2; +/* 260 */ y2 = y1 + this.fontHeight + 4; +/* 261 */ yFont = y1 + 1; +/* 262 */ font = this.bFont; +/* 263 */ fm = this.bFontMetrics; +/* */ } +/* 265 */ int width = fm.stringWidth(ent); +/* 266 */ int spacing = (maxWidth - width) / 2; +/* 267 */ int x2 = x1 + maxWidth; +/* 268 */ g.setFont(font); +/* 269 */ g.setColor(getBackground().brighter()); +/* 270 */ if (selected) { +/* 271 */ hLine(g, 0, y2, x1); +/* 272 */ hLine(g, x2 + 3, y2, getSize().width); +/* */ } +/* 274 */ vLine(g, x1, y2, y1 + 2); +/* 275 */ g.drawLine(x1, y1 + 2, x1 + 2, y1); +/* 276 */ hLine(g, x1 + 2, y1, x2); +/* 277 */ g.setColor(getBackground().darker()); +/* 278 */ vLine(g, x2 + 1, y1 + 1, y2); +/* 279 */ vLine(g, x2 + 2, y1 + 2, y2); +/* 280 */ g.setColor(getForeground()); +/* 281 */ g.drawString(ent, x1 + 1 + spacing, yFont + +/* 282 */ fm.getAscent() + fm.getLeading()); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void clickEvent(Component who, Point location, int flags) {} +/* */ +/* */ @Deprecated +/* */ public boolean mouseDown(Event event, int x, int y) +/* */ { +/* 292 */ Point p = new Point(x, y); +/* 293 */ int tmp = itemAt(p); +/* 294 */ if (tmp != -1) { +/* 295 */ this.choice = tmp; +/* 296 */ repaint(); +/* 297 */ this.disp.setChoice(this.choice); +/* 298 */ int flags = 1; +/* 299 */ if (event.metaDown()) +/* 300 */ flags |= 0x4; +/* 301 */ this.handler.clickEvent(this, p, flags); +/* 302 */ return true; +/* */ } +/* 304 */ return false; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) +/* */ { +/* 310 */ if (this.isDialogDisabled) +/* 311 */ return false; +/* 312 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ public void dialogDisable(boolean disable) +/* */ { +/* 317 */ this.isDialogDisabled = disable; +/* 318 */ Component c = getComponent(selected()); +/* 319 */ if ((c != null) && ((c instanceof DialogDisabled))) { +/* 320 */ ((DialogDisabled)c).dialogDisable(disable); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TabbedPanel.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TalkAction.java b/NET/worlds/scape/TalkAction.java new file mode 100644 index 0000000..7bc70a2 --- /dev/null +++ b/NET/worlds/scape/TalkAction.java @@ -0,0 +1,109 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TalkAction +/* */ extends Action +/* */ { +/* 21 */ String txt = null; +/* */ +/* */ +/* */ +/* */ public TalkAction() {} +/* */ +/* */ +/* */ public TalkAction(String text) +/* */ { +/* 30 */ this.txt = text; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event arg, Persister seqID) +/* */ { +/* 39 */ Pilot.getActive(); +/* 40 */ Pilot.sendText(this.txt); +/* */ +/* 42 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 51 */ Object ret = null; +/* 52 */ switch (index - offset) { +/* */ case 0: +/* 54 */ if (mode == 0) { +/* 55 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 56 */ "Message")); +/* 57 */ } else if (mode == 1) { +/* 58 */ ret = this.txt; +/* 59 */ } else if (mode == 2) +/* 60 */ this.txt = ((String)value); +/* 61 */ break; +/* */ +/* */ default: +/* 64 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 66 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 73 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 77 */ s.saveVersion(0, classCookie); +/* 78 */ super.saveState(s); +/* 79 */ s.saveString(this.txt); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 85 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 87 */ super.restoreState(r); +/* 88 */ this.txt = r.restoreString(); +/* 89 */ break; +/* */ default: +/* 91 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 101 */ return super.toString() + "[" + this.txt + "]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TalkAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Teleport.java b/NET/worlds/scape/Teleport.java new file mode 100644 index 0000000..1e85fcd --- /dev/null +++ b/NET/worlds/scape/Teleport.java @@ -0,0 +1,149 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Teleport +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, Persister, MouseDownHandler, BumpHandler, TeleportStatus +/* */ { +/* */ String trigger; +/* */ String externalTriggerTag; +/* */ String worldName; +/* */ private Room currentRoom; +/* */ +/* */ public Teleport() +/* */ { +/* 34 */ this.trigger = "none"; +/* 35 */ this.externalTriggerTag = ""; +/* 36 */ this.worldName = ""; +/* 37 */ this.currentRoom = null; +/* */ } +/* */ +/* 40 */ public boolean handle(FrameEvent e) { return true; } +/* */ +/* 42 */ public boolean handle(MouseDownEvent e) { if ((this.enabled) && +/* 43 */ (this.trigger.equals("click"))) { +/* 44 */ this.currentRoom = e.target.getRoom(); +/* 45 */ TeleportAction.teleport(this.worldName, this); +/* */ } +/* */ +/* 48 */ return true; +/* */ } +/* */ +/* 51 */ public boolean handle(BumpEventTemp e) { if ((this.enabled) && +/* 52 */ (this.trigger.equals("bump"))) { +/* 53 */ this.currentRoom = e.target.getRoom(); +/* 54 */ TeleportAction.teleport(this.worldName, this); +/* */ } +/* */ +/* 57 */ return true; +/* */ } +/* */ +/* */ public void teleportStatus(String err, String url) {} +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException +/* */ { +/* 64 */ Object ret = null; +/* */ +/* 66 */ switch (index - offset) { +/* */ case 0: +/* 68 */ if (mode == 0) { +/* 69 */ ret = StringPropertyEditor.make( +/* 70 */ new Property(this, index, "Trigger")); +/* 71 */ } else if (mode == 1) { +/* 72 */ ret = new String(this.trigger); +/* 73 */ } else if (mode == 2) { +/* 74 */ this.trigger = ((String)value).trim(); +/* */ } +/* 76 */ break; +/* */ case 1: +/* 78 */ if (mode == 0) { +/* 79 */ ret = StringPropertyEditor.make( +/* 80 */ new Property(this, index, "External Trigger Tag")); +/* 81 */ } else if (mode == 1) { +/* 82 */ ret = new String(this.externalTriggerTag); +/* 83 */ } else if (mode == 2) { +/* 84 */ this.externalTriggerTag = ((String)value).trim(); +/* */ } +/* 86 */ break; +/* */ case 2: +/* 88 */ if (mode == 0) { +/* 89 */ ret = StringPropertyEditor.make( +/* 90 */ new Property(this, index, "World Name")); +/* 91 */ } else if (mode == 1) { +/* 92 */ ret = new String(this.worldName); +/* 93 */ } else if (mode == 2) { +/* 94 */ this.worldName = ((String)value).trim(); +/* */ } +/* 96 */ break; +/* */ default: +/* 98 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* */ +/* 101 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 105 */ return +/* */ +/* */ +/* 108 */ super.toString() + "[trigger " + this.trigger + ", External trigger" + this.externalTriggerTag + ", World Name " + this.worldName + ", enabled " + this.enabled + "]"; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 114 */ s.saveString(this.trigger); +/* 115 */ s.saveString(this.externalTriggerTag); +/* 116 */ s.saveString(this.worldName); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 122 */ this.trigger = r.restoreString(); +/* 123 */ this.externalTriggerTag = r.restoreString(); +/* 124 */ this.worldName = r.restoreString(); +/* */ } +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 130 */ String name = getName(); +/* 131 */ String arg1 = name == null ? "" : name; +/* 132 */ SuperRoot owner = getOwner(); +/* */ +/* 134 */ String oname = ""; +/* 135 */ if (owner != null) { +/* 136 */ oname = owner.getName(); +/* */ } +/* 138 */ String arg2 = oname == null ? "" : oname; +/* 139 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 140 */ Console.println(MessageFormat.format( +/* 141 */ Console.message("Teleport-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Teleport.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TeleportAction.java b/NET/worlds/scape/TeleportAction.java new file mode 100644 index 0000000..72871f2 --- /dev/null +++ b/NET/worlds/scape/TeleportAction.java @@ -0,0 +1,761 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.WorldsMarkPart; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.awt.Frame; +/* */ import java.io.IOException; +/* */ import java.net.MalformedURLException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TeleportAction +/* */ extends Action +/* */ implements LoadedURLSelf, MainCallback, DialogReceiver +/* */ { +/* 102 */ private Point3 targetCoords = new Point3(); +/* 103 */ private float targetRot = 0.0F; +/* 104 */ private Point3 targetAxis = new Point3(0.0F, 0.0F, -1.0F); +/* 105 */ private String targetRoomName = null; +/* 106 */ private String targetDimension = null; +/* 107 */ private URL targetWorldURL = null; +/* */ +/* 109 */ private boolean useDefCoordinates = false; +/* 110 */ private boolean done = false; +/* 111 */ private boolean showDialog = true; +/* 112 */ private boolean forceWorldLoad = false; +/* 113 */ private boolean forceNoWorldLoad = false; +/* */ +/* */ +/* */ +/* */ +/* */ private String targetURL; +/* */ +/* */ +/* */ +/* */ +/* 123 */ private static TeleportAction activeTeleport = null; +/* 124 */ private TeleportDialog dialog = null; +/* */ private TeleportStatus doneCallback; +/* */ String tempParseStr; +/* */ +/* */ public TeleportAction() {} +/* */ +/* 130 */ public Persister trigger(Event e, Persister seqID) { if (activeTeleport != this) { +/* 131 */ this.targetURL = asURL(); +/* 132 */ startTeleport(); +/* */ } +/* */ +/* */ +/* 136 */ return (this.done) || (activeTeleport == this) ? null : this; +/* */ } +/* */ +/* */ public void stopLoading() { +/* 140 */ this.done = true; +/* 141 */ if (activeTeleport == this) { +/* 142 */ stopTeleport(null); +/* */ } +/* */ } +/* */ +/* */ public static boolean isTeleporting() +/* */ { +/* 148 */ return activeTeleport != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void teleport(String url, TeleportStatus callback) +/* */ { +/* 166 */ TeleportAction t = new TeleportAction(url, callback); +/* */ +/* 168 */ if (Main.isMainThread()) { +/* 169 */ t.startTeleport(); +/* */ } else { +/* 171 */ Main.register(t); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void teleport(String url, TeleportStatus callback, boolean forceWorldLoad) +/* */ { +/* 183 */ TeleportAction t = new TeleportAction(url, callback); +/* 184 */ t.forceWorldLoad = forceWorldLoad; +/* 185 */ t.forceNoWorldLoad = (!forceWorldLoad); +/* */ +/* 187 */ if (Main.isMainThread()) { +/* 188 */ t.startTeleport(); +/* */ } else { +/* 190 */ Main.register(t); +/* */ } +/* */ } +/* */ +/* */ public static void teleport(String url, TeleportStatus callback, boolean forceWorldLoad, boolean pShowDialog) +/* */ { +/* 196 */ TeleportAction t = new TeleportAction(url, callback); +/* 197 */ t.showDialog = pShowDialog; +/* 198 */ t.forceWorldLoad = forceWorldLoad; +/* 199 */ t.forceNoWorldLoad = (!forceWorldLoad); +/* */ +/* 201 */ if (Main.isMainThread()) { +/* 202 */ t.startTeleport(); +/* */ } else +/* 204 */ Main.register(t); +/* */ } +/* */ +/* */ public void mainCallback() { +/* 208 */ Main.unregister(this); +/* 209 */ startTeleport(); +/* */ } +/* */ +/* */ public static String toURLString(String url) { +/* 213 */ if ((url == null) || (url.equals("world:"))) +/* 214 */ url = WorldsMarkPart.getFirstSystemMarkURL(); +/* 215 */ if (url == null) +/* 216 */ url = "home:NewWorld.world"; +/* 217 */ if (url.startsWith("world:")) { +/* 218 */ if (url.equals("world:restart")) { +/* 219 */ url = IniFile.gamma().getIniString("RestartAt", +/* 220 */ WorldsMarkPart.getFirstSystemMarkURL()); +/* 221 */ } else if (url.equals("world:store")) { +/* 222 */ url = World.getHomeStore().getAbsolute(); +/* */ } else +/* 224 */ url = url.substring(6); +/* 225 */ int i = url.indexOf(".world?"); +/* 226 */ if (i >= 0) +/* 227 */ url = url.substring(0, i) + ".world#" + url.substring(i + 7); +/* */ } +/* 229 */ if (url.indexOf(':') < 0) { +/* 230 */ if ((url.indexOf('/') < 0) && (url.indexOf('\\') < 0) && +/* 231 */ (!url.endsWith(".world"))) { +/* 232 */ url = "home:" + url + "/" + url + ".world"; +/* */ } else +/* 234 */ url = "file:" + url; +/* */ } +/* 236 */ return url; +/* */ } +/* */ +/* */ +/* */ private TeleportAction(String url, TeleportStatus callback) +/* */ { +/* 242 */ this.doneCallback = callback; +/* */ +/* 244 */ this.targetURL = toURLString(url); +/* */ +/* */ +/* 247 */ url = setFromURL(this.targetURL); +/* */ try +/* */ { +/* 250 */ if (this.targetURL.startsWith("http://")) { +/* 251 */ this.targetWorldURL = new URL(url); +/* */ } else { +/* 253 */ this.targetWorldURL = new URL(URL.getCurDir(), +/* 254 */ URL.maybeAddExt(url, ".world")); +/* */ } +/* */ } +/* */ catch (MalformedURLException e) { +/* 258 */ this.targetWorldURL = URL.make("error:\"" + url + '"'); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private float getNextFloat(float def) +/* */ { +/* 273 */ String s = this.tempParseStr; +/* */ +/* 275 */ int end = this.tempParseStr.indexOf(','); +/* 276 */ if (end == -1) +/* */ { +/* 278 */ end = this.tempParseStr.length(); +/* 279 */ this.tempParseStr = ""; +/* */ } else { +/* 281 */ this.tempParseStr = this.tempParseStr.substring(end + 1); +/* */ } +/* */ try { +/* 284 */ return Float.valueOf(s.substring(0, end)).floatValue(); +/* */ } +/* */ catch (NumberFormatException ex) {} +/* 287 */ return def; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String setFromURL(String url) +/* */ { +/* 297 */ this.useDefCoordinates = true; +/* */ +/* 299 */ int roomNameStart = url.lastIndexOf('#'); +/* 300 */ if (roomNameStart >= 0) { +/* 301 */ String rest = url.substring(roomNameStart + 1); +/* 302 */ url = url.substring(0, roomNameStart); +/* */ +/* 304 */ int roomNameEnd = rest.lastIndexOf('@'); +/* 305 */ if (roomNameEnd < 0) { +/* 306 */ this.targetRoomName = rest; +/* */ } +/* */ else { +/* 309 */ this.useDefCoordinates = false; +/* */ +/* 311 */ this.targetRoomName = rest.substring(0, roomNameEnd); +/* */ +/* 313 */ this.tempParseStr = rest.substring(roomNameEnd + 1); +/* */ +/* 315 */ this.targetCoords.x = getNextFloat(this.targetCoords.x); +/* 316 */ this.targetCoords.y = getNextFloat(this.targetCoords.y); +/* 317 */ this.targetCoords.z = getNextFloat(this.targetCoords.z); +/* 318 */ this.targetRot = getNextFloat(this.targetRot); +/* 319 */ this.targetAxis.x = getNextFloat(this.targetAxis.x); +/* 320 */ this.targetAxis.y = getNextFloat(this.targetAxis.y); +/* 321 */ this.targetAxis.z = getNextFloat(this.targetAxis.z); +/* */ +/* 323 */ this.tempParseStr = null; +/* */ } +/* */ } +/* */ +/* */ +/* 328 */ if (this.targetRoomName != null) { +/* 329 */ int rightAngle = this.targetRoomName.lastIndexOf('>'); +/* 330 */ int leftAngle = this.targetRoomName.lastIndexOf('<'); +/* 331 */ if ((rightAngle + 1 == this.targetRoomName.length()) && (leftAngle >= 0)) { +/* 332 */ this.targetDimension = this.targetRoomName.substring(leftAngle + 1, +/* 333 */ rightAngle); +/* 334 */ this.targetRoomName = this.targetRoomName.substring(0, leftAngle); +/* */ } +/* */ } +/* 337 */ return url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void makeTeleportDialog(URL url) +/* */ { +/* 351 */ if (this.showDialog) { +/* 352 */ Frame gf = Console.getFrame(); +/* */ +/* */ +/* 355 */ if ((gf != null) && (gf.isShowing())) { +/* 356 */ this.dialog = new TeleportDialog(gf, this); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void startTeleport() +/* */ { +/* 366 */ if (activeTeleport != null) { +/* 367 */ if (activeTeleport.doneCallback != null) +/* 368 */ activeTeleport.doneCallback.teleportStatus( +/* 369 */ "overridden by new teleport", activeTeleport.targetURL); +/* 370 */ activeTeleport.stopTeleport(null); +/* */ } +/* 372 */ activeTeleport = this; +/* 373 */ Console.setFreezeFrameEvents(true); +/* 374 */ this.done = false; +/* */ +/* */ +/* 377 */ Console.teleportNotification("", this.targetURL); +/* 378 */ if (this.targetWorldURL != null) { +/* 379 */ makeTeleportDialog(this.targetWorldURL); +/* 380 */ World.load(this.targetWorldURL, this, this.forceWorldLoad); +/* */ } else { +/* 382 */ Pilot pilot = Pilot.getActive(); +/* */ World w; +/* 384 */ if ((pilot == null) || ((w = pilot.getWorld()) == null)) { +/* 385 */ stopTeleport("Pilot not in a room for intraworld teleport"); +/* */ } else { World w; +/* 387 */ makeTeleportDialog(w.getSourceURL()); +/* 388 */ loadedURLSelf(w, this.targetWorldURL, null); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Room stopTeleport(String err) +/* */ { +/* 402 */ assert (this == activeTeleport); +/* */ +/* 404 */ this.done = true; +/* 405 */ activeTeleport = null; +/* 406 */ Console.setFreezeFrameEvents(false); +/* */ +/* 408 */ if (this.doneCallback != null) { +/* 409 */ this.doneCallback.teleportStatus(err, this.targetURL); +/* */ } +/* 411 */ if ((err != null) && (!this.forceNoWorldLoad)) +/* */ { +/* 413 */ Console.teleportNotification(err, this.targetURL); +/* */ +/* 415 */ Console.println(err); +/* */ } +/* */ +/* 418 */ if (this.dialog != null) { +/* 419 */ this.dialog.closeIt(true); +/* 420 */ this.dialog = null; +/* */ } +/* */ +/* 423 */ return null; +/* */ } +/* */ +/* */ public synchronized void dialogDone(Object who, boolean confirmed) { +/* 427 */ if (activeTeleport != null) +/* 428 */ activeTeleport.stopTeleport(null); +/* */ } +/* */ +/* */ public static String getReadableNameOfWorld(URL url) { +/* 432 */ String worldDir = url.getAbsolute(); +/* */ +/* 434 */ String readable = worldDir; +/* 435 */ String packageName = null; +/* 436 */ if ((readable.startsWith("home:")) && (readable.length() > 6)) { +/* 437 */ readable = readable.substring(readable.charAt(5) == '/' ? 6 : 5); +/* 438 */ int slash = readable.indexOf('/'); +/* 439 */ if (slash > 0) { +/* 440 */ packageName = readable.substring(0, slash); +/* */ +/* */ +/* 443 */ if (readable.regionMatches(true, slash + 1, readable, 0, slash)) +/* */ { +/* 445 */ readable = packageName; +/* */ +/* 447 */ String s = WorldsMarkPart.getExternalName(readable); +/* 448 */ if (s != null) { +/* 449 */ readable = s; +/* */ } +/* */ } +/* */ } +/* 453 */ int tail = readable.indexOf(".world"); +/* 454 */ if (tail > 0) { +/* 455 */ readable = readable.substring(0, tail); +/* */ } +/* 457 */ readable = "the " + readable + " world"; +/* */ } +/* */ +/* 460 */ return readable; +/* */ } +/* */ +/* */ public static String getPackageNameOfWorld(URL url) { +/* 464 */ String worldDir = url.getAbsolute(); +/* */ +/* 466 */ String readable = worldDir; +/* 467 */ String packageName = null; +/* 468 */ if ((readable.startsWith("home:")) && (readable.length() > 6)) { +/* 469 */ readable = readable.substring(readable.charAt(5) == '/' ? 6 : 5); +/* 470 */ int slash = readable.indexOf('/'); +/* 471 */ if (slash > 0) { +/* 472 */ packageName = readable.substring(0, slash); +/* */ } +/* */ } +/* 475 */ return packageName; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void loadedURLSelf(URLSelf o, URL url, String err) +/* */ { +/* 485 */ if (activeTeleport != this) { +/* 486 */ if (o != null) +/* 487 */ o.decRef(); +/* 488 */ return; +/* */ } +/* */ +/* 491 */ if ((err != null) || (!(o instanceof World))) { +/* 492 */ if (err == null) { +/* 493 */ err = "file " + url + " doesn't contain a World"; +/* 494 */ o.decRef(); +/* */ } +/* */ +/* */ +/* */ +/* 499 */ String readable = getReadableNameOfWorld(url); +/* 500 */ String packageName = getPackageNameOfWorld(url); +/* */ +/* 502 */ Object[] arguments = { new String(readable) }; +/* 503 */ stopTeleport(MessageFormat.format(Console.message("cant-teleport"), arguments)); +/* */ +/* */ +/* 506 */ if ((packageName != null) && (!this.forceNoWorldLoad)) +/* 507 */ NetUpdate.loadWorld(packageName, this.forceWorldLoad); +/* 508 */ return; +/* */ } +/* */ +/* 511 */ String roomName = this.targetRoomName; +/* 512 */ if (roomName == null) { +/* 513 */ roomName = ((World)o).getDefaultRoomName(); +/* */ } +/* 515 */ Room room = ((World)o).getRoom(roomName); +/* 516 */ if (room == null) { +/* 517 */ stopTeleport("Error finding room " + this.targetRoomName); +/* 518 */ return; +/* */ } +/* */ +/* 521 */ if ((room.getVIPOnly()) && (!((World)o).getConsole().getVIP())) +/* */ { +/* 523 */ stopTeleport("Only VIPs may go there."); +/* 524 */ if (this.forceNoWorldLoad) +/* 525 */ Console.println(Console.message("Only-VIPs-there")); +/* 526 */ return; +/* */ } +/* */ +/* */ +/* 530 */ Console.teleportNotification(null, this.targetURL); +/* */ +/* */ +/* */ +/* 534 */ Pilot pilot = Pilot.changeActiveRoom(room); +/* */ +/* */ +/* 537 */ if (this.targetDimension != null) { +/* 538 */ pilot.changeChannel(this.targetDimension); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 547 */ pilot.makeIdentity(); +/* */ +/* 549 */ if (this.useDefCoordinates) +/* */ { +/* 551 */ pilot.moveTo(room.getDefaultPosition()).spin(room.getDefaultOrientationAxis(), +/* 552 */ room.getDefaultOrientation()); +/* */ } else { +/* 554 */ pilot.moveTo(this.targetCoords).spin(this.targetAxis, this.targetRot); +/* */ } +/* 556 */ stopTeleport(null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 566 */ Object ret = null; +/* 567 */ switch (index - offset) { +/* */ case 0: +/* 569 */ if (mode == 0) { +/* 570 */ ret = Point3PropertyEditor.make(new Property(this, index, +/* 571 */ "X, Y, Z")); +/* 572 */ } else if (mode == 1) { +/* 573 */ ret = new Point3(this.targetCoords); +/* 574 */ } else if (mode == 2) { +/* 575 */ this.targetCoords.copy((Point3)value); +/* */ } +/* 577 */ break; +/* */ case 1: +/* 579 */ if (mode == 0) { +/* 580 */ ret = FloatPropertyEditor.make( +/* 581 */ new Property(this, index, "Dir")); +/* 582 */ } else if (mode == 1) { +/* 583 */ ret = new Float(this.targetRot); +/* 584 */ } else if (mode == 2) +/* 585 */ this.targetRot = ((Float)value).floatValue(); +/* 586 */ break; +/* */ case 2: +/* 588 */ if (mode == 0) { +/* 589 */ ret = StringPropertyEditor.make( +/* 590 */ new Property(this, index, "Room Name") +/* 591 */ .allowSetNull()); +/* 592 */ } else if (mode == 1) { +/* 593 */ if (this.targetRoomName == null) { +/* 594 */ ret = ""; +/* */ } else +/* 596 */ ret = new String(this.targetRoomName); +/* 597 */ } else if (mode == 2) { +/* 598 */ this.targetRoomName = ((String)value); +/* 599 */ stopLoading(); +/* */ } +/* 601 */ break; +/* */ case 3: +/* 603 */ if (mode == 0) { +/* 604 */ ret = URLPropertyEditor.make( +/* 605 */ new Property(this, index, "World URL").allowSetNull(), +/* 606 */ "world"); +/* 607 */ } else if (mode == 1) { +/* 608 */ ret = this.targetWorldURL; +/* 609 */ } else if (mode == 2) { +/* 610 */ this.targetWorldURL = ((URL)value); +/* */ +/* */ +/* */ +/* 614 */ stopLoading(); +/* */ } +/* 616 */ break; +/* */ case 4: +/* 618 */ if (mode == 0) { +/* 619 */ ret = BooleanPropertyEditor.make( +/* 620 */ new Property(this, index, "Use default coordinates"), +/* 621 */ "No", "Yes"); +/* 622 */ } else if (mode == 1) { +/* 623 */ ret = new Boolean(this.useDefCoordinates); +/* 624 */ } else if (mode == 2) { +/* 625 */ this.useDefCoordinates = ((Boolean)value).booleanValue(); +/* */ } +/* 627 */ break; +/* */ case 5: +/* 629 */ if (mode == 0) { +/* 630 */ ret = StringPropertyEditor.make( +/* 631 */ new Property(this, index, "Dimension Name") +/* 632 */ .allowSetNull()); +/* 633 */ } else if (mode == 1) { +/* 634 */ if (this.targetDimension == null) { +/* 635 */ ret = ""; +/* */ } else +/* 637 */ ret = new String(this.targetDimension); +/* 638 */ } else if (mode == 2) { +/* 639 */ this.targetDimension = ((String)value); +/* 640 */ if (this.targetDimension.equals("")) +/* 641 */ this.targetDimension = null; +/* 642 */ stopLoading(); +/* */ } +/* 644 */ break; +/* */ case 6: +/* 646 */ if (mode == 0) { +/* 647 */ ret = BooleanPropertyEditor.make( +/* 648 */ new Property(this, index, "Show dialog"), +/* 649 */ "No", "Yes"); +/* 650 */ } else if (mode == 1) { +/* 651 */ ret = new Boolean(this.showDialog); +/* 652 */ } else if (mode == 2) { +/* 653 */ this.showDialog = ((Boolean)value).booleanValue(); +/* */ } +/* 655 */ break; +/* */ default: +/* 657 */ ret = super.properties(index, offset + 7, mode, value); +/* */ } +/* 659 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* 664 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 668 */ s.saveVersion(3, classCookie); +/* 669 */ super.saveState(s); +/* */ +/* 671 */ s.save(this.targetCoords); +/* 672 */ s.saveFloat(this.targetRot); +/* 673 */ s.save(this.targetAxis); +/* 674 */ s.saveString(this.targetRoomName); +/* 675 */ URL.save(s, this.targetWorldURL); +/* 676 */ s.saveBoolean(this.useDefCoordinates); +/* 677 */ s.saveString(this.targetDimension); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 682 */ int vers = r.restoreVersion(classCookie); +/* 683 */ switch (vers) { +/* */ case 0: +/* 685 */ super.restoreState(r); +/* 686 */ this.targetCoords = ((Point3)r.restore()); +/* 687 */ this.targetRot = r.restoreInt(); +/* 688 */ this.targetRoomName = r.restoreString(); +/* 689 */ this.targetWorldURL = URL.restore(r, ".world"); +/* 690 */ this.useDefCoordinates = r.restoreBoolean(); +/* 691 */ this.targetDimension = null; +/* 692 */ break; +/* */ +/* */ case 1: +/* */ case 2: +/* 696 */ super.restoreState(r); +/* 697 */ this.targetCoords = ((Point3)r.restore()); +/* 698 */ this.targetRot = r.restoreFloat(); +/* 699 */ this.targetAxis = ((Point3)r.restore()); +/* 700 */ this.targetRoomName = r.restoreString(); +/* 701 */ this.targetWorldURL = URL.restore(r, ".world"); +/* 702 */ this.useDefCoordinates = r.restoreBoolean(); +/* 703 */ this.targetDimension = null; +/* 704 */ break; +/* */ case 3: +/* 706 */ super.restoreState(r); +/* 707 */ this.targetCoords = ((Point3)r.restore()); +/* 708 */ this.targetRot = r.restoreFloat(); +/* 709 */ this.targetAxis = ((Point3)r.restore()); +/* 710 */ this.targetRoomName = r.restoreString(); +/* 711 */ this.targetWorldURL = URL.restore(r, ".world"); +/* 712 */ this.useDefCoordinates = r.restoreBoolean(); +/* 713 */ this.targetDimension = r.restoreString(); +/* 714 */ break; +/* */ +/* */ default: +/* 717 */ throw new TooNewException(); +/* */ } +/* */ +/* 720 */ if ((vers < 2) && +/* 721 */ (this.targetAxis.x == 0.0F) && (this.targetAxis.y == 0.0F) && (this.targetAxis.z == 1.0F)) +/* */ { +/* 723 */ this.targetAxis.z = -1.0F; +/* 724 */ this.targetRot = (360.0F - this.targetRot); +/* */ } +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 730 */ return super.toString() + "[" + asURL() + "]"; +/* */ } +/* */ +/* */ public String asURL() { +/* */ String url; +/* */ String url; +/* 736 */ if (this.targetWorldURL != null) { +/* 737 */ url = this.targetWorldURL.getRelativeTo(this) + "#"; +/* */ } else { +/* 739 */ url = "#"; +/* */ } +/* 741 */ if (this.targetRoomName != null) +/* 742 */ url = url + this.targetRoomName; +/* 743 */ if (this.targetDimension != null) { +/* 744 */ url = url + "<" + this.targetDimension + ">"; +/* */ } +/* 746 */ if (!this.useDefCoordinates) +/* */ { +/* 748 */ url = url + "@" + this.targetCoords + "," + this.targetRot; +/* 749 */ if ((this.targetAxis.x != 0.0F) || (this.targetAxis.y != 0.0F) || (this.targetAxis.z != 1.0F)) { +/* 750 */ url = url + "," + this.targetAxis; +/* */ } +/* */ } +/* 753 */ return url; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TeleportAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TeleportDialog.java b/NET/worlds/scape/TeleportDialog.java new file mode 100644 index 0000000..6fc290b --- /dev/null +++ b/NET/worlds/scape/TeleportDialog.java @@ -0,0 +1,67 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.ImageButtons; +/* */ import NET.worlds.console.ImageButtonsCallback; +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Rectangle; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TeleportDialog +/* */ extends PolledDialog +/* */ implements ImageButtonsCallback +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private ImageButtons ib; +/* */ +/* */ public TeleportDialog(Window parent, DialogReceiver receiver) +/* */ { +/* 30 */ super(parent, receiver, Console.message("Teleporting"), true); +/* 31 */ Rectangle[] rects = new Rectangle[1]; +/* 32 */ int cancelX = IniFile.override().getIniInt("teleportCancelX", 61); +/* 33 */ int cancelY = IniFile.override().getIniInt("teleportCancelY", 24); +/* 34 */ int cancelW = IniFile.override().getIniInt("teleportCancelW", 84); +/* 35 */ int cancelH = IniFile.override().getIniInt("teleportCancelH", 20); +/* 36 */ rects[0] = new Rectangle(cancelX, cancelY, cancelW, cancelH); +/* 37 */ String teleportGif = IniFile.override().getIniString("teleportDlg", +/* 38 */ Console.message("hangon.gif")); +/* 39 */ this.ib = new ImageButtons(teleportGif, rects, this); +/* 40 */ ready(); +/* */ } +/* */ +/* */ protected void build() +/* */ { +/* 45 */ add("Center", this.ib); +/* */ } +/* */ +/* */ public Object imageButtonsCallback(Component who, int which) +/* */ { +/* 50 */ done(false); +/* 51 */ return null; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) +/* */ { +/* 57 */ if (key == 27) +/* 58 */ return done(false); +/* 59 */ return super.keyDown(event, key); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TeleportDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TeleportStatus.java b/NET/worlds/scape/TeleportStatus.java new file mode 100644 index 0000000..593507b --- /dev/null +++ b/NET/worlds/scape/TeleportStatus.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface TeleportStatus +{ + public abstract void teleportStatus(String paramString1, String paramString2); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TeleportStatus.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Texture.java b/NET/worlds/scape/Texture.java new file mode 100644 index 0000000..4d68b7f --- /dev/null +++ b/NET/worlds/scape/Texture.java @@ -0,0 +1,162 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.net.MalformedURLException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class Texture +/* */ implements Persister +/* */ { +/* 30 */ protected int textureID = 0; +/* 31 */ int refs = 1; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 44 */ nativeInit(); +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ private static native int nativeGetW(int paramInt); +/* */ +/* 51 */ public int getW() { return nativeGetW(this.textureID); } +/* */ +/* */ +/* */ private static native int nativeGetH(int paramInt); +/* */ +/* */ public int getH() +/* */ { +/* 58 */ return nativeGetH(this.textureID); +/* */ } +/* */ +/* 61 */ private static Object classCookie = new Object(); +/* */ +/* */ public URL getURL() +/* */ { +/* 65 */ URL u = null; +/* 66 */ String s = getName(); +/* 67 */ if (s != null) { +/* */ try { +/* 69 */ u = new URL(URL.getCurDir(), s); +/* */ } +/* */ catch (MalformedURLException localMalformedURLException) {} +/* */ } +/* 73 */ return u; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void incRef() +/* */ { +/* 82 */ assert (this.refs > 0); +/* */ +/* 84 */ if (this.textureID != 0) { +/* 85 */ this.refs += 1; +/* */ } +/* */ } +/* */ +/* */ +/* */ public void copyFrom(int dc, int x1, int x2, int y1, int y2) +/* */ { +/* 92 */ assert (this.textureID != 0); +/* 93 */ nativeCopyFrom(this.textureID, dc, x1, x2, y1, y2); +/* */ } +/* */ +/* */ +/* */ +/* */ private static native void nativeCopyFrom(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6); +/* */ +/* */ +/* */ private static native void nativeRelease(int paramInt); +/* */ +/* */ +/* */ public synchronized void decRef() +/* */ { +/* 106 */ if (--this.refs <= 0) +/* */ { +/* */ +/* 109 */ if (this.textureID != 0) { +/* 110 */ nativeRelease(this.textureID); +/* 111 */ this.textureID = 0; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void finalize() +/* */ { +/* 121 */ if (this.refs > 0) { +/* 122 */ this.refs = 1; +/* 123 */ decRef(); +/* */ +/* */ +/* 126 */ this.refs = 1000000; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected String getName() +/* */ { +/* 135 */ return null; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 139 */ s.saveVersion(0, classCookie); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 145 */ switch (r.restoreVersion(classCookie)) +/* */ { +/* */ case 0: +/* */ break; +/* */ +/* */ default: +/* 151 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Texture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TextureDecoder.java b/NET/worlds/scape/TextureDecoder.java new file mode 100644 index 0000000..b63be42 --- /dev/null +++ b/NET/worlds/scape/TextureDecoder.java @@ -0,0 +1,133 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.File; +/* */ import java.util.Hashtable; +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class TextureDecoder +/* */ { +/* 36 */ protected static Hashtable handlers = new Hashtable(); +/* */ +/* */ +/* */ +/* */ +/* */ private static TextureDecoder defaultDecoder; +/* */ +/* */ +/* */ +/* */ private static String allExts; +/* */ +/* */ +/* */ +/* */ +/* */ static +/* */ { +/* 52 */ addHandler(defaultDecoder = new FileTextureDecoder()); +/* 53 */ addHandler(new StandardTextureDecoder()); +/* 54 */ addHandler(new ScapePicTextureDecoder()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract String getExts(); +/* */ +/* */ +/* */ +/* */ +/* */ protected abstract Texture read(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ +/* */ private static void addHandler(TextureDecoder decoder) +/* */ { +/* 72 */ StringTokenizer e = new StringTokenizer(decoder.getExts(), ";"); +/* 73 */ while (e.hasMoreTokens()) { +/* 74 */ String ext = e.nextToken().toLowerCase(); +/* 75 */ handlers.put(ext, decoder); +/* 76 */ if (allExts == null) { +/* 77 */ allExts = ext; +/* */ } else { +/* 79 */ allExts = allExts + File.pathSeparator + ext; +/* */ } +/* */ } +/* */ } +/* */ +/* */ public static String getAllExts() { +/* 85 */ return allExts; +/* */ } +/* */ +/* */ public static String getJavaExts() +/* */ { +/* 90 */ return new StandardTextureDecoder().getExts(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static Texture decode(URL url, String filename) +/* */ { +/* 99 */ return decode(url, url.getAbsolute(), filename); +/* */ } +/* */ +/* */ +/* */ public static Texture decode(URL url, String lookupName, String filename) +/* */ { +/* 105 */ Texture tex = FileTexture.dictLookup(lookupName); +/* 106 */ if (tex != null) { +/* 107 */ return tex; +/* */ } +/* 109 */ String urlName = url.getInternal(); +/* */ +/* */ +/* 112 */ int delim = urlName.lastIndexOf('.'); +/* 113 */ int lastPath = urlName.lastIndexOf('/'); +/* 114 */ lastPath = Math.max(lastPath, urlName.lastIndexOf('\\')); +/* 115 */ lastPath = Math.max(lastPath, urlName.lastIndexOf(':')); +/* 116 */ if (delim > lastPath) { +/* 117 */ String ext = urlName.substring(delim + 1).toLowerCase(); +/* 118 */ TextureDecoder decoder = (TextureDecoder)handlers.get(ext); +/* 119 */ if (decoder != null) { +/* 120 */ Texture t = decoder.read(lookupName, filename); +/* 121 */ if (t.textureID != 0) +/* 122 */ return t; +/* */ } +/* */ } +/* 125 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TextureDecoder.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TextureSurface.java b/NET/worlds/scape/TextureSurface.java new file mode 100644 index 0000000..eae6b72 --- /dev/null +++ b/NET/worlds/scape/TextureSurface.java @@ -0,0 +1,104 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ public class TextureSurface +/* */ { +/* */ private Texture[] _textures; +/* */ +/* */ private int _hwnd; +/* */ +/* */ private int _oldObject; +/* */ +/* */ private int _offscreen; +/* */ +/* */ private int _texWidth; +/* */ +/* */ private int _texHeight; +/* */ +/* */ private int _width; +/* */ +/* */ private int _height; +/* */ private int _rows; +/* */ private int _cols; +/* */ +/* */ public TextureSurface(Texture[] texList, int rows, int w, int h) +/* */ { +/* 26 */ this._width = w; +/* 27 */ this._height = h; +/* 28 */ this._oldObject = 0; +/* */ +/* 30 */ this._hwnd = nativeInit(w, h); +/* 31 */ this._offscreen = nativeMakeDC(this._hwnd, w, h); +/* */ +/* 33 */ if (texList != null) { +/* 34 */ setTextures(texList, rows); +/* */ } +/* */ } +/* */ +/* */ public void finalize() { +/* 39 */ nativeDestroyDC(this._offscreen); +/* 40 */ this._oldObject = 0; +/* */ } +/* */ +/* */ public void setTextures(Texture[] texList, int rows) +/* */ { +/* 45 */ this._textures = texList; +/* */ +/* */ +/* 48 */ this._rows = rows; +/* 49 */ this._cols = (texList.length / rows); +/* 50 */ this._texWidth = (this._width / this._cols); +/* 51 */ this._texHeight = (this._height / this._rows); +/* */ } +/* */ +/* */ +/* */ public synchronized boolean draw(TextureSurfaceRenderer renderer) +/* */ { +/* 57 */ renderer.renderTo(this._offscreen); +/* */ +/* */ +/* 60 */ int idx = 0; +/* 61 */ for (int row = this._rows - 1; row >= 0; row--) +/* */ { +/* 63 */ for (int col = 0; col < this._cols; col++) +/* */ { +/* 65 */ if (this._textures[idx] != null) +/* */ { +/* 67 */ this._textures[idx].copyFrom(this._offscreen, +/* 68 */ col * this._texWidth, (col + 1) * this._texWidth, +/* 69 */ row * this._texHeight, (row + 1) * this._texHeight); +/* */ } +/* 71 */ idx++; +/* */ } +/* */ } +/* */ +/* 75 */ return false; +/* */ } +/* */ +/* */ public void sendLeftClick(int x, int y) +/* */ { +/* 80 */ nativeLeftClick(this._hwnd, x, y); +/* */ } +/* */ +/* 83 */ public int getHwnd() { return this._hwnd; } +/* 84 */ public int getWidth() { return this._width; } +/* 85 */ public int getHeight() { return this._height; } +/* */ +/* */ private native int nativeInit(int paramInt1, int paramInt2); +/* */ +/* */ private native int nativeMakeDC(int paramInt1, int paramInt2, int paramInt3); +/* */ +/* */ private native int nativeGetDC(int paramInt); +/* */ +/* */ private native void nativeReleaseDC(int paramInt1, int paramInt2); +/* */ +/* */ private native void nativeDestroyDC(int paramInt); +/* */ +/* */ private native void nativeLeftClick(int paramInt1, int paramInt2, int paramInt3); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TextureSurface.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TextureSurfaceRenderer.java b/NET/worlds/scape/TextureSurfaceRenderer.java new file mode 100644 index 0000000..80f3a6b --- /dev/null +++ b/NET/worlds/scape/TextureSurfaceRenderer.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface TextureSurfaceRenderer +{ + public abstract void renderTo(int paramInt); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TextureSurfaceRenderer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Toggle.java b/NET/worlds/scape/Toggle.java new file mode 100644 index 0000000..1866b2d --- /dev/null +++ b/NET/worlds/scape/Toggle.java @@ -0,0 +1,209 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Toggle +/* */ extends TriggeredSwitchableBehavior +/* */ implements Persister, FrameHandler, MouseDownHandler, BumpHandler +/* */ { +/* */ protected boolean toggleBumpable; +/* */ protected boolean toggleVisible; +/* */ protected WObject o; +/* 25 */ protected boolean initialized = false; +/* */ +/* */ public Toggle() +/* */ { +/* 29 */ this.trigger = new String("none"); +/* 30 */ this.externalTriggerTag = new String(""); +/* 31 */ this.toggleBumpable = true; +/* 32 */ this.toggleVisible = true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void ExternalTrigger(Trigger trigger_source, int sequence_no, int event_no) +/* */ { +/* 41 */ this.trigger_source = trigger_source; +/* 42 */ this.sequence_no = sequence_no; +/* 43 */ this.event_no = event_no; +/* 44 */ toggle(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void toggle() +/* */ { +/* 52 */ if (this.toggleBumpable) { +/* 53 */ this.o.setBumpable(true); +/* */ } else { +/* 55 */ this.o.setBumpable(false); +/* */ } +/* 57 */ if (this.toggleVisible) { +/* 58 */ this.o.setVisible(true); +/* */ } else { +/* 60 */ this.o.setVisible(false); +/* */ } +/* 62 */ if (this.trigger_source != null) { +/* 63 */ this.trigger_source.registerFinishedTriggerTag(this.sequence_no, this.event_no); +/* */ } +/* */ } +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 70 */ if (!this.initialized) { +/* 71 */ this.o = e.receiver; +/* 72 */ this.initialized = true; +/* */ } +/* 74 */ return true; +/* */ } +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 80 */ if ((this.enabled) && +/* 81 */ (this.trigger.equals("click"))) { +/* 82 */ toggle(); +/* */ } +/* */ +/* 85 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 90 */ if ((this.enabled) && +/* 91 */ (this.trigger.equals("bump"))) { +/* 92 */ toggle(); +/* */ } +/* */ +/* 95 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 104 */ Object ret = null; +/* 105 */ switch (index - offset) { +/* */ case 0: +/* 107 */ if (mode == 0) { +/* 108 */ ret = StringPropertyEditor.make( +/* 109 */ new Property(this, index, "Trigger")); +/* 110 */ } else if (mode == 1) { +/* 111 */ ret = new String(this.trigger); +/* 112 */ } else if (mode == 2) { +/* 113 */ this.trigger = ((String)value).toString().trim(); +/* 114 */ if (this.trigger.equals("external")) { +/* 115 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 116 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 117 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ } +/* */ +/* 121 */ break; +/* */ case 1: +/* 123 */ if (mode == 0) { +/* 124 */ ret = StringPropertyEditor.make( +/* 125 */ new Property(this, index, "External Trigger Tag")); +/* 126 */ } else if (mode == 1) { +/* 127 */ ret = new String(this.externalTriggerTag); +/* 128 */ } else if (mode == 2) { +/* 129 */ this.externalTriggerTag = ((String)value).toString().trim(); +/* */ } +/* 131 */ break; +/* */ case 2: +/* 133 */ if (mode == 0) { +/* 134 */ ret = BooleanPropertyEditor.make( +/* 135 */ new Property(this, index, "Toggle Bumpable"), +/* 136 */ "No", "Yes"); +/* 137 */ } else if (mode == 1) { +/* 138 */ ret = new Boolean(this.toggleBumpable); +/* 139 */ } else if (mode == 2) +/* 140 */ this.toggleBumpable = ((Boolean)value).booleanValue(); +/* 141 */ break; +/* */ case 3: +/* 143 */ if (mode == 0) { +/* 144 */ ret = BooleanPropertyEditor.make( +/* 145 */ new Property(this, index, "Toggle Visible"), +/* 146 */ "No", "Yes"); +/* 147 */ } else if (mode == 1) { +/* 148 */ ret = new Boolean(this.toggleVisible); +/* 149 */ } else if (mode == 2) +/* 150 */ this.toggleVisible = ((Boolean)value).booleanValue(); +/* 151 */ break; +/* */ default: +/* 153 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* 155 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 160 */ return +/* 161 */ super.toString() + "[" + " enabled " + this.enabled + ", trigger " + this.trigger + ", externalTriggerTag " + this.externalTriggerTag + "]"; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 167 */ s.saveString(this.trigger); +/* 168 */ s.saveString(this.externalTriggerTag); +/* 169 */ s.saveBoolean(this.toggleBumpable); +/* 170 */ s.saveBoolean(this.toggleVisible); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 176 */ this.trigger = r.restoreString(); +/* 177 */ if (this.trigger.equals("external")) { +/* 178 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 179 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 180 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* 182 */ this.externalTriggerTag = r.restoreString(); +/* 183 */ this.toggleBumpable = r.restoreBoolean(); +/* 184 */ this.toggleVisible = r.restoreBoolean(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 191 */ String name = getName(); +/* 192 */ String arg1 = name == null ? "" : name; +/* 193 */ SuperRoot owner = getOwner(); +/* 194 */ String oname = ""; +/* 195 */ if (owner != null) { +/* 196 */ oname = owner.getName(); +/* */ } +/* 198 */ String arg2 = oname == null ? "" : oname; +/* 199 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 200 */ Console.println(MessageFormat.format( +/* 201 */ Console.message("Toggle-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Toggle.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ToggleZoomMode.java b/NET/worlds/scape/ToggleZoomMode.java new file mode 100644 index 0000000..0ebabd5 --- /dev/null +++ b/NET/worlds/scape/ToggleZoomMode.java @@ -0,0 +1,48 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ToggleZoomMode +/* */ extends Action +/* */ { +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 31 */ if ((!(e.receiver instanceof Pilot)) || (!((Pilot)e.receiver).isActive())) { +/* 32 */ return null; +/* */ } +/* 34 */ Window w = Window.getMainWindow(); +/* 35 */ if (w == null) { +/* 36 */ return null; +/* */ } +/* 38 */ w.setDeltaMode(!w.getDeltaMode()); +/* */ +/* 40 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ToggleZoomMode.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TooNewException.java b/NET/worlds/scape/TooNewException.java new file mode 100644 index 0000000..b661944 --- /dev/null +++ b/NET/worlds/scape/TooNewException.java @@ -0,0 +1,37 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TooNewException +/* */ extends Exception +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TooNewException() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TooNewException(String s) +/* */ { +/* 29 */ super(s); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TooNewException.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ToolBar.java b/NET/worlds/scape/ToolBar.java new file mode 100644 index 0000000..c20c983 --- /dev/null +++ b/NET/worlds/scape/ToolBar.java @@ -0,0 +1,265 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogDisabled; +/* */ import NET.worlds.console.ExposedPanel; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.Window; +/* */ import java.awt.Color; +/* */ import java.awt.Event; +/* */ import java.awt.FlowLayout; +/* */ import java.awt.Rectangle; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class ToolBar +/* */ extends ExposedPanel +/* */ implements MainCallback, DialogDisabled +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* 31 */ private Vector buttons = new Vector(); +/* */ private WidgetButton active; +/* */ private boolean activeDown; +/* */ private WidgetButton entered; +/* */ private WObject curWObj; +/* 36 */ private boolean haveDelta = false; +/* */ private WObjectHighlighter highlight; +/* */ private boolean initialDrag; +/* */ private boolean isDialogDisabled; +/* */ private boolean testConstrained; +/* */ +/* */ public ToolBar() { +/* 43 */ setLayout(new FlowLayout(0, 1, 1)); +/* 44 */ addButton(new HTransWidget(this)); +/* 45 */ addButton(new VTransWidget(this)); +/* 46 */ addButton(new PitchWidget(this)); +/* 47 */ addButton(new RollWidget(this)); +/* 48 */ addButton(new YawWidget(this)); +/* 49 */ addButton(new ScaleWidget(this)); +/* 50 */ addButton(new CutWidget(this)); +/* 51 */ addButton(new CopyWidget(this)); +/* 52 */ addButton(new PasteWidget(this)); +/* 53 */ addButton(new SaveWidget(this)); +/* 54 */ addButton(new UndoWidget(this)); +/* 55 */ setBackground(Color.lightGray); +/* */ } +/* */ +/* */ public void done() +/* */ { +/* 60 */ if (this.highlight != null) { +/* 61 */ this.highlight.stop(); +/* */ } +/* */ } +/* */ +/* */ private void addButton(WidgetButton button) { +/* 66 */ add(button); +/* 67 */ this.buttons.addElement(button); +/* */ } +/* */ +/* */ public void setCurrentObject(Object obj) +/* */ { +/* 72 */ this.curWObj = ((obj instanceof WObject) ? (WObject)obj : null); +/* 73 */ if (this.highlight != null) { +/* 74 */ this.highlight.stop(); +/* 75 */ this.highlight = null; +/* */ } +/* 77 */ if (this.curWObj != null) +/* 78 */ this.highlight = new WObjectHighlighter(this.curWObj); +/* 79 */ Enumeration e = this.buttons.elements(); +/* 80 */ clearPrompt(); +/* 81 */ while (e.hasMoreElements()) { +/* 82 */ ((WidgetButton)e.nextElement()).repaint(); +/* */ } +/* */ } +/* */ +/* */ public WObject getCurrentWObject() { +/* 87 */ return this.curWObj; +/* */ } +/* */ +/* */ public void dialogDisable(boolean disable) +/* */ { +/* 92 */ this.isDialogDisabled = disable; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean handleEvent(Event event) +/* */ { +/* 98 */ if (this.isDialogDisabled) +/* 99 */ return false; +/* 100 */ return super.handleEvent(event); +/* */ } +/* */ +/* */ @Deprecated +/* */ public synchronized boolean mouseDown(Event event, int x, int y) +/* */ { +/* */ WidgetButton button; +/* 107 */ if (((event.target instanceof WidgetButton)) && +/* 108 */ ((event.modifiers & 0x4) == 0) && (this.active == null) && +/* 109 */ ((button = (WidgetButton)event.target).available())) { +/* 110 */ this.active = button; +/* 111 */ this.active.draw(true); +/* 112 */ if (this.active.usesDrag()) { +/* 113 */ this.initialDrag = true; +/* 114 */ this.highlight.stop(); +/* 115 */ Window.hideCursor(); +/* 116 */ Main.register(this); +/* */ +/* */ +/* 119 */ this.haveDelta = true; +/* */ } +/* */ else { +/* 122 */ this.activeDown = true; +/* */ } } +/* 124 */ return true; +/* */ } +/* */ +/* */ private boolean constrainToX; +/* */ private boolean constrainToY; +/* */ private int cumx; +/* */ private int cumy; +/* 131 */ private float motionDivisor = 1.0F; +/* */ private static final int constrainThresh = 5; +/* */ +/* */ @Deprecated +/* */ public synchronized boolean mouseDrag(Event event, int x, int y) +/* */ { +/* 137 */ if (this.active != null) { +/* 138 */ if (this.active.usesDrag()) +/* */ { +/* 140 */ if (((event.modifiers & 0x1) != 0) && +/* 141 */ (!this.constrainToX) && (!this.constrainToY)) { +/* 142 */ this.testConstrained = true; +/* 143 */ this.cumx = (this.cumy = 0); +/* */ } +/* */ +/* 146 */ this.motionDivisor = ((event.modifiers & 0x2) != 0 ? +/* 147 */ 10.0F : 1.0F); +/* 148 */ this.haveDelta = true; +/* */ } +/* */ else { +/* 151 */ boolean inside = this.active.getBounds().contains(x, y); +/* 152 */ if (inside != this.activeDown) +/* 153 */ this.active.draw(this.activeDown = inside); +/* */ } +/* */ } +/* 156 */ return true; +/* */ } +/* */ +/* */ public synchronized void mainCallback() +/* */ { +/* 161 */ if ((this.haveDelta) && (this.active != null)) { +/* 162 */ int[] pos = Window.getHiddenCursorDelta(); +/* 163 */ if (this.testConstrained) { +/* 164 */ this.cumx += pos[0]; +/* 165 */ this.cumy += pos[1]; +/* 166 */ int acumx = Math.abs(this.cumx); +/* 167 */ int acumy = Math.abs(this.cumy); +/* 168 */ if (acumx > acumy + 5) { +/* 169 */ this.constrainToX = true; +/* 170 */ } else if (acumy > acumx + 5) { +/* 171 */ this.constrainToY = true; +/* */ } else +/* 173 */ return; +/* 174 */ this.testConstrained = false; +/* */ } +/* 176 */ if (this.constrainToX) { +/* 177 */ pos[0] += this.cumx; +/* 178 */ this.cumx = 0; +/* 179 */ pos[1] = 0; +/* */ } +/* 181 */ else if (this.constrainToY) { +/* 182 */ pos[1] += this.cumy; +/* 183 */ this.cumy = 0; +/* 184 */ pos[0] = 0; +/* */ } +/* 186 */ setPrompt(this.active.drag(this.initialDrag, pos[0] / this.motionDivisor, +/* 187 */ -pos[1] / this.motionDivisor)); +/* 188 */ this.initialDrag = false; +/* 189 */ this.haveDelta = false; +/* */ } +/* */ } +/* */ +/* */ @Deprecated +/* */ public synchronized boolean mouseUp(Event event, int x, int y) +/* */ { +/* 196 */ if (this.active != null) { +/* 197 */ this.active.draw(false); +/* 198 */ boolean needUpdate = true; +/* 199 */ if (this.active.usesDrag()) { +/* 200 */ this.highlight.start(); +/* 201 */ Main.unregister(this); +/* 202 */ } else if (this.activeDown) { +/* 203 */ this.active.perform(); +/* 204 */ this.activeDown = false; +/* */ } +/* */ else { +/* 207 */ needUpdate = false; } +/* 208 */ this.active = null; +/* 209 */ if (needUpdate) +/* 210 */ Console.getFrame().getEditTile().update(); +/* */ } +/* 212 */ return true; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean mouseEnter(Event event, int x, int y) +/* */ { +/* */ WidgetButton button; +/* 219 */ if ((this.active == null) && ((event.target instanceof WidgetButton)) && +/* 220 */ ((button = (WidgetButton)event.target).available())) { +/* 221 */ this.entered = button; +/* 222 */ setPrompt(this.entered.getPrompt()); +/* */ } +/* 224 */ return true; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean mouseMove(Event event, int x, int y) +/* */ { +/* 230 */ return mouseEnter(event, x, y); +/* */ } +/* */ +/* */ @Deprecated +/* */ public synchronized boolean keyUp(Event event, int key) +/* */ { +/* 236 */ if ((event.modifiers & 0x1) == 0) +/* 237 */ this.testConstrained = (this.constrainToX = this.constrainToY = 0); +/* 238 */ return true; +/* */ } +/* */ +/* */ public void setPrompt(String prompt) +/* */ { +/* 243 */ Console.getFrame().getEditTile().setPrompt(prompt); +/* */ } +/* */ +/* */ private void clearPrompt() +/* */ { +/* 248 */ this.entered = null; +/* 249 */ Console.getFrame().getEditTile().setPrompt(null); +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean mouseExit(Event event, int x, int y) +/* */ { +/* 255 */ if ((this.active == null) && (event.target == this.entered)) +/* 256 */ clearPrompt(); +/* 257 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ToolBar.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ToolTipManager.java b/NET/worlds/scape/ToolTipManager.java new file mode 100644 index 0000000..a0452d8 --- /dev/null +++ b/NET/worlds/scape/ToolTipManager.java @@ -0,0 +1,143 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.MultiLineLabel; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import NET.worlds.core.IniFile; +/* */ import java.awt.Color; +/* */ import java.awt.Font; +/* */ import java.awt.Point; +/* */ import java.awt.Window; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class ToolTipManager +/* */ { +/* 22 */ private static ToolTipManager manager_ = null; +/* */ private static final int FRAME_DELAY = 15; +/* */ private int savedX; +/* */ private int savedY; +/* */ private int savedLoops; +/* */ private boolean toolTipActive; +/* */ private WObject savedObject; +/* */ private Window toolTipWindow; +/* */ private MultiLineLabel toolTipTextArea; +/* */ private Font toolTipFont; +/* */ +/* */ private ToolTipManager() +/* */ { +/* 35 */ this.savedX = (this.savedY = this.savedLoops = 0); +/* 36 */ this.toolTipActive = false; +/* 37 */ this.savedObject = null; +/* */ +/* */ +/* 40 */ this.toolTipFont = new Font("Arial", 0, 10); +/* 41 */ Console.getActive(); +/* */ +/* 43 */ this.toolTipWindow = new Window(Console.getFrame()); +/* 44 */ this.toolTipTextArea = new MultiLineLabel(); +/* 45 */ this.toolTipTextArea.setBackground(Color.yellow); +/* 46 */ this.toolTipTextArea.setForeground(Color.black); +/* 47 */ this.toolTipTextArea.setMarginWidth(2); +/* 48 */ this.toolTipTextArea.setMarginHeight(2); +/* 49 */ this.toolTipWindow.setFont(this.toolTipFont); +/* 50 */ this.toolTipWindow.add(this.toolTipTextArea); +/* */ } +/* */ +/* */ public static ToolTipManager toolTipManager() +/* */ { +/* 55 */ if (manager_ == null) +/* */ { +/* 57 */ manager_ = new ToolTipManager(); +/* */ } +/* */ +/* 60 */ return manager_; +/* */ } +/* */ +/* */ public void heartbeat() +/* */ { +/* 65 */ if (IniFile.gamma().getIniInt("DisableToolTips", 0) == 1) +/* */ { +/* */ +/* 68 */ return; +/* */ } +/* */ +/* 71 */ WObject obj = Camera.getMousePickWObject(); +/* 72 */ int x = (int)Camera.getMousePickX(); +/* 73 */ int y = (int)Camera.getMousePickY(); +/* */ +/* */ +/* 76 */ if ((obj != null) && (x > 0) && (y > 0) && +/* 77 */ (x == this.savedX) && (y == this.savedY) && (this.savedObject == obj)) +/* */ { +/* 79 */ this.savedLoops += 1; +/* */ } +/* */ else +/* */ { +/* 83 */ if (this.toolTipActive) +/* */ { +/* 85 */ removeToolTip(); +/* 86 */ this.toolTipActive = false; +/* */ } +/* 88 */ this.savedLoops = 0; +/* */ } +/* */ +/* 91 */ if ((!this.toolTipActive) && (obj != null) && +/* 92 */ (this.savedLoops > 15)) +/* */ { +/* 94 */ this.toolTipActive = true; +/* 95 */ if (obj != null) +/* */ { +/* 97 */ this.savedObject = obj; +/* 98 */ if (obj.getToolTipText() != null) +/* */ { +/* 100 */ String oldText = obj.getToolTipText(); +/* 101 */ String newText = oldText.replace('|', '\n'); +/* 102 */ createToolTip(this.savedX, this.savedY, newText); +/* */ } +/* */ } +/* */ } +/* */ +/* 107 */ this.savedX = x; +/* 108 */ this.savedY = y; +/* 109 */ this.savedObject = obj; +/* */ } +/* */ +/* */ void createToolTip(int winX, int winY, String text) +/* */ { +/* 114 */ int baseX = ((DefaultConsole)Console.getActive()).getRender().getLocationOnScreen().x; +/* 115 */ int baseY = ((DefaultConsole)Console.getActive()).getRender().getLocationOnScreen().y; +/* 116 */ int offsetX = 16; +/* 117 */ int offsetY = 16; +/* */ +/* 119 */ this.toolTipWindow.setLocation(winX + baseX + offsetX, winY + baseY + offsetY); +/* 120 */ this.toolTipTextArea.setLabel(text); +/* 121 */ this.toolTipWindow.setSize(this.toolTipTextArea.getPreferredSize()); +/* 122 */ this.toolTipWindow.setEnabled(false); +/* 123 */ this.toolTipWindow.setVisible(true); +/* */ } +/* */ +/* */ +/* */ public void removeToolTip() +/* */ { +/* 129 */ this.toolTipWindow.setVisible(false); +/* */ } +/* */ +/* */ public void killToolTip() +/* */ { +/* 134 */ this.savedLoops = 0; +/* 135 */ this.toolTipWindow.setVisible(false); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ToolTipManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TradeAction.java b/NET/worlds/scape/TradeAction.java new file mode 100644 index 0000000..fd147c6 --- /dev/null +++ b/NET/worlds/scape/TradeAction.java @@ -0,0 +1,172 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TradeAction +/* */ extends DialogAction +/* */ { +/* 25 */ int userItems = 1; +/* 26 */ String userItem = "A"; +/* 27 */ int serverItems = 1; +/* 28 */ String serverItem = "A"; +/* */ +/* */ +/* */ public void doIt() +/* */ { +/* 33 */ StringBuffer deal = new StringBuffer(); +/* 34 */ deal.append("&|+deal>TRADE "); +/* 35 */ if (this.userItems > 0) { +/* 36 */ deal.append(this.userItem); +/* 37 */ deal.append(this.userItems); +/* */ } +/* 39 */ deal.append(","); +/* 40 */ if (this.serverItems > 0) { +/* 41 */ deal.append(this.serverItem); +/* 42 */ deal.append(this.serverItems); +/* */ } +/* */ +/* 45 */ final String dealStr = deal.toString(); +/* */ +/* 47 */ Main.register(new MainCallback() { +/* */ public void mainCallback() { +/* 49 */ Pilot.sendText("TRADE", dealStr); +/* 50 */ Main.unregister(this); +/* */ } +/* */ }); +/* */ } +/* */ +/* */ public PolledDialog getDialog() +/* */ { +/* 57 */ if (InventoryManager.getInventoryManager().checkInventoryFor(this.userItem) >= this.userItems) { +/* 58 */ return new OkCancelDialog(Console.getFrame(), this, +/* 59 */ "Trade?", +/* 60 */ "No", "Yes", +/* 61 */ "Do you want to give " + +/* 62 */ InventoryManager.getInventoryManager().itemName(this.userItem, this.userItems) + +/* 63 */ " in return for " + +/* 64 */ InventoryManager.getInventoryManager().itemName(this.serverItem, this.serverItems) + +/* 65 */ "?", +/* 66 */ false); +/* */ } +/* 68 */ return new OkCancelDialog(Console.getFrame(), this, +/* 69 */ "Can't trade!", +/* 70 */ "Ok", null, +/* 71 */ "You need " + InventoryManager.getInventoryManager().itemName(this.userItem, this.userItems) + +/* 72 */ " in order to trade here.", +/* 73 */ false); +/* */ } +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 81 */ Object ret = null; +/* 82 */ switch (index - offset) { +/* */ case 0: +/* 84 */ if (mode == 0) { +/* 85 */ ret = StringPropertyEditor.make( +/* 86 */ new Property(this, index, "User Item Type")); +/* 87 */ } else if (mode == 1) { +/* 88 */ ret = this.userItem; +/* 89 */ } else if (mode == 2) { +/* 90 */ this.userItem = ((String)value).toString().trim(); +/* */ } +/* 92 */ break; +/* */ case 1: +/* 94 */ if (mode == 0) { +/* 95 */ ret = IntegerPropertyEditor.make( +/* 96 */ new Property(this, index, "Number of User Items")); +/* 97 */ } else if (mode == 1) { +/* 98 */ ret = new Integer(this.userItems); +/* 99 */ } else if (mode == 2) +/* 100 */ this.userItems = ((Integer)value).intValue(); +/* 101 */ break; +/* */ case 2: +/* 103 */ if (mode == 0) { +/* 104 */ ret = StringPropertyEditor.make( +/* 105 */ new Property(this, index, "Merchant Item Type")); +/* 106 */ } else if (mode == 1) { +/* 107 */ ret = this.serverItem; +/* 108 */ } else if (mode == 2) { +/* 109 */ this.serverItem = ((String)value).toString().trim(); +/* */ } +/* 111 */ break; +/* */ case 3: +/* 113 */ if (mode == 0) { +/* 114 */ ret = IntegerPropertyEditor.make( +/* 115 */ new Property(this, index, "Number of Merchant Items")); +/* 116 */ } else if (mode == 1) { +/* 117 */ ret = new Integer(this.serverItems); +/* 118 */ } else if (mode == 2) +/* 119 */ this.serverItems = ((Integer)value).intValue(); +/* 120 */ break; +/* */ default: +/* 122 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* 124 */ return ret; +/* */ } +/* */ +/* */ public String toString() { +/* 128 */ return +/* */ +/* */ +/* */ +/* */ +/* 133 */ super.toString() + "[give " + InventoryManager.getInventoryManager().itemName(this.userItem, this.userItems) + " for " + InventoryManager.getInventoryManager().itemName(this.serverItem, this.serverItems) + "]"; +/* */ } +/* */ +/* */ +/* 137 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 141 */ s.saveVersion(0, classCookie); +/* 142 */ super.saveState(s); +/* */ +/* 144 */ s.saveString(this.userItem); +/* 145 */ s.saveInt(this.userItems); +/* 146 */ s.saveString(this.serverItem); +/* 147 */ s.saveInt(this.serverItems); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 152 */ int ver = r.restoreVersion(classCookie); +/* 153 */ switch (ver) { +/* */ case 0: +/* 155 */ super.restoreState(r); +/* 156 */ this.userItem = r.restoreString(); +/* 157 */ this.userItems = r.restoreInt(); +/* 158 */ this.serverItem = r.restoreString(); +/* 159 */ this.serverItems = r.restoreInt(); +/* 160 */ break; +/* */ +/* */ default: +/* 163 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TradeAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TrajectoryBehavior.java b/NET/worlds/scape/TrajectoryBehavior.java new file mode 100644 index 0000000..0d4b594 --- /dev/null +++ b/NET/worlds/scape/TrajectoryBehavior.java @@ -0,0 +1,446 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TrajectoryBehavior +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, BumpHandler +/* */ { +/* */ protected Point3 dir; +/* */ public float linearVel; +/* */ public Point3 axis; +/* */ public float angularVel; +/* */ private RollingAttribute attr; +/* */ public float linearDamp; +/* */ public float bounceDamp; +/* */ public float angularDamp; +/* */ public float gravity; +/* */ private long lastTime; +/* 47 */ private boolean bumplock = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TrajectoryBehavior(Point3Temp linearVelocity, float linearDamping, Point3Temp angularAxis, float angularVelocity, float angularDamping) +/* */ { +/* 64 */ this.dir = new Point3(); +/* 65 */ this.linearVel = 0.0F; +/* 66 */ this.linearDamp = linearDamping; +/* 67 */ addVelocity(linearVelocity); +/* */ +/* 69 */ this.axis = new Point3(angularAxis); +/* 70 */ this.axis.normalize(); +/* 71 */ this.angularVel = angularVelocity; +/* 72 */ this.angularDamp = angularDamping; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TrajectoryBehavior() +/* */ { +/* 82 */ this(Point3Temp.make(0.0F, 0.0F, 0.0F)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TrajectoryBehavior(Point3Temp vel) +/* */ { +/* 92 */ this(vel, 0.0F, Point3Temp.make(0.0F, 0.0F, 1.0F), 0.0F, 0.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setDir(Point3Temp d) +/* */ { +/* 100 */ double len = Math.sqrt(d.x * d.x + d.y * d.y + d.z * d.z); +/* */ +/* 102 */ if (len == 0.0D) +/* */ { +/* 104 */ this.dir.x = 0.0F; +/* 105 */ this.dir.y = 0.0F; +/* 106 */ this.dir.z = 0.0F; +/* 107 */ return; +/* */ } +/* */ +/* */ +/* 111 */ this.dir.x = ((float)(d.x / len)); +/* 112 */ this.dir.y = ((float)(d.y / len)); +/* 113 */ this.dir.z = ((float)(d.z / len)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public TrajectoryBehavior addVelocity(Point3Temp vector) +/* */ { +/* 122 */ this.dir.times(this.linearVel).plus(vector); +/* 123 */ float len = this.dir.length(); +/* 124 */ if (len > 0.0F) +/* 125 */ this.dir.dividedBy(len); +/* 126 */ this.linearVel = len; +/* */ +/* 128 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setNotifyAttribute(RollingAttribute attr) +/* */ { +/* 137 */ this.attr = attr; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 146 */ this.bumplock = false; +/* 147 */ WObject o = e.receiver; +/* 148 */ float dT = (float)(e.time - this.lastTime) / 1000.0F; +/* */ +/* */ +/* */ +/* 152 */ if (this.lastTime == 0L) { +/* 153 */ this.lastTime = e.time; +/* 154 */ return true; +/* */ } +/* 156 */ this.lastTime = e.time; +/* */ +/* */ +/* */ +/* */ +/* 161 */ Room room = o.getRoom(); +/* 162 */ if (o.getZ() > room.floorHeight(o.getX(), o.getY(), o.getZ())) { +/* 163 */ addVelocity(Point3Temp.make(0.0F, 0.0F, -this.gravity * dT)); +/* 164 */ } else if (this.dir.z < 0.0F) { +/* 165 */ this.dir.z = (-this.dir.z); +/* 166 */ if (this.bounceDamp < 1.0D) { +/* 167 */ this.linearVel *= this.bounceDamp; +/* 168 */ if ((this.linearVel < 0.2D) && (this.linearVel > -0.2D)) { +/* 169 */ this.linearVel = 0.0F; +/* */ } +/* */ } +/* */ } +/* */ +/* 174 */ if (this.linearVel != 0.0F) { +/* 175 */ Point3Temp dist = Point3Temp.make(this.dir).times(dT * this.linearVel); +/* 176 */ o.moveThrough(dist); +/* */ +/* 178 */ if (this.linearDamp != 0.0F) { +/* 179 */ this.linearVel = ((float)(this.linearVel * Math.exp(-this.linearDamp * dT))); +/* 180 */ if (Math.abs(this.linearVel) < this.linearDamp * 16.0F) { +/* 181 */ this.linearVel = 0.0F; +/* 182 */ if (this.attr != null) { +/* 183 */ this.attr.notifyStopped(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 189 */ if (this.angularVel != 0.0F) { +/* 190 */ o.spin(this.axis.x, this.axis.y, this.axis.z, this.angularVel * dT); +/* 191 */ if (this.angularDamp != 0.0F) { +/* 192 */ this.angularVel = ((float)(this.angularVel * Math.exp(-this.angularDamp * dT))); +/* 193 */ if (Math.abs(this.angularVel) < this.angularDamp * 0.6F) +/* 194 */ this.angularVel = 0.0F; +/* */ } +/* */ } +/* 197 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 209 */ if (this.bumplock) { +/* 210 */ return true; +/* */ } +/* 212 */ if (this.attr != null) { +/* 213 */ this.attr.handle(b); +/* */ } else +/* 215 */ processBumpEvent(b); +/* 216 */ this.bumplock = true; +/* 217 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void processBumpEvent(BumpEventTemp b) +/* */ { +/* 229 */ b.postBumpPath.minus(b.postBumpPath); +/* */ +/* */ +/* */ +/* 233 */ if ((this.dir.x == 0.0F) && (this.dir.y == 0.0F) && (this.dir.z == 0.0F)) { +/* 234 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 241 */ WObject bumper = b.receiver == b.target ? +/* 242 */ (WObject)b.source : b.target; +/* */ Point3Temp norm; +/* 244 */ Point3Temp norm; if (((bumper instanceof Camera)) || ((bumper instanceof Hologram))) +/* */ { +/* 246 */ float orientation = (float)((360.0F - bumper.getYaw() + 90.0F) * +/* 247 */ 3.141592653589793D / 180.0D); +/* 248 */ norm = Point3Temp.make((float)Math.cos(orientation), +/* 249 */ (float)Math.sin(orientation), +/* 250 */ 0.0F); +/* */ } else { +/* 252 */ norm = Point3Temp.make(b.bumpNormal); +/* */ } +/* 254 */ float lb = (float)Math.sqrt(norm.x * norm.x + +/* 255 */ norm.y * norm.y + norm.z * norm.z); +/* 256 */ norm.x /= lb; +/* 257 */ norm.y /= lb; +/* 258 */ norm.z /= lb; +/* */ +/* */ +/* */ +/* 262 */ float projection = Math.abs(this.dir.x * norm.x + +/* 263 */ this.dir.y * norm.y + +/* 264 */ this.dir.z * norm.z); +/* */ +/* */ +/* 267 */ this.dir.x += norm.x * 2.0F * projection; +/* 268 */ this.dir.y += norm.y * 2.0F * projection; +/* 269 */ this.dir.z += norm.z * 2.0F * projection; +/* */ +/* */ +/* 272 */ double n = Math.sqrt(this.dir.x * this.dir.x + this.dir.y * this.dir.y + this.dir.z * this.dir.z); +/* 273 */ if (n != 0.0D) +/* */ { +/* 275 */ Point3 tmp380_377 = this.dir;tmp380_377.x = ((float)(tmp380_377.x / n)); Point3 +/* 276 */ tmp396_393 = this.dir;tmp396_393.y = ((float)(tmp396_393.y / n)); Point3 +/* 277 */ tmp412_409 = this.dir;tmp412_409.z = ((float)(tmp412_409.z / n)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 283 */ if (this.bounceDamp < 1.0D) { +/* 284 */ this.linearVel *= this.bounceDamp; +/* 285 */ if ((this.linearVel < 0.2D) && (this.linearVel > -0.2D)) { +/* 286 */ this.linearVel = 0.0F; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 302 */ return +/* */ +/* */ +/* 305 */ super.toString() + "[" + getName() + ": lin. velocity " + this.linearVel + ", lin. damp " + this.linearDamp + ", direction " + this.dir + ", ang. vel " + this.angularVel + ", ang. damp " + this.angularDamp + ", axis " + this.axis + "]"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 315 */ Object ret = null; +/* 316 */ switch (index - offset) { +/* */ case 0: +/* 318 */ if (mode == 0) { +/* 319 */ ret = FloatPropertyEditor.make( +/* 320 */ new Property(this, index, "Linear Velocity")); +/* 321 */ } else if (mode == 1) { +/* 322 */ ret = new Float(this.linearVel); +/* 323 */ } else if (mode == 2) +/* 324 */ this.linearVel = ((Float)value).floatValue(); +/* 325 */ break; +/* */ case 1: +/* 327 */ if (mode == 0) { +/* 328 */ ret = FloatPropertyEditor.make( +/* 329 */ new Property(this, index, "Linear Damping")); +/* 330 */ } else if (mode == 1) { +/* 331 */ ret = new Float(this.linearDamp); +/* 332 */ } else if (mode == 2) +/* 333 */ this.linearDamp = ((Float)value).floatValue(); +/* 334 */ break; +/* */ case 2: +/* 336 */ if (mode == 0) { +/* 337 */ ret = Point3PropertyEditor.make( +/* 338 */ new Property(this, index, "Direction")); +/* 339 */ } else if (mode == 1) { +/* 340 */ ret = new Point3(this.dir); +/* 341 */ } else if (mode == 2) +/* 342 */ this.dir = ((Point3)value); +/* 343 */ break; +/* */ case 3: +/* 345 */ if (mode == 0) { +/* 346 */ ret = FloatPropertyEditor.make( +/* 347 */ new Property(this, index, "Angular Velocity")); +/* 348 */ } else if (mode == 1) { +/* 349 */ ret = new Float(this.angularVel); +/* 350 */ } else if (mode == 2) +/* 351 */ this.angularVel = ((Float)value).floatValue(); +/* 352 */ break; +/* */ case 4: +/* 354 */ if (mode == 0) { +/* 355 */ ret = FloatPropertyEditor.make( +/* 356 */ new Property(this, index, "Angular Damping")); +/* 357 */ } else if (mode == 1) { +/* 358 */ ret = new Float(this.angularDamp); +/* 359 */ } else if (mode == 2) +/* 360 */ this.angularDamp = ((Float)value).floatValue(); +/* 361 */ break; +/* */ case 5: +/* 363 */ if (mode == 0) { +/* 364 */ ret = Point3PropertyEditor.make( +/* 365 */ new Property(this, index, "Axis")); +/* 366 */ } else if (mode == 1) { +/* 367 */ ret = new Point3(this.axis); +/* 368 */ } else if (mode == 2) +/* 369 */ this.axis = ((Point3)value); +/* 370 */ break; +/* */ case 6: +/* 372 */ if (mode == 0) { +/* 373 */ ret = FloatPropertyEditor.make( +/* 374 */ new Property(this, index, +/* 375 */ "Gravitational Acceleration")); +/* 376 */ } else if (mode == 1) { +/* 377 */ ret = new Float(this.gravity); +/* 378 */ } else if (mode == 2) +/* 379 */ this.gravity = ((Float)value).floatValue(); +/* 380 */ break; +/* */ case 7: +/* 382 */ if (mode == 0) { +/* 383 */ ret = FloatPropertyEditor.make( +/* 384 */ new Property(this, index, +/* 385 */ "Bounce Damping (1 = superball, 0 = beanbag)")); +/* 386 */ } else if (mode == 1) { +/* 387 */ ret = new Float(this.bounceDamp); +/* 388 */ } else if (mode == 2) { +/* 389 */ this.bounceDamp = ((Float)value).floatValue(); +/* 390 */ this.bounceDamp = ((float)Math.max(0.0D, Math.min(1.0D, this.bounceDamp))); +/* */ } +/* 392 */ break; +/* */ default: +/* 394 */ ret = super.properties(index, offset + 8, mode, value); +/* */ } +/* 396 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 402 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 407 */ s.saveVersion(0, classCookie); +/* 408 */ super.saveState(s); +/* */ +/* 410 */ s.saveFloat(this.linearVel); +/* 411 */ s.saveFloat(this.linearDamp); +/* 412 */ s.save(this.dir); +/* 413 */ s.saveFloat(this.angularVel); +/* 414 */ s.saveFloat(this.angularDamp); +/* 415 */ s.save(this.axis); +/* 416 */ s.saveFloat(this.gravity); +/* 417 */ s.saveFloat(this.bounceDamp); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 423 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 425 */ super.restoreState(r); +/* */ +/* 427 */ this.linearVel = r.restoreFloat(); +/* 428 */ this.linearDamp = r.restoreFloat(); +/* 429 */ this.dir = ((Point3)r.restore()); +/* 430 */ this.angularVel = r.restoreFloat(); +/* 431 */ this.angularDamp = r.restoreFloat(); +/* 432 */ this.axis = ((Point3)r.restore()); +/* 433 */ this.gravity = r.restoreFloat(); +/* 434 */ this.bounceDamp = r.restoreFloat(); +/* 435 */ break; +/* */ default: +/* 437 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TrajectoryBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TransAttribute.java b/NET/worlds/scape/TransAttribute.java new file mode 100644 index 0000000..f500878 --- /dev/null +++ b/NET/worlds/scape/TransAttribute.java @@ -0,0 +1,305 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TransAttribute +/* */ extends Attribute +/* */ { +/* */ private Point3 defPos; +/* */ private Point3 defRAxis; +/* */ private float defRotation; +/* */ private Point3 defScale; +/* */ +/* */ public TransAttribute(int attrID) +/* */ { +/* 42 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ public TransAttribute() {} +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 51 */ WObject w = (WObject)((Sharer)owner).getOwner(); +/* */ +/* 53 */ w._transformAttribute = this; +/* */ +/* */ +/* */ +/* 57 */ initDefault(); +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 62 */ WObject w = (WObject)((Sharer)getOwner()).getOwner(); +/* 63 */ w._transformAttribute = null; +/* 64 */ super.detach(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void noteChange() +/* */ { +/* 72 */ if (TCompressor.dontSend) +/* 73 */ return; +/* 74 */ super.noteChange(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void generateNetData(DataOutputStream s) +/* */ throws IOException +/* */ { +/* 88 */ WObject w = (WObject)getOwner().getOwner(); +/* */ +/* */ +/* */ +/* */ +/* 93 */ if (this._shorthandVersion == 0) +/* */ { +/* 95 */ Point3Temp pos = w.getPosition(); +/* 96 */ s.writeFloat(pos.x); +/* 97 */ s.writeFloat(pos.y); +/* 98 */ s.writeFloat(pos.z); +/* 99 */ Point3Temp scale = w.getScale(); +/* 100 */ s.writeFloat(scale.x); +/* 101 */ s.writeFloat(scale.y); +/* 102 */ s.writeFloat(scale.z); +/* 103 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 110 */ initDefault(); +/* */ +/* 112 */ TCompressor.compress(w, this.defPos, this.defRAxis, this.defRotation, this.defScale, +/* 113 */ this._sharingMode, s); +/* */ } +/* */ +/* */ private void initDefault() +/* */ { +/* 118 */ if (this.defPos == null) +/* */ { +/* 120 */ WObject w = (WObject)((Sharer)getOwner()).getOwner(); +/* */ +/* 122 */ this.defPos = new Point3(w.getPosition()); +/* 123 */ this.defRAxis = new Point3(); +/* 124 */ this.defRotation = w.getSpin(this.defRAxis); +/* 125 */ this.defScale = new Point3(w.getScale()); +/* */ } +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 131 */ WObject w = (WObject)getOwner().getOwner(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 137 */ initDefault(); +/* */ +/* */ +/* */ +/* */ +/* */ try +/* */ { +/* 144 */ TCompressor.decompress(w, this.defPos, this.defRAxis, this.defRotation, this.defScale, +/* 145 */ this._sharingMode, len, ds); +/* */ } +/* */ catch (IOException e) +/* */ { +/* 149 */ TCompressor.dontSend = false; +/* 150 */ throw e; +/* */ } +/* */ } +/* */ +/* */ +/* 155 */ private int _sharingMode = 57344; +/* */ +/* */ public boolean getSharingPosition() { +/* 158 */ return (this._sharingMode & 0x8000) != 0; +/* */ } +/* */ +/* */ public void setSharingPosition(boolean b) { +/* 162 */ if (b) { +/* 163 */ this._sharingMode |= 0x8000; +/* */ } else { +/* 165 */ this._sharingMode &= 0xFFFF7FFF; +/* */ } +/* */ } +/* */ +/* */ public boolean getSharingRotation() { +/* 170 */ return (this._sharingMode & 0x4000) != 0; +/* */ } +/* */ +/* */ public void setSharingRotation(boolean b) +/* */ { +/* 175 */ if (b) { +/* 176 */ this._sharingMode |= 0x4000; +/* */ } else { +/* 178 */ this._sharingMode &= 0xBFFF; +/* */ } +/* */ } +/* */ +/* */ public boolean getSharingScale() { +/* 183 */ return (this._sharingMode & 0x2000) != 0; +/* */ } +/* */ +/* */ public void setSharingScale(boolean b) +/* */ { +/* 188 */ if (b) { +/* 189 */ this._sharingMode |= 0x2000; +/* */ } else { +/* 191 */ this._sharingMode &= 0xDFFF; +/* */ } +/* */ } +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 199 */ Object ret = null; +/* */ +/* 201 */ switch (index - offset) { +/* */ case 0: +/* 203 */ if (mode == 0) { +/* 204 */ ret = BooleanPropertyEditor.make( +/* 205 */ new Property(this, index, "Share Position"), "No", "Yes"); +/* 206 */ } else if (mode == 1) { +/* 207 */ ret = new Boolean(getSharingPosition()); +/* 208 */ } else if (mode == 2) +/* 209 */ setSharingPosition(((Boolean)value).booleanValue()); +/* 210 */ break; +/* */ case 1: +/* 212 */ if (mode == 0) { +/* 213 */ ret = BooleanPropertyEditor.make( +/* 214 */ new Property(this, index, "Share Rotation"), "No", "Yes"); +/* 215 */ } else if (mode == 1) { +/* 216 */ ret = new Boolean(getSharingRotation()); +/* 217 */ } else if (mode == 2) +/* 218 */ setSharingRotation(((Boolean)value).booleanValue()); +/* 219 */ break; +/* */ case 2: +/* 221 */ if (mode == 0) { +/* 222 */ ret = BooleanPropertyEditor.make( +/* 223 */ new Property(this, index, "Share Scale"), +/* 224 */ "No", "Yes"); +/* 225 */ } else if (mode == 1) { +/* 226 */ ret = new Boolean(getSharingScale()); +/* 227 */ } else if (mode == 2) +/* 228 */ setSharingScale(((Boolean)value).booleanValue()); +/* 229 */ break; +/* */ +/* */ default: +/* 232 */ ret = super.properties(index, offset + 3, mode, value); +/* */ } +/* 234 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* 239 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 243 */ s.saveVersion(2, classCookie); +/* 244 */ super.saveState(s); +/* */ +/* */ +/* */ +/* 248 */ initDefault(); +/* */ +/* 250 */ s.saveInt(this._sharingMode); +/* 251 */ s.saveFloat(this.defPos.x); +/* 252 */ s.saveFloat(this.defPos.y); +/* 253 */ s.saveFloat(this.defPos.z); +/* 254 */ s.saveFloat(this.defRAxis.x); +/* 255 */ s.saveFloat(this.defRAxis.y); +/* 256 */ s.saveFloat(this.defRAxis.z); +/* 257 */ s.saveFloat(this.defRotation); +/* 258 */ s.saveFloat(this.defScale.x); +/* 259 */ s.saveFloat(this.defScale.y); +/* 260 */ s.saveFloat(this.defScale.z); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 265 */ int vers = r.restoreVersion(classCookie); +/* 266 */ switch (vers) { +/* */ case 0: +/* 268 */ super.restoreState(r); +/* 269 */ break; +/* */ case 1: +/* */ case 2: +/* 272 */ this.defPos = new Point3(); +/* 273 */ this.defRAxis = new Point3(); +/* 274 */ this.defScale = new Point3(); +/* */ +/* 276 */ super.restoreState(r); +/* 277 */ this._sharingMode = r.restoreInt(); +/* 278 */ this.defPos.x = r.restoreFloat(); +/* 279 */ this.defPos.y = r.restoreFloat(); +/* 280 */ this.defPos.z = r.restoreFloat(); +/* 281 */ this.defRAxis.x = r.restoreFloat(); +/* 282 */ this.defRAxis.y = r.restoreFloat(); +/* 283 */ this.defRAxis.z = r.restoreFloat(); +/* 284 */ this.defRotation = r.restoreFloat(); +/* 285 */ this.defScale.x = r.restoreFloat(); +/* 286 */ this.defScale.y = r.restoreFloat(); +/* 287 */ this.defScale.z = r.restoreFloat(); +/* */ +/* 289 */ break; +/* */ default: +/* 291 */ throw new TooNewException(); +/* */ } +/* */ +/* 294 */ if (vers < 2) +/* 295 */ this._shorthandVersion = vers; +/* */ } +/* */ +/* 298 */ public int getMaxShorthandVersion() { return 1; } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TransAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Transform.java b/NET/worlds/scape/Transform.java new file mode 100644 index 0000000..b01c92c --- /dev/null +++ b/NET/worlds/scape/Transform.java @@ -0,0 +1,602 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Main; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Transform +/* */ extends SuperRoot +/* */ { +/* */ static +/* */ { +/* 82 */ nativeInit(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 89 */ private static Vector recycled = new Vector(); +/* */ private int transformID; +/* */ private float xScale; +/* */ private float yScale; +/* */ private float zScale; +/* */ +/* */ public static native void nativeInit(); +/* */ +/* 97 */ public static Transform make() { assert (Main.isMainThread()); +/* */ +/* 99 */ int last = recycled.size() - 1; +/* 100 */ if (last == -1) { +/* 101 */ return new Transform(); +/* */ } +/* 103 */ Transform ret = (Transform)recycled.elementAt(last); +/* 104 */ recycled.removeElementAt(last); +/* */ +/* 106 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void recycle() +/* */ { +/* 117 */ if (recycled.size() < 100) +/* */ { +/* */ +/* 120 */ makeIdentity(); +/* */ +/* 122 */ recycled.addElement(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected Transform() +/* */ { +/* 131 */ makeIdentity(); +/* */ } +/* */ +/* */ +/* */ public native float getX(); +/* */ +/* */ +/* */ public native float getY(); +/* */ +/* */ +/* */ public native float getZ(); +/* */ +/* */ public Point3Temp getPosition() +/* */ { +/* 145 */ return Point3Temp.make(getX(), getY(), getZ()); +/* */ } +/* */ +/* */ public void setZ(float z) { +/* 149 */ moveTo(getX(), getY(), z); +/* */ } +/* */ +/* */ public float getScaleX() +/* */ { +/* 154 */ return this.xScale; +/* */ } +/* */ +/* */ public float getScaleY() +/* */ { +/* 159 */ return this.yScale; +/* */ } +/* */ +/* */ public float getScaleZ() +/* */ { +/* 164 */ return this.zScale; +/* */ } +/* */ +/* */ public Point3Temp getScale() +/* */ { +/* 169 */ return Point3Temp.make(getScaleX(), getScaleY(), getScaleZ()); +/* */ } +/* */ +/* */ +/* */ +/* */ public float getTotalScale() +/* */ { +/* 176 */ return (getScaleX() + getScaleY() + getScaleZ()) / 3.0F; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public native float getYaw(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public native float getPitch(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public native float getSpin(Point3Temp paramPoint3Temp); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteTransformChange() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform raise(float z) +/* */ { +/* 225 */ return moveBy(0.0F, 0.0F, z); +/* */ } +/* */ +/* */ public Transform lower(float z) +/* */ { +/* 230 */ return moveBy(0.0F, 0.0F, -z); +/* */ } +/* */ +/* */ public Transform yaw(float a) +/* */ { +/* 235 */ return spin(0.0F, 0.0F, 1.0F, a); +/* */ } +/* */ +/* */ public Transform roll(float a) +/* */ { +/* 240 */ return spin(0.0F, 1.0F, 0.0F, a); +/* */ } +/* */ +/* */ public Transform pitch(float a) +/* */ { +/* 245 */ return spin(1.0F, 0.0F, 0.0F, a); +/* */ } +/* */ +/* */ public Transform scale(float s) +/* */ { +/* 250 */ return scale(s, s, s); +/* */ } +/* */ +/* */ protected void finalize() +/* */ { +/* 255 */ nativeFinalize(); +/* 256 */ super.finalize(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public native Transform pre(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ +/* */ public Transform post(Transform t) +/* */ { +/* 269 */ Point3Temp v = t.getScale(); +/* */ +/* */ +/* 272 */ if (!checkPostScale(v)) { +/* 273 */ return this; +/* */ } +/* */ +/* 276 */ this.xScale *= v.x; +/* 277 */ this.yScale *= v.y; +/* 278 */ this.zScale *= v.z; +/* */ +/* */ +/* 281 */ return postHelper(t); +/* */ } +/* */ +/* */ private boolean checkPostScale(Point3Temp v) +/* */ { +/* 286 */ if ((getSpin(Point3Temp.make()) == 0.0F) || ((v.x == v.y) && (v.y == v.z))) +/* 287 */ return true; +/* 288 */ Console.println(Console.message("non-uniform")); +/* 289 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private native Transform postHelper(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ +/* */ public native Transform makeIdentity(); +/* */ +/* */ +/* */ +/* */ public Transform moveBy(Point3Temp p) +/* */ { +/* 306 */ return moveBy(p.x, p.y, p.z); +/* */ } +/* */ +/* */ +/* */ +/* */ public native Transform moveBy(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ +/* */ public Transform moveTo(Point3Temp p) +/* */ { +/* 317 */ return moveTo(p.x, p.y, p.z); +/* */ } +/* */ +/* */ +/* */ +/* */ public native Transform moveTo(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ +/* */ public native Transform premoveBy(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ public native Transform scale(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ public Transform scale(Point3Temp s) +/* */ { +/* 334 */ return scale(s.x, s.y, s.z); +/* */ } +/* */ +/* */ public void setScale(float x, float y, float z) +/* */ { +/* 339 */ scale(x / this.xScale, y / this.yScale, z / this.zScale); +/* */ } +/* */ +/* */ public void setScale(Point3Temp s) +/* */ { +/* 344 */ setScale(s.x, s.y, s.z); +/* */ } +/* */ +/* */ public Transform postscale(float x, float y, float z) +/* */ { +/* 349 */ return postscale(Point3Temp.make(x, y, z)); +/* */ } +/* */ +/* */ +/* */ public Transform postscale(Point3Temp s) +/* */ { +/* 355 */ if (!checkPostScale(s)) { +/* 356 */ return this; +/* */ } +/* */ +/* 359 */ this.xScale *= s.x; +/* 360 */ this.yScale *= s.y; +/* 361 */ this.zScale *= s.z; +/* */ +/* */ +/* */ +/* 365 */ return postscaleHelper(s.x, s.y, s.z); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private native Transform postscaleHelper(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ +/* */ +/* */ public Transform worldScale(float x, float y, float z) +/* */ { +/* 378 */ return worldScale(Point3Temp.make(x, y, z)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform worldScale(Point3Temp s) +/* */ { +/* 387 */ if (!checkPostScale(s)) { +/* 388 */ return this; +/* */ } +/* */ +/* */ +/* 392 */ return scale(s); +/* */ } +/* */ +/* */ +/* */ public native Transform spin(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ public Transform spin(Point3Temp p, float a) +/* */ { +/* 400 */ return spin(p.x, p.y, p.z, a); +/* */ } +/* */ +/* */ public Transform postspin(Point3Temp axis, float a) +/* */ { +/* 405 */ return postspin(axis.x, axis.y, axis.z, a); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public native Transform postspin(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ +/* */ +/* */ public Transform worldSpin(float x, float y, float z, float a) +/* */ { +/* 417 */ return spin(worldVecToObjectVec(Point3Temp.make(x, y, z)), a); +/* */ } +/* */ +/* */ +/* */ private native void nativeFinalize(); +/* */ +/* */ public Transform getTransform() +/* */ { +/* 425 */ Transform t = make(); +/* 426 */ t.setTransform(this); +/* 427 */ return t; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public native void setTransform(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ public native Transform invert(); +/* */ +/* */ +/* */ +/* */ public Transform getObjectToWorldMatrix() +/* */ { +/* 443 */ return getTransform(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private Point3Temp worldVecToObjectVec(Point3Temp worldVec) +/* */ { +/* 452 */ Transform inv = getObjectToWorldMatrix().invert(); +/* 453 */ Point3Temp p = Point3Temp.make(worldVec).vectorTimes(inv) +/* 454 */ .times(getScale()); +/* 455 */ inv.recycle(); +/* 456 */ return p; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 465 */ Object ret = null; +/* 466 */ switch (index - offset) { +/* */ case 0: +/* 468 */ if (mode == 0) { +/* 469 */ ret = TransformPropertyEditor.make(new Property(this, index, +/* 470 */ "Transform")); +/* 471 */ } else if (mode == 1) { +/* 472 */ ret = getTransform(); +/* 473 */ } else if (mode == 2) +/* 474 */ setTransform((Transform)value); +/* 475 */ break; +/* */ default: +/* 477 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 479 */ return ret; +/* */ } +/* */ +/* 482 */ private static Object classCookie = new Object(); +/* */ +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 490 */ s.saveVersion(2, classCookie); +/* 491 */ super.saveState(s); +/* 492 */ s.saveFloat(this.xScale); +/* 493 */ s.saveFloat(this.yScale); +/* 494 */ s.saveFloat(this.zScale); +/* 495 */ float[] guts = getGuts(); +/* 496 */ for (int i = 0; i < 16; i++) { +/* 497 */ s.saveFloat(guts[i]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 508 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 510 */ super.restoreState(r); +/* 511 */ this.xScale = r.restoreFloat(); +/* 512 */ this.yScale = r.restoreFloat(); +/* 513 */ this.zScale = r.restoreFloat(); +/* 514 */ float[] guts = new float[16]; +/* 515 */ for (int i = 0; i < 16; i++) +/* 516 */ guts[i] = r.restoreFloat(); +/* 517 */ setGuts(guts); +/* 518 */ break; +/* */ +/* */ case 1: +/* 521 */ super.restoreState(r); +/* */ case 0: +/* 523 */ this.xScale = (this.yScale = this.zScale = r.restoreFloat()); +/* 524 */ float[] guts = new float[16]; +/* 525 */ for (int i = 0; i < 16; i++) +/* 526 */ guts[i] = r.restoreFloat(); +/* 527 */ setGuts(guts); +/* 528 */ break; +/* */ default: +/* 530 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private native float[] getGuts(); +/* */ +/* */ +/* */ +/* */ +/* */ public native boolean isTransformEqual(Transform paramTransform); +/* */ +/* */ +/* */ +/* */ +/* */ private native void setGuts(float[] paramArrayOfFloat); +/* */ +/* */ +/* */ +/* */ +/* */ public String toTransformSubstring() +/* */ { +/* 555 */ Point3Temp axis = Point3Temp.make(); +/* 556 */ float angle = getSpin(axis); +/* 557 */ Point3Temp pos = getPosition(); +/* 558 */ if ((angle == 0.0F) && (this.xScale == 1.0F) && (this.yScale == 1.0F) && (this.zScale == 1.0F) && +/* 559 */ (pos.x == 0.0F) && (pos.y == 0.0F) && (pos.z == 0.0F)) +/* 560 */ return "[identity]"; +/* 561 */ return +/* */ +/* */ +/* */ +/* */ +/* 566 */ "[pos (" + pos + "), scale (" + ((this.xScale == this.yScale) && (this.yScale == this.zScale) ? this.xScale : new StringBuilder().append(this.xScale).append(",").append(this.yScale).append(",").append(this.zScale).toString()) + "), rot (" + axis + "@" + angle + ")]"; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 571 */ return getName() + toTransformSubstring(); +/* */ } +/* */ +/* */ public Transform printGuts() +/* */ { +/* 576 */ float[] arr = getGuts(); +/* 577 */ assert (arr.length == 16); +/* 578 */ String[] strs = new String[16]; +/* 579 */ int maxStr = 0; +/* 580 */ for (int i = 0; i < 16; i++) { +/* 581 */ strs[i] = Float.toString(arr[i]); +/* 582 */ maxStr = Math.max(maxStr, strs[i].length()); +/* */ } +/* 584 */ for (int j = 0; j < 4; j++) { +/* 585 */ for (int k = 0; k < 4; k++) { +/* 586 */ String s = strs[(j * 4 + k)]; +/* 587 */ int pad = maxStr - s.length() + 1; +/* 588 */ System.out.print(s); +/* 589 */ while (pad-- != 0) +/* 590 */ System.out.print(" "); +/* */ } +/* 592 */ System.out.println(""); +/* */ } +/* 594 */ return this; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Transform.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TransformEditorDialog.java b/NET/worlds/scape/TransformEditorDialog.java new file mode 100644 index 0000000..5e825ab --- /dev/null +++ b/NET/worlds/scape/TransformEditorDialog.java @@ -0,0 +1,367 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.ConfirmDialog; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.PolledDialog; +/* */ import java.awt.Button; +/* */ import java.awt.Component; +/* */ import java.awt.Event; +/* */ import java.awt.Font; +/* */ import java.awt.GridBagConstraints; +/* */ import java.awt.GridBagLayout; +/* */ import java.awt.Label; +/* */ import java.awt.TextField; +/* */ import java.text.MessageFormat; +/* */ import java.util.StringTokenizer; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class TransformEditorDialog +/* */ extends PolledDialog +/* */ implements DialogReceiver +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ Property property; +/* */ Transform transform; +/* */ int undoCount; +/* 55 */ Button undoButton = new Button(Console.message("Undo")); +/* 56 */ Button okButton = new Button(Console.message("OK")); +/* 57 */ Button cancelButton = new Button(Console.message("Cancel")); +/* */ +/* 59 */ Button pitch = new MyButton(Console.message("Pitch-N"), 0, 1); +/* 60 */ Button roll = new MyButton(Console.message("Roll-N"), 0, 1); +/* 61 */ Button yaw = new MyButton(Console.message("Yaw-N"), 0, 1); +/* 62 */ Button spin = new MyButton(Console.message("Spin-by-XYZN"), 3, 1); +/* 63 */ Button spinTo = new MyButton(Console.message("Spin-to-XYZN"), 3, 1); +/* */ +/* 65 */ Button moveX = new MyButton(Console.message("Move-x-by-N"), 0, 1); +/* 66 */ Button moveY = new MyButton(Console.message("Move-y-by-N"), 0, 1); +/* 67 */ Button moveZ = new MyButton(Console.message("Move-z-by-N"), 0, 1); +/* 68 */ Button moveBy = new MyButton(Console.message("Move-by-XYZ"), 3, 0); +/* 69 */ Button moveTo = new MyButton(Console.message("Move-to-XYZ"), 3, 0); +/* */ +/* 71 */ Button scaleX = new MyButton(Console.message("Scale-x-by-N"), 0, 1); +/* 72 */ Button scaleY = new MyButton(Console.message("Scale-y-by-N"), 0, 1); +/* 73 */ Button scaleZ = new MyButton(Console.message("Scale-z-by-N"), 0, 1); +/* 74 */ Button scaleBy = new MyButton(Console.message("Scale-by-N"), 0, 1); +/* 75 */ Button scaleTo = new MyButton(Console.message("Scale-to-N"), 0, 1); +/* */ +/* 77 */ Label position = new Label(); +/* 78 */ Label rotation = new Label(); +/* 79 */ Label scale = new Label(); +/* 80 */ TextField editXYZ = new TextField(); +/* 81 */ TextField editN = new TextField(); +/* 82 */ GridBagLayout gbag = new GridBagLayout(); +/* 83 */ GridBagConstraints c = new GridBagConstraints(); +/* */ Font normalFont; +/* */ Font selectedFont; +/* */ Button selectedButton; +/* */ TextField lastEdit; +/* */ EditTile parent; +/* */ Object queuedFunc; +/* */ private static Object lastPosAndSize; +/* */ +/* */ TransformEditorDialog(EditTile parent, String title, Property property) { +/* 93 */ super(Console.getFrame(), parent, title, false); +/* 94 */ this.property = property; +/* 95 */ this.parent = parent; +/* 96 */ ready(); +/* */ } +/* */ +/* */ protected void build() { +/* 100 */ this.transform = ((Transform)this.property.get()); +/* 101 */ setLayout(this.gbag); +/* */ +/* 103 */ add2(new Label("(X,Y,Z):"), this.editXYZ); +/* 104 */ add2(new Label("(N):"), this.editN); +/* 105 */ add3(this.moveX, this.pitch, this.scaleX); +/* 106 */ add3(this.moveY, this.roll, this.scaleY); +/* 107 */ add3(this.moveZ, this.yaw, this.scaleZ); +/* 108 */ add3(this.moveBy, this.spin, this.scaleBy); +/* 109 */ add3(this.moveTo, this.spinTo, this.scaleTo); +/* 110 */ add2(new Label(Console.message("Position")), this.position); +/* 111 */ add2(new Label(Console.message("Rotation:")), this.rotation); +/* 112 */ add2(new Label(Console.message("Scale:")), this.scale); +/* 113 */ addButtons(this.undoButton, this.okButton, this.cancelButton); +/* */ +/* 115 */ this.normalFont = this.pitch.getFont(); +/* 116 */ this.selectedFont = new Font(this.normalFont.getName(), this.normalFont.isBold() ? 0 : 1, +/* 117 */ this.normalFont.getSize()); +/* 118 */ updateInfo(); +/* */ } +/* */ +/* */ private void add2(Component c1, Component c2) { +/* 122 */ this.c.fill = 0; +/* 123 */ this.c.anchor = 13; +/* 124 */ this.c.gridheight = 1; +/* 125 */ this.c.weightx = 1.0D; +/* 126 */ this.c.weighty = 1.0D; +/* 127 */ this.c.gridwidth = 1; +/* 128 */ add(this.gbag, c1, this.c); +/* 129 */ this.c.anchor = 17; +/* 130 */ this.c.fill = 2; +/* 131 */ this.c.gridwidth = 0; +/* 132 */ add(this.gbag, c2, this.c); +/* */ } +/* */ +/* */ private void add3(Component c1, Component c2, Component c3) { +/* 136 */ this.c.fill = 2; +/* 137 */ this.c.anchor = 17; +/* 138 */ this.c.gridheight = 1; +/* 139 */ this.c.gridwidth = 3; +/* 140 */ this.c.weightx = 1.0D; +/* 141 */ this.c.weighty = 1.0D; +/* 142 */ add(this.gbag, c1, this.c); +/* 143 */ this.c.weightx = 0.0D; +/* 144 */ this.c.weighty = 0.0D; +/* 145 */ add(this.gbag, c2, this.c); +/* 146 */ this.c.gridwidth = 0; +/* 147 */ add(this.gbag, c3, this.c); +/* */ } +/* */ +/* */ private void addButtons(Component c1, Component c2, Component c3) { +/* 151 */ this.c.fill = 0; +/* 152 */ this.c.anchor = 13; +/* 153 */ this.c.gridheight = 1; +/* 154 */ this.c.gridwidth = 3; +/* 155 */ this.c.weightx = 1.0D; +/* 156 */ this.c.weighty = 1.0D; +/* 157 */ add(this.gbag, c1, this.c); +/* 158 */ this.c.anchor = 10; +/* 159 */ add(this.gbag, c2, this.c); +/* 160 */ this.c.anchor = 17; +/* 161 */ add(this.gbag, c3, this.c); +/* */ } +/* */ +/* */ private void selectButton(Button button) { +/* 165 */ if (this.selectedButton != null) +/* 166 */ this.selectedButton.setFont(this.normalFont); +/* 167 */ this.selectedButton = button; +/* 168 */ this.selectedButton.setFont(this.selectedFont); +/* */ } +/* */ +/* */ private void updateInfo() { +/* 172 */ this.position.setText(this.transform.getPosition().toString()); +/* 173 */ this.scale.setText(this.transform.getScale().toString()); +/* 174 */ Point3Temp axis = Point3Temp.make(); +/* 175 */ float angle = this.transform.getSpin(axis); +/* */ +/* 177 */ Object[] arguments = { new String(axis), new String(angle) }; +/* 178 */ this.rotation.setText(MessageFormat.format(Console.message("angle"), arguments)); +/* */ +/* */ +/* 181 */ this.undoButton.setEnabled(this.undoCount != 0); +/* */ } +/* */ +/* */ private void set(Transform t) { +/* 185 */ this.parent.addUndoableSet(this.property, t); +/* 186 */ this.undoCount += 1; +/* 187 */ this.transform = ((Transform)this.property.get()); +/* */ } +/* */ +/* */ protected synchronized void activeCallback() { +/* 191 */ if (this.queuedFunc == this.undoButton) { +/* 192 */ if (this.undoCount != 0) { +/* 193 */ this.parent.undo(); +/* 194 */ this.undoCount -= 1; +/* 195 */ this.transform = ((Transform)this.property.get()); +/* 196 */ updateInfo(); +/* */ } +/* 198 */ } else if ((this.queuedFunc instanceof MyButton)) +/* 199 */ apply((MyButton)this.queuedFunc); +/* 200 */ this.queuedFunc = null; +/* */ } +/* */ +/* */ public boolean undoAll() { +/* 204 */ if (this.undoCount == 0) +/* 205 */ return done(false); +/* 206 */ new ConfirmDialog(this, Console.message("Cancel-Transform"), Console.message("undo-changes")); +/* 207 */ return true; +/* */ } +/* */ +/* */ public synchronized void dialogDone(Object who, boolean confirmed) { +/* 211 */ if (confirmed) { +/* 212 */ while (this.undoCount != 0) { +/* 213 */ this.parent.undo(); +/* 214 */ this.undoCount -= 1; +/* */ } +/* 216 */ done(false); +/* */ } +/* */ } +/* */ +/* */ @Deprecated +/* */ public synchronized boolean action(Event event, Object what) { +/* 222 */ Object target = event.target; +/* 223 */ if (target == this.okButton) +/* 224 */ return done(true); +/* 225 */ if (target == this.cancelButton) +/* 226 */ return undoAll(); +/* 227 */ if (((target == this.undoButton) || ((target instanceof MyButton))) && (this.queuedFunc == null)) { +/* 228 */ this.queuedFunc = target; +/* 229 */ return true; +/* */ } +/* 231 */ return false; +/* */ } +/* */ +/* */ private float[] parseNumbers(TextField edit) +/* */ { +/* 236 */ Vector vec = new Vector(); +/* 237 */ StringTokenizer e = new StringTokenizer(edit.getText().trim(), ", \t", false); +/* 238 */ while (e.hasMoreElements()) +/* */ try { +/* 240 */ vec.addElement(Float.valueOf(e.nextToken())); +/* */ } catch (NumberFormatException x) { +/* 242 */ vec.removeAllElements(); +/* 243 */ break; +/* */ } +/* 245 */ float[] ret = new float[vec.size()]; +/* 246 */ for (int i = 0; i < ret.length; i++) +/* 247 */ ret[i] = ((Float)vec.elementAt(i)).floatValue(); +/* 248 */ return ret; +/* */ } +/* */ +/* */ private boolean apply(MyButton func) +/* */ { +/* 253 */ float[] n = parseNumbers(this.editN); +/* 254 */ float[] xyz = parseNumbers(this.editXYZ); +/* 255 */ if ((func.numParamsXYZ != 0) && (func.numParamsXYZ != xyz.length)) +/* 256 */ return setEdit(this.editXYZ); +/* 257 */ if ((func.numParamsN != 0) && (func.numParamsN != n.length)) +/* 258 */ return setEdit(this.editN); +/* 259 */ if (func == this.pitch) { +/* 260 */ this.transform.worldSpin(1.0F, 0.0F, 0.0F, n[0]); +/* 261 */ } else if (func == this.roll) { +/* 262 */ this.transform.worldSpin(0.0F, 1.0F, 0.0F, n[0]); +/* 263 */ } else if (func == this.yaw) { +/* 264 */ this.transform.worldSpin(0.0F, 0.0F, 1.0F, n[0]); +/* 265 */ } else if (func == this.spin) { +/* 266 */ this.transform.worldSpin(xyz[0], xyz[1], xyz[2], n[0]); +/* 267 */ } else if (func == this.spinTo) { +/* 268 */ Point3Temp scale = this.transform.getScale(); +/* 269 */ Point3Temp pos = this.transform.getPosition(); +/* 270 */ this.transform.makeIdentity(); +/* 271 */ this.transform.scale(scale); +/* 272 */ this.transform.worldSpin(xyz[0], xyz[1], xyz[2], n[0]); +/* 273 */ this.transform.moveTo(pos.x, pos.y, pos.z); +/* 274 */ } else if (func == this.moveX) { +/* 275 */ this.transform.moveBy(n[0], 0.0F, 0.0F); +/* 276 */ } else if (func == this.moveY) { +/* 277 */ this.transform.moveBy(0.0F, n[0], 0.0F); +/* 278 */ } else if (func == this.moveZ) { +/* 279 */ this.transform.moveBy(0.0F, 0.0F, n[0]); +/* 280 */ } else if (func == this.moveBy) { +/* 281 */ this.transform.moveBy(xyz[0], xyz[1], xyz[2]); +/* 282 */ } else if (func == this.moveTo) { +/* 283 */ this.transform.moveTo(xyz[0], xyz[1], xyz[2]); +/* 284 */ } else if ((func == this.scaleX) && (n[0] != 0.0F) && (checkScale(n[0], this.transform.getScaleX()))) { +/* 285 */ this.transform.scale(n[0], 1.0F, 1.0F); +/* 286 */ } else if ((func == this.scaleY) && (n[0] != 0.0F) && (checkScale(n[0], this.transform.getScaleY()))) { +/* 287 */ this.transform.scale(1.0F, n[0], 1.0F); +/* 288 */ } else if ((func == this.scaleZ) && (n[0] != 0.0F) && (checkScale(n[0], this.transform.getScaleZ()))) { +/* 289 */ this.transform.scale(1.0F, 1.0F, n[0]); +/* 290 */ } else if ((func == this.scaleBy) && (n[0] != 0.0F) && (checkScale(n[0], this.transform.getScaleX())) && +/* 291 */ (checkScale(n[0], this.transform.getScaleY())) && (checkScale(n[0], this.transform.getScaleZ()))) { +/* 292 */ this.transform.scale(n[0]); +/* 293 */ } else if ((func == this.scaleTo) && (n[0] != 0.0F)) { +/* 294 */ Point3Temp scale = this.transform.getScale(); +/* 295 */ this.transform.scale(n[0] / scale.x, n[0] / scale.y, n[0] / scale.z); +/* */ } else { +/* 297 */ return true; } +/* 298 */ set(this.transform); +/* 299 */ selectButton(func); +/* 300 */ updateInfo(); +/* 301 */ return setEdit(this.lastEdit); +/* */ } +/* */ +/* */ private boolean checkScale(float oldScale, float factor) { +/* 305 */ double newScale = oldScale * factor; +/* 306 */ if (newScale < 2.938736052218037E-39D) { +/* 307 */ Console.println(Console.message("exceed-minimum")); +/* 308 */ } else if (newScale > 3.4028234663852886E38D) { +/* 309 */ Console.println(Console.message("exceed-maximum")); +/* */ } else +/* 311 */ return true; +/* 312 */ return false; +/* */ } +/* */ +/* */ private boolean toggleEdit() { +/* 316 */ if (this.lastEdit == this.editN) +/* 317 */ return setEdit(this.editXYZ); +/* 318 */ return setEdit(this.editN); +/* */ } +/* */ +/* */ private boolean setEdit(TextField edit) { +/* 322 */ edit.requestFocus(); +/* 323 */ edit.selectAll(); +/* 324 */ this.lastEdit = edit; +/* 325 */ return true; +/* */ } +/* */ +/* */ @Deprecated +/* */ public boolean keyDown(Event event, int key) { +/* 330 */ if ((event.target == this.editXYZ) || (event.target == this.editN)) { +/* 331 */ this.lastEdit = ((TextField)event.target); +/* */ } +/* 333 */ if (key == 27) +/* 334 */ return undoAll(); +/* 335 */ if (key == 10) +/* 336 */ return done(true); +/* 337 */ if (key == 9) +/* 338 */ return toggleEdit(); +/* 339 */ return super.keyDown(event, key); +/* */ } +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean visible) +/* */ { +/* 346 */ super.setVisible(visible); +/* 347 */ if (visible) { +/* 348 */ setEdit(this.editXYZ); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void savePosAndSize(Object state) +/* */ { +/* 355 */ lastPosAndSize = state; +/* */ } +/* */ +/* */ public Object restorePosAndSize() { +/* 359 */ return lastPosAndSize; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TransformEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TransformPropertyEditor.java b/NET/worlds/scape/TransformPropertyEditor.java new file mode 100644 index 0000000..dc5b368 --- /dev/null +++ b/NET/worlds/scape/TransformPropertyEditor.java @@ -0,0 +1,382 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TransformPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private TransformPropertyEditor(Property property) +/* */ { +/* 365 */ super(property); +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) { +/* 369 */ return new TransformEditorDialog(parent, title, this.property); +/* */ } +/* */ +/* */ public static Property make(Property property) { +/* 373 */ property.setPropertyType(9); +/* 374 */ return property.setEditor(new TransformPropertyEditor(property)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TransformPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Trigger.java b/NET/worlds/scape/Trigger.java new file mode 100644 index 0000000..69772b7 --- /dev/null +++ b/NET/worlds/scape/Trigger.java @@ -0,0 +1,323 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Trigger +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, Persister, MouseDownHandler, BumpHandler +/* */ { +/* 23 */ public static TriggeredSwitchableBehavior[] TriggeredSwitchableBehaviorList = new TriggeredSwitchableBehavior['Ϩ']; +/* 24 */ public static int TriggeredSwitchableBehaviorListCount = 0; +/* */ +/* */ public String trigger; +/* */ +/* */ public String targetTriggerTag; +/* */ public String[][] targetTriggerTagArray; +/* */ public int targetTriggerTagCount; +/* */ public int[] finishedTriggerTagSequenceNo; +/* */ public int[] finishedTriggerTagEventNo; +/* */ public int finishedTriggerTagCount; +/* */ +/* */ public Trigger() +/* */ { +/* 37 */ this.trigger = new String("none"); +/* 38 */ this.targetTriggerTag = new String(""); +/* 39 */ this.targetTriggerTagArray = new String[20][10]; +/* 40 */ this.targetTriggerTagCount = 0; +/* 41 */ this.finishedTriggerTagSequenceNo = new int[50]; +/* 42 */ this.finishedTriggerTagEventNo = new int[50]; +/* 43 */ this.finishedTriggerTagCount = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ private void addTargetTriggerTagArray(String[] sequentialTargetTriggerTagArray, String targetTriggerTag) +/* */ { +/* 51 */ int currentIndex = 1; +/* 52 */ int currentSeparator = 0;int nextSeparator = 0; +/* 53 */ int lastSeparator = targetTriggerTag.lastIndexOf("+"); +/* */ +/* */ +/* */ +/* */ +/* 58 */ if ((lastSeparator == -1) && (targetTriggerTag.length() == 0)) +/* */ { +/* 60 */ currentIndex = 0; +/* 61 */ sequentialTargetTriggerTagArray[0] = String.valueOf(currentIndex); +/* */ +/* */ } +/* 64 */ else if (lastSeparator == -1) +/* */ { +/* 66 */ sequentialTargetTriggerTagArray[currentIndex] = +/* 67 */ targetTriggerTag; +/* 68 */ sequentialTargetTriggerTagArray[0] = +/* 69 */ String.valueOf(currentIndex); +/* */ } +/* */ else { +/* 72 */ nextSeparator = targetTriggerTag.indexOf("+"); +/* */ +/* 74 */ sequentialTargetTriggerTagArray[currentIndex] = +/* 75 */ targetTriggerTag.substring(0, nextSeparator); +/* 76 */ currentIndex++; +/* */ +/* 78 */ while (nextSeparator != lastSeparator) { +/* 79 */ currentSeparator = nextSeparator; +/* 80 */ nextSeparator = targetTriggerTag.indexOf("+", +/* 81 */ currentSeparator + 1); +/* 82 */ sequentialTargetTriggerTagArray[currentIndex] = +/* 83 */ targetTriggerTag.substring(currentSeparator + 1, +/* 84 */ nextSeparator); +/* 85 */ currentIndex++; +/* */ } +/* */ +/* 88 */ sequentialTargetTriggerTagArray[currentIndex] = +/* 89 */ targetTriggerTag.substring(nextSeparator + 1); +/* 90 */ sequentialTargetTriggerTagArray[0] = +/* 91 */ String.valueOf(currentIndex); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void preprocessTargetTriggerTag(String targetTriggerTag) +/* */ { +/* 100 */ int currentIndex = 1; +/* 101 */ int currentSeparator = 0;int nextSeparator = 0; +/* 102 */ int lastSeparator = targetTriggerTag.lastIndexOf(" "); +/* */ +/* */ +/* */ +/* */ +/* 107 */ if ((lastSeparator != -1) || (targetTriggerTag.length() != 0)) +/* */ { +/* */ +/* */ +/* 111 */ if (lastSeparator == -1) +/* */ { +/* 113 */ addTargetTriggerTagArray(this.targetTriggerTagArray[currentIndex], +/* 114 */ targetTriggerTag); +/* 115 */ this.targetTriggerTagCount = currentIndex; +/* */ } +/* */ else { +/* 118 */ nextSeparator = targetTriggerTag.indexOf(" "); +/* */ +/* 120 */ addTargetTriggerTagArray(this.targetTriggerTagArray[currentIndex], +/* 121 */ targetTriggerTag.substring(0, nextSeparator)); +/* 122 */ currentIndex++; +/* */ +/* 124 */ while (nextSeparator != lastSeparator) { +/* 125 */ currentSeparator = nextSeparator; +/* 126 */ nextSeparator = targetTriggerTag.indexOf(" ", +/* 127 */ currentSeparator + 1); +/* 128 */ addTargetTriggerTagArray( +/* 129 */ this.targetTriggerTagArray[currentIndex], +/* 130 */ targetTriggerTag.substring(currentSeparator + 1, +/* 131 */ nextSeparator)); +/* 132 */ currentIndex++; +/* */ } +/* */ +/* 135 */ addTargetTriggerTagArray(this.targetTriggerTagArray[currentIndex], +/* 136 */ targetTriggerTag.substring(nextSeparator + 1)); +/* 137 */ this.targetTriggerTagCount = currentIndex; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void activateTrigger() +/* */ { +/* 150 */ for (int j = 1; j <= this.targetTriggerTagCount; j++) +/* */ { +/* 152 */ boolean match = false; +/* 153 */ int i = 0; +/* 154 */ while ((!match) && (i < TriggeredSwitchableBehaviorListCount)) +/* */ { +/* 156 */ if ((this.targetTriggerTagArray[j][1].equals(TriggeredSwitchableBehaviorList[i].externalTriggerTag)) && +/* 157 */ (TriggeredSwitchableBehaviorList[i] != null)) { +/* 158 */ TriggeredSwitchableBehaviorList[i].ExternalTrigger( +/* 159 */ this, j, 1); +/* */ } +/* */ +/* 162 */ i++; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void activateSequenceTrigger() +/* */ { +/* 176 */ for (int j = this.finishedTriggerTagCount; j > 0; j--) { +/* 177 */ int sequence_no = this.finishedTriggerTagSequenceNo[j]; +/* 178 */ int event_no = this.finishedTriggerTagEventNo[j]; +/* */ +/* */ +/* 181 */ if (Integer.valueOf(this.targetTriggerTagArray[sequence_no][0]).intValue() > event_no) +/* */ { +/* 183 */ boolean match = false; +/* 184 */ int i = 0; +/* 185 */ while ((!match) && (i < TriggeredSwitchableBehaviorListCount)) +/* */ { +/* */ +/* 188 */ if ((this.targetTriggerTagArray[sequence_no][(event_no + 1)].equals(TriggeredSwitchableBehaviorList[i].externalTriggerTag)) && +/* 189 */ (TriggeredSwitchableBehaviorList[i] != null)) { +/* 190 */ TriggeredSwitchableBehaviorList[i].ExternalTrigger( +/* 191 */ this, sequence_no, event_no + 1); +/* */ } +/* */ +/* 194 */ i++; +/* */ } +/* */ } +/* */ } +/* */ +/* 199 */ this.finishedTriggerTagCount = 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void registerFinishedTriggerTag(int sequence_no, int event_no) +/* */ { +/* 208 */ this.finishedTriggerTagCount += 1; +/* 209 */ this.finishedTriggerTagSequenceNo[this.finishedTriggerTagCount] = sequence_no; +/* 210 */ this.finishedTriggerTagEventNo[this.finishedTriggerTagCount] = event_no; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 218 */ if ((this.enabled) && +/* 219 */ (this.finishedTriggerTagCount > 0)) { +/* 220 */ activateSequenceTrigger(); +/* */ } +/* */ +/* 223 */ return true; +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 228 */ if ((this.enabled) && +/* 229 */ (this.trigger.equals("click"))) { +/* 230 */ activateTrigger(); +/* */ } +/* */ +/* */ +/* 234 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 239 */ if ((this.enabled) && +/* 240 */ (this.trigger.equals("bump"))) { +/* 241 */ activateTrigger(); +/* */ } +/* */ +/* 244 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 253 */ Object ret = null; +/* 254 */ switch (index - offset) { +/* */ case 0: +/* 256 */ if (mode == 0) { +/* 257 */ ret = StringPropertyEditor.make( +/* 258 */ new Property(this, index, "Trigger")); +/* 259 */ } else if (mode == 1) { +/* 260 */ ret = new String(this.trigger); +/* 261 */ } else if (mode == 2) { +/* 262 */ this.trigger = ((String)value).toString().trim(); +/* */ } +/* 264 */ break; +/* */ case 1: +/* 266 */ if (mode == 0) { +/* 267 */ ret = StringPropertyEditor.make( +/* 268 */ new Property(this, index, "Target Trigger Tag")); +/* 269 */ } else if (mode == 1) { +/* 270 */ ret = new String(this.targetTriggerTag); +/* 271 */ } else if (mode == 2) { +/* 272 */ this.targetTriggerTag = ((String)value).toString().trim(); +/* 273 */ preprocessTargetTriggerTag(this.targetTriggerTag); +/* */ } +/* 275 */ break; +/* */ default: +/* 277 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 279 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 284 */ return +/* 285 */ super.toString() + "[enabled " + this.enabled + ", trigger " + this.trigger + ", targetTriggerTag " + this.targetTriggerTag + "]"; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 291 */ s.saveString(this.trigger); +/* 292 */ s.saveString(this.targetTriggerTag); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 298 */ this.trigger = r.restoreString(); +/* 299 */ this.targetTriggerTag = r.restoreString(); +/* 300 */ preprocessTargetTriggerTag(this.targetTriggerTag); +/* */ } +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 305 */ String name = getName(); +/* 306 */ String arg1 = name == null ? "" : name; +/* 307 */ SuperRoot owner = getOwner(); +/* 308 */ String oname = ""; +/* 309 */ if (owner != null) { +/* 310 */ oname = owner.getName(); +/* */ } +/* 312 */ String arg2 = oname == null ? "" : oname; +/* 313 */ Object[] arguments = { new String(arg1), new String(arg2) }; +/* 314 */ Console.println(MessageFormat.format( +/* 315 */ Console.message("Trigger-obs"), arguments)); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Trigger.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TriggeredSwitchableBehavior.java b/NET/worlds/scape/TriggeredSwitchableBehavior.java new file mode 100644 index 0000000..2481fa1 --- /dev/null +++ b/NET/worlds/scape/TriggeredSwitchableBehavior.java @@ -0,0 +1,25 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ public abstract class TriggeredSwitchableBehavior +/* */ extends SwitchableBehavior +/* */ { +/* */ public String trigger; +/* */ +/* */ public String externalTriggerTag; +/* */ +/* */ public int sequence_no; +/* */ +/* */ public int event_no; +/* */ +/* 16 */ Trigger trigger_source = null; +/* */ +/* */ public abstract void ExternalTrigger(Trigger paramTrigger, int paramInt1, int paramInt2); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TriggeredSwitchableBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/TwoWayPortal.java b/NET/worlds/scape/TwoWayPortal.java new file mode 100644 index 0000000..ac07aac --- /dev/null +++ b/NET/worlds/scape/TwoWayPortal.java @@ -0,0 +1,99 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class TwoWayPortal +/* */ extends Portal +/* */ { +/* */ public TwoWayPortal(String targetRoom, float llx, float lly, float llz, float urx, float ury, float urz) +/* */ { +/* 29 */ super(llx, lly, llz, urx, ury, urz); +/* 30 */ setFarSideInfo(null, targetRoom, null); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 36 */ private static Object classCookie = new Object(); +/* */ +/* */ public TwoWayPortal() {} +/* */ +/* 40 */ public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie); +/* 41 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 46 */ int vers = r.restoreVersion(classCookie); +/* 47 */ switch (vers) { +/* */ case 0: +/* 49 */ super.restoreState(r); +/* 50 */ break; +/* */ default: +/* 52 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ public void detach() +/* */ throws ClassCastException +/* */ { +/* 61 */ super.detach(); +/* 62 */ Portal p = farSide(); +/* 63 */ if (p != null) { +/* 64 */ p.detach(); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void reset(boolean showmessage) +/* */ { +/* 71 */ super.reset(showmessage); +/* */ +/* 73 */ if (farSideRoom() != null) +/* */ { +/* 75 */ Portal p = farSide(); +/* 76 */ if (p != null) { +/* 77 */ if (p.isActive()) { +/* 78 */ return; +/* */ } +/* */ +/* 81 */ p.detach(); +/* 82 */ bidisconnect(); +/* */ } +/* */ +/* 85 */ Point3Temp left = getWorldPosition(); +/* 86 */ Point3Temp right = getFarCorner(); +/* 87 */ p = new Portal(right.x, right.y, left.z, left.x, left.y, right.z); +/* 88 */ farSideRoom().add(p); +/* */ +/* 90 */ biconnect(p); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TwoWayPortal.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/URLEditorDialog.java b/NET/worlds/scape/URLEditorDialog.java new file mode 100644 index 0000000..904e3db --- /dev/null +++ b/NET/worlds/scape/URLEditorDialog.java @@ -0,0 +1,89 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class URLEditorDialog +/* */ extends FieldWithListEditorDialog +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ Property property; +/* */ FileList extChecker; +/* */ +/* */ URLEditorDialog(EditTile parent, String title, Property property, Vector files, FileList extChecker) +/* */ { +/* 36 */ super(parent, title + " dir: " + URL.getBestContainer((SuperRoot)property.getOwner()), files); +/* 37 */ this.property = property; +/* 38 */ this.extChecker = extChecker; +/* 39 */ ready(); +/* */ } +/* */ +/* */ protected String getValue() +/* */ { +/* 44 */ SuperRoot context = (SuperRoot)this.property.getOwner(); +/* */ +/* */ +/* */ +/* 48 */ if ((context != null) && (this.property.getName().equals("Source URL"))) { +/* 49 */ context = context.getOwner(); +/* */ } +/* 51 */ String s = URL.getRelativeTo((URL)this.property.get(), context); +/* 52 */ if (s == null) +/* 53 */ return ""; +/* 54 */ return s; +/* */ } +/* */ +/* */ protected boolean setValue(String text) +/* */ { +/* 59 */ URL url = null; +/* */ +/* 61 */ if (text.length() == 0) { +/* 62 */ if (!this.property.canSetNull()) +/* 63 */ return false; +/* */ } else { +/* 65 */ if ((this.extChecker != null) && (!this.extChecker.extMatches(text))) { +/* 66 */ Console.println( +/* */ +/* 68 */ Console.message("extension-match") + this.extChecker.getExtList()); +/* 69 */ return false; +/* */ } +/* */ try +/* */ { +/* 73 */ url = new URL((SuperRoot)this.property.getOwner(), text); +/* */ } catch (MalformedURLException e) { +/* 75 */ Console.println(Console.message("Illegal-URL") + e); +/* 76 */ return false; +/* */ } +/* */ } +/* */ +/* 80 */ this.parent.addUndoableSet(this.property, url); +/* 81 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\URLEditorDialog.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/URLPropertyEditor.java b/NET/worlds/scape/URLPropertyEditor.java new file mode 100644 index 0000000..b624c29 --- /dev/null +++ b/NET/worlds/scape/URLPropertyEditor.java @@ -0,0 +1,177 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.PolledDialog; +/* */ import NET.worlds.network.URL; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class URLPropertyEditor +/* */ extends PropEditor +/* */ { +/* */ private FileList files; +/* */ private Enumeration additions; +/* 96 */ private boolean acceptAnyExt = false; +/* */ +/* */ private boolean acceptDrops; +/* */ +/* */ +/* */ private URLPropertyEditor(Property property, String extList, Enumeration additions, boolean acceptDrops) +/* */ { +/* 103 */ super(property); +/* 104 */ this.acceptDrops = acceptDrops; +/* 105 */ URL dir = URL.getContainingOrCurDir((SuperRoot)property.getOwner()); +/* */ +/* */ +/* 108 */ if (extList == null) { +/* 109 */ this.acceptAnyExt = true; +/* */ } else { +/* 111 */ if (extList.startsWith("*")) { +/* 112 */ extList = extList.substring(1); +/* 113 */ this.acceptAnyExt = true; +/* */ } +/* */ +/* */ +/* 117 */ this.files = new FileList(dir.unalias(), extList); +/* */ } +/* 119 */ this.additions = additions; +/* */ } +/* */ +/* */ public PolledDialog edit(EditTile parent, String title) +/* */ { +/* 124 */ Vector v = this.files == null ? new Vector() : this.files.getList(); +/* 125 */ if (this.additions != null) +/* 126 */ while (this.additions.hasMoreElements()) +/* 127 */ v.addElement(((URL)this.additions.nextElement()).toString()); +/* 128 */ return new URLEditorDialog(parent, title, this.property, v, +/* 129 */ this.acceptAnyExt ? null : this.files); +/* */ } +/* */ +/* */ public static Property make(Property property, String extList) +/* */ { +/* 134 */ return make(property, extList, null, true); +/* */ } +/* */ +/* */ +/* */ public static Property make(Property property, String extList, boolean acceptDrops) +/* */ { +/* 140 */ return make(property, extList, null, acceptDrops); +/* */ } +/* */ +/* */ +/* */ public static Property make(Property property, String extList, Enumeration additions) +/* */ { +/* 146 */ return make(property, extList, additions, true); +/* */ } +/* */ +/* */ +/* */ +/* */ public static Property make(Property property, String extList, Enumeration additions, boolean acceptDrops) +/* */ { +/* 153 */ property.setPropertyType(10); +/* 154 */ return property.setEditor(new URLPropertyEditor(property, +/* 155 */ extList, additions, +/* 156 */ acceptDrops)); +/* */ } +/* */ +/* */ +/* */ public boolean libraryDrop(EditTile target, Object obj, boolean isPaste, boolean doDrop) +/* */ { +/* 162 */ if ((!isPaste) && (this.acceptDrops) && ((obj instanceof URL)) && ( +/* 163 */ (this.acceptAnyExt) || (this.files.extMatches(((URL)obj).getExt())))) +/* */ { +/* 165 */ if (doDrop) +/* 166 */ target.addUndoableSet(this.property, obj); +/* 167 */ return true; +/* */ } +/* 169 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\URLPropertyEditor.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/URLSelf.java b/NET/worlds/scape/URLSelf.java new file mode 100644 index 0000000..7f60110 --- /dev/null +++ b/NET/worlds/scape/URLSelf.java @@ -0,0 +1,21 @@ +package NET.worlds.scape; + +import NET.worlds.network.URL; + +public abstract interface URLSelf + extends Persister +{ + public abstract void incRef(); + + public abstract void decRef(); + + public abstract URL getSourceURL(); + + public abstract void setSourceURL(URL paramURL); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\URLSelf.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/URLSelfLoader.java b/NET/worlds/scape/URLSelfLoader.java new file mode 100644 index 0000000..2a605cf --- /dev/null +++ b/NET/worlds/scape/URLSelfLoader.java @@ -0,0 +1,300 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.DataInputStream; +/* */ import java.io.FileInputStream; +/* */ import java.io.IOException; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class URLSelfLoader +/* */ implements BGLoaded +/* */ { +/* 61 */ private static Hashtable loaded = new Hashtable(); +/* */ +/* 63 */ private static Hashtable loading = new Hashtable(); +/* */ +/* */ +/* */ +/* */ +/* */ private URL url; +/* */ +/* */ +/* */ +/* */ +/* */ public static void load(URL url, LoadedURLSelf callback) +/* */ { +/* 75 */ load(url, callback, false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void load(URL url, LoadedURLSelf callback, boolean isHighPriority) +/* */ { +/* 86 */ URLSelf o = (URLSelf)loaded.get(url); +/* 87 */ if (o != null) { +/* 88 */ o.incRef(); +/* 89 */ callback.loadedURLSelf(o, url, null); +/* 90 */ return; +/* */ } +/* */ +/* */ +/* 94 */ URLSelfLoader cl = (URLSelfLoader)loading.get(url); +/* 95 */ if (cl != null) { +/* 96 */ cl.callbacks.addElement(callback); +/* 97 */ return; +/* */ } +/* */ +/* */ +/* 101 */ new URLSelfLoader(url, callback, isHighPriority); +/* */ } +/* */ +/* */ public static void unload(URLSelf self) { +/* 105 */ loaded.remove(self.getSourceURL()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void immediateLoad(IncrementalRestorer o, Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 118 */ new URLSelfLoader(o, r); +/* */ } +/* */ +/* */ private URLSelfLoader(IncrementalRestorer o, Restorer r) throws IOException, TooNewException +/* */ { +/* 123 */ this.url = null; +/* */ +/* 125 */ while (this.state != -1) { +/* */ try { +/* 127 */ this.state = o.incRestore(this.state, r, this); +/* */ } catch (Exception e) { +/* 129 */ e.printStackTrace(System.out); +/* 130 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 136 */ private Vector callbacks = new Vector(); +/* */ private static final int INIT = 0; +/* */ +/* 139 */ public URL getURL() { return this.url; } +/* */ +/* */ +/* */ private URLSelfLoader(URL url, LoadedURLSelf callback, boolean isHighPriority) +/* */ { +/* 144 */ loading.put(url, this); +/* 145 */ this.url = url; +/* 146 */ this.callbacks.addElement(callback); +/* */ +/* 148 */ BackgroundLoader.get(this, url, isHighPriority); +/* */ } +/* */ +/* */ +/* */ +/* */ private static final int DONE = -1; +/* */ +/* 155 */ private int state = 0; +/* */ +/* */ private DataInputStream inFile; +/* */ +/* */ private Restorer restorer; +/* */ +/* */ private URLSelf loadedObj; +/* */ +/* */ public Object otemp1; +/* */ +/* */ public Object otemp2; +/* */ +/* */ public int itemp1; +/* */ public int itemp2; +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteName) +/* */ { +/* 172 */ if (localName == null) { +/* 173 */ return "Can't find file " + this.url; +/* */ } +/* */ try { +/* 176 */ return new DataInputStream(new FileInputStream(localName)); +/* */ } catch (IOException e) {} +/* 178 */ return "Can't load file " + this.url; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 188 */ if ((obj instanceof String)) { +/* 189 */ doneLoading(null, (String)obj); +/* 190 */ return false; +/* */ } +/* */ +/* 193 */ assert (this.state != -1); +/* */ +/* 195 */ if (this.state == 0) +/* */ { +/* 197 */ this.inFile = ((DataInputStream)obj); +/* */ +/* 199 */ Object o = null; +/* */ try { +/* 201 */ this.restorer = new Restorer(this.inFile, this.url); +/* 202 */ o = this.restorer.restore(false); +/* 203 */ this.loadedObj = ((URLSelf)o); +/* */ +/* 205 */ this.loadedObj.setSourceURL(getURL()); +/* */ +/* 207 */ if (!(this.loadedObj instanceof IncrementalRestorer)) { +/* 208 */ this.loadedObj.restoreState(this.restorer); +/* 209 */ this.restorer.done(); +/* 210 */ return doneLoading(this.loadedObj, null); +/* */ } +/* */ } catch (Exception e) { +/* 213 */ e.printStackTrace(System.out); +/* 214 */ return doneLoading(null, "Can't restore from file " + this.url + +/* 215 */ ": " + e.toString()); +/* */ } +/* */ } +/* */ try +/* */ { +/* 220 */ this.state = ((IncrementalRestorer)this.loadedObj).incRestore(this.state, +/* 221 */ this.restorer, this); +/* */ } catch (Exception e) { +/* 223 */ e.printStackTrace(System.out); +/* 224 */ return doneLoading(null, e.toString()); +/* */ } +/* */ +/* 227 */ if (this.state == -1) { +/* */ try { +/* 229 */ this.restorer.done(); +/* */ } catch (IOException e) { +/* 231 */ e.printStackTrace(System.out); +/* 232 */ return doneLoading(null, e.toString()); +/* */ } +/* 234 */ if ((this.restorer.version() < 3) && ((this.loadedObj instanceof Camera))) +/* */ { +/* 236 */ Camera cam = (Camera)this.loadedObj; +/* 237 */ World w = cam.getWorld(); +/* 238 */ w.setSourceURL(cam.getSourceURL()); +/* */ } +/* */ +/* 241 */ return doneLoading(this.loadedObj, null); +/* */ } +/* */ +/* 244 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean doneLoading(URLSelf o, String err) +/* */ { +/* 256 */ if (this.inFile != null) { +/* */ try { +/* 258 */ this.inFile.close(); +/* 259 */ this.inFile = null; +/* */ } catch (Exception ex) { +/* 261 */ this.inFile = null; +/* */ } +/* */ } +/* */ +/* 265 */ loading.remove(this.url); +/* */ +/* */ +/* */ +/* 269 */ if (o != null) { +/* 270 */ if ((this.restorer.version() < 4) && ((o instanceof Camera))) { +/* 271 */ Camera c = (Camera)o; +/* 272 */ o = c.getWorld(); +/* 273 */ c.detach(); +/* */ } +/* */ +/* 276 */ loaded.put(this.url, o); +/* */ } +/* */ +/* 279 */ int end = this.callbacks.size(); +/* 280 */ for (int i = 0; i < end; i++) { +/* 281 */ LoadedURLSelf callback = (LoadedURLSelf)this.callbacks.elementAt(i); +/* 282 */ if (o != null) +/* 283 */ o.incRef(); +/* 284 */ callback.loadedURLSelf(o, this.url, err); +/* */ } +/* */ +/* 287 */ this.state = -1; +/* 288 */ return false; +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() { +/* 292 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\URLSelfLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoStack.java b/NET/worlds/scape/UndoStack.java new file mode 100644 index 0000000..2243772 --- /dev/null +++ b/NET/worlds/scape/UndoStack.java @@ -0,0 +1,66 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UndoStack +/* */ { +/* 18 */ private Undoable[] stack = new Undoable[100]; +/* */ +/* */ +/* */ private int stackPtr; +/* */ +/* */ +/* */ +/* */ Undoable peek() +/* */ { +/* 27 */ return this.stackPtr - 1 >= 0 ? this.stack[(this.stackPtr - 1)] : +/* 28 */ this.stack[(this.stack.length - 1)]; +/* */ } +/* */ +/* */ void push(Undoable undo) +/* */ { +/* */ for (;;) { +/* */ try { +/* 35 */ this.stack[(this.stackPtr++)] = undo; +/* 36 */ return; +/* */ } catch (IndexOutOfBoundsException e) { +/* 38 */ this.stackPtr = 0; +/* */ } +/* */ } +/* */ } +/* */ +/* */ boolean undo() +/* */ { +/* */ for (;;) { +/* */ try { +/* 47 */ Undoable u = this.stack[(--this.stackPtr)]; +/* 48 */ if (u != null) { +/* 49 */ u.undo(); +/* 50 */ this.stack[this.stackPtr] = null; +/* 51 */ return true; +/* */ } +/* 53 */ Console.println(Console.message("No-undo")); +/* 54 */ return false; +/* */ } catch (IndexOutOfBoundsException e) { +/* 56 */ this.stackPtr = this.stack.length; +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoStack.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoWidget.java b/NET/worlds/scape/UndoWidget.java new file mode 100644 index 0000000..3a9002b --- /dev/null +++ b/NET/worlds/scape/UndoWidget.java @@ -0,0 +1,35 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UndoWidget +/* */ extends ClickWidget +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public UndoWidget(ToolBar toolbar) +/* */ { +/* 22 */ super(toolbar, "undo.gif", Console.message("Undo")); +/* */ } +/* */ +/* */ public void perform() +/* */ { +/* 27 */ Console.getFrame().getEditTile().undo(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoabCopy.java b/NET/worlds/scape/UndoabCopy.java new file mode 100644 index 0000000..1c02a3d --- /dev/null +++ b/NET/worlds/scape/UndoabCopy.java @@ -0,0 +1,31 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UndoabCopy +/* */ implements Undoable +/* */ { +/* */ private ClipboardEntry prevClipboard; +/* */ +/* */ +/* */ +/* */ +/* */ UndoabCopy(ClipboardEntry newClipboard) +/* */ { +/* 17 */ this.prevClipboard = EditTile.getClipboard(); +/* 18 */ EditTile.setClipboard(newClipboard); +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 23 */ EditTile.setClipboard(this.prevClipboard); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoabCopy.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablAdd.java b/NET/worlds/scape/UndoablAdd.java new file mode 100644 index 0000000..53cb3ad --- /dev/null +++ b/NET/worlds/scape/UndoablAdd.java @@ -0,0 +1,40 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ class UndoablAdd +/* */ implements Undoable +/* */ { +/* */ protected VectorProperty prop; +/* */ +/* */ +/* */ +/* */ protected Object obj; +/* */ +/* */ +/* */ +/* */ +/* */ UndoablAdd(VectorProperty prop, Object obj) +/* */ { +/* 20 */ this.prop = prop; +/* 21 */ this.obj = obj; +/* 22 */ prop.add(obj); +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 27 */ this.prop.delete(this.obj); +/* */ } +/* */ +/* */ public Object getObject() +/* */ { +/* 32 */ return this.obj; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablAdd.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablCut.java b/NET/worlds/scape/UndoablCut.java new file mode 100644 index 0000000..5285410 --- /dev/null +++ b/NET/worlds/scape/UndoablCut.java @@ -0,0 +1,42 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ class UndoablCut +/* */ extends UndoablDelete +/* */ { +/* */ private ClipboardEntry prevClipboard; +/* */ +/* */ +/* */ +/* */ private boolean clipValid; +/* */ +/* */ +/* */ +/* */ +/* */ UndoablCut(VectorProperty prop, int index) +/* */ { +/* 20 */ super(prop, index); +/* 21 */ this.prevClipboard = EditTile.getClipboard(); +/* 22 */ ClipboardEntry newEnt = new ClipboardEntry(); +/* 23 */ if (newEnt.cut((SuperRoot)this.obj)) { +/* 24 */ EditTile.setClipboard(newEnt); +/* 25 */ this.clipValid = true; +/* */ } +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 31 */ super.undo(); +/* 32 */ if (this.clipValid) { +/* 33 */ EditTile.setClipboard(this.prevClipboard); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablCut.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablDelete.java b/NET/worlds/scape/UndoablDelete.java new file mode 100644 index 0000000..4186392 --- /dev/null +++ b/NET/worlds/scape/UndoablDelete.java @@ -0,0 +1,35 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UndoablDelete +/* */ implements Undoable +/* */ { +/* */ protected VectorProperty prop; +/* */ protected Object obj; +/* */ +/* */ UndoablDelete(VectorProperty prop, int index) +/* */ { +/* 20 */ this.prop = prop; +/* 21 */ this.obj = ((Vector)prop.get()).elementAt(index); +/* 22 */ prop.delete(this.obj); +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 27 */ this.prop.add(this.obj); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablDelete.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablPaste.java b/NET/worlds/scape/UndoablPaste.java new file mode 100644 index 0000000..2039ed6 --- /dev/null +++ b/NET/worlds/scape/UndoablPaste.java @@ -0,0 +1,34 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class UndoablPaste +/* */ extends UndoablAdd +/* */ { +/* */ private ClipboardEntry clipboard; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ UndoablPaste(VectorProperty prop, ClipboardEntry clipboard, Object obj) +/* */ { +/* 19 */ super(prop, obj); +/* 20 */ this.clipboard = clipboard; +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 25 */ super.undo(); +/* 26 */ this.clipboard.unPaste((SuperRoot)this.obj); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablPaste.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablSet.java b/NET/worlds/scape/UndoablSet.java new file mode 100644 index 0000000..843b405 --- /dev/null +++ b/NET/worlds/scape/UndoablSet.java @@ -0,0 +1,33 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ class UndoablSet +/* */ implements Undoable +/* */ { +/* */ private Property prop; +/* */ +/* */ +/* */ private Object obj; +/* */ +/* */ +/* */ +/* */ UndoablSet(Property prop, Object newObj) +/* */ { +/* 18 */ this.prop = prop; +/* 19 */ this.obj = prop.get(); +/* 20 */ prop.set(newObj); +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 25 */ this.prop.set(this.obj); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablSet.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UndoablTransform.java b/NET/worlds/scape/UndoablTransform.java new file mode 100644 index 0000000..1ea34c4 --- /dev/null +++ b/NET/worlds/scape/UndoablTransform.java @@ -0,0 +1,30 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ class UndoablTransform +/* */ implements Undoable +/* */ { +/* */ private WObject wob; +/* */ +/* */ +/* */ private Transform transform; +/* */ +/* */ +/* */ UndoablTransform(WObject wob) +/* */ { +/* 16 */ this.wob = wob; +/* 17 */ this.transform = wob.getTransform(); +/* */ } +/* */ +/* */ public void undo() +/* */ { +/* 22 */ this.wob.setTransform(this.transform); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UndoablTransform.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Undoable.java b/NET/worlds/scape/Undoable.java new file mode 100644 index 0000000..c3771c9 --- /dev/null +++ b/NET/worlds/scape/Undoable.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface Undoable +{ + public abstract void undo(); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Undoable.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UniqueHasher.java b/NET/worlds/scape/UniqueHasher.java new file mode 100644 index 0000000..0fa6d93 --- /dev/null +++ b/NET/worlds/scape/UniqueHasher.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Hashtable; +/* */ +/* */ public class UniqueHasher { +/* */ private int currentHash; +/* */ private static UniqueHasher uh_; +/* */ private Hashtable ht; +/* */ +/* */ private UniqueHasher() { +/* 11 */ this.currentHash = 0; +/* 12 */ this.ht = new Hashtable(); +/* */ } +/* */ +/* */ public static UniqueHasher uh() +/* */ { +/* 17 */ if (uh_ == null) { +/* 18 */ uh_ = new UniqueHasher(); +/* */ } +/* 20 */ return uh_; +/* */ } +/* */ +/* */ public int hash(Object toHash) +/* */ { +/* 25 */ Integer value = (Integer)this.ht.get(toHash); +/* 26 */ if (value == null) +/* */ { +/* 28 */ this.currentHash += 1; +/* 29 */ value = new Integer(this.currentHash); +/* 30 */ this.ht.put(toHash, value); +/* */ } +/* */ +/* 33 */ return value.intValue(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UniqueHasher.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UnitEnumeration.java b/NET/worlds/scape/UnitEnumeration.java new file mode 100644 index 0000000..7b25250 --- /dev/null +++ b/NET/worlds/scape/UnitEnumeration.java @@ -0,0 +1,47 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UnitEnumeration +/* */ implements Enumeration +/* */ { +/* */ private Object o; +/* */ +/* */ UnitEnumeration(Object o) +/* */ { +/* 27 */ this.o = o; +/* */ } +/* */ +/* */ public boolean hasMoreElements() +/* */ { +/* 32 */ return this.o != null; +/* */ } +/* */ +/* */ public Object nextElement() +/* */ { +/* 37 */ Object t = this.o; +/* 38 */ this.o = null; +/* 39 */ return t; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UnitEnumeration.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UniverseHandler.java b/NET/worlds/scape/UniverseHandler.java new file mode 100644 index 0000000..d1d54ba --- /dev/null +++ b/NET/worlds/scape/UniverseHandler.java @@ -0,0 +1,76 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.UniversePanel; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UniverseHandler +/* */ { +/* */ public static boolean handle(MouseDeltaEvent e) +/* */ { +/* 16 */ if ((e.dx != 0) || (e.dy != 0)) +/* */ { +/* 18 */ Console cons = Console.getActive(); +/* 19 */ UniversePanel universe = null; +/* 20 */ if ((cons instanceof DefaultConsole)) +/* 21 */ universe = ((DefaultConsole)cons).getUniverse(); +/* 22 */ if (universe != null) { +/* 23 */ universe.addOffset(-e.dx, -e.dy); +/* 24 */ return true; +/* */ } +/* */ } +/* */ +/* 28 */ return false; +/* */ } +/* */ +/* */ +/* */ public static boolean handle(KeyDownEvent e) +/* */ { +/* 34 */ Console cons = Console.getActive(); +/* 35 */ UniversePanel universe = null; +/* 36 */ if ((cons instanceof DefaultConsole)) +/* 37 */ universe = ((DefaultConsole)cons).getUniverse(); +/* 38 */ if (universe != null) { +/* 39 */ switch (e.key) { +/* */ case '': +/* 41 */ universe.keyDown(null, 1004); +/* 42 */ return true; +/* */ case '': +/* 44 */ universe.keyDown(null, 1005); +/* 45 */ return true; +/* */ case '': +/* 47 */ universe.keyDown(null, 1006); +/* 48 */ return true; +/* */ case '': +/* 50 */ universe.keyDown(null, 1007); +/* 51 */ return true; +/* */ } +/* */ +/* */ } +/* 55 */ return false; +/* */ } +/* */ +/* */ public static boolean handle(KeyUpEvent e) +/* */ { +/* 60 */ Console cons = Console.getActive(); +/* 61 */ UniversePanel universe = null; +/* 62 */ if ((cons instanceof DefaultConsole)) +/* 63 */ universe = ((DefaultConsole)cons).getUniverse(); +/* 64 */ if (universe != null) { +/* 65 */ universe.keyUp(null, 1004); +/* 66 */ return true; +/* */ } +/* 68 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UniverseHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UserEvent.java b/NET/worlds/scape/UserEvent.java new file mode 100644 index 0000000..1d179d3 --- /dev/null +++ b/NET/worlds/scape/UserEvent.java @@ -0,0 +1,48 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class UserEvent +/* */ extends Event +/* */ { +/* */ public UserEvent(int time, Object source, WObject target) +/* */ { +/* 21 */ super(time, source, target); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 33 */ if (((o instanceof UserHandler)) && +/* 34 */ (((UserHandler)o).handle(this))) { +/* 35 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 40 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UserEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/UserHandler.java b/NET/worlds/scape/UserHandler.java new file mode 100644 index 0000000..d848a26 --- /dev/null +++ b/NET/worlds/scape/UserHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface UserHandler +{ + public abstract boolean handle(UserEvent paramUserEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\UserHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VTransWidget.java b/NET/worlds/scape/VTransWidget.java new file mode 100644 index 0000000..0ab6b83 --- /dev/null +++ b/NET/worlds/scape/VTransWidget.java @@ -0,0 +1,42 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.SnapTool; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class VTransWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public VTransWidget(ToolBar toolbar) +/* */ { +/* 23 */ super(toolbar, "vtrans.gif", "Move vertically"); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 28 */ Transform t = Transform.make(); +/* 29 */ applyWorldTransform(initialDrag, +/* 30 */ t.moveBy(SnapTool.snapTool().snapTo( +/* 31 */ getWorldAxis(1, 0, 0).times(deltax).plus( +/* 32 */ getWorldAxis(0, 0, 1).times(deltay))))); +/* 33 */ t.recycle(); +/* 34 */ return getWObject().getPosition(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VTransWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ValueEvent.java b/NET/worlds/scape/ValueEvent.java new file mode 100644 index 0000000..782724c --- /dev/null +++ b/NET/worlds/scape/ValueEvent.java @@ -0,0 +1,46 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ +/* */ public class ValueEvent +/* */ extends Event +/* */ { +/* */ public Object whoChanged; +/* */ +/* */ +/* */ +/* */ +/* */ public ValueEvent(int time, Object source, WObject target, Object whoChanged) +/* */ { +/* 16 */ super(time, source, target); +/* */ +/* 18 */ this.whoChanged = whoChanged; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Object o) +/* */ { +/* 31 */ if (((o instanceof ValueHandler)) && +/* 32 */ (((ValueHandler)o).handle(this))) { +/* 33 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 38 */ return false; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ValueEvent.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/ValueHandler.java b/NET/worlds/scape/ValueHandler.java new file mode 100644 index 0000000..f3caebb --- /dev/null +++ b/NET/worlds/scape/ValueHandler.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface ValueHandler +{ + public abstract boolean handle(ValueEvent paramValueEvent); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\ValueHandler.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VectorProperty.java b/NET/worlds/scape/VectorProperty.java new file mode 100644 index 0000000..d5e3d77 --- /dev/null +++ b/NET/worlds/scape/VectorProperty.java @@ -0,0 +1,96 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Enumeration; +/* */ import java.util.Hashtable; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VectorProperty +/* */ extends Property +/* */ { +/* */ private PropAdder adder; +/* 24 */ private boolean allowSorting = true; +/* */ +/* */ public VectorProperty(Properties owner, int index, String propName) +/* */ { +/* 28 */ super(owner, index, propName); +/* */ } +/* */ +/* */ public static Vector toVector(Object[] arr) +/* */ { +/* 33 */ Vector v = new Vector(arr.length); +/* 34 */ for (int i = 0; i < arr.length; i++) +/* 35 */ v.addElement(arr[i]); +/* 36 */ return v; +/* */ } +/* */ +/* */ public static Vector toVector(Hashtable hash) +/* */ { +/* 41 */ Vector v = new Vector(hash.size()); +/* */ +/* 43 */ Enumeration e = hash.elements(); +/* 44 */ while (e.hasMoreElements()) +/* 45 */ v.addElement(e.nextElement()); +/* 46 */ return v; +/* */ } +/* */ +/* */ public Object delete(Object obj) +/* */ { +/* 51 */ assert (obj != null); +/* 52 */ assert (this.adder != null); +/* 53 */ return operate(4, obj); +/* */ } +/* */ +/* */ public Object add(Object obj) +/* */ { +/* 58 */ assert (obj != null); +/* 59 */ assert (this.adder != null); +/* 60 */ return operate(3, obj); +/* */ } +/* */ +/* */ public boolean addTest(Object obj) +/* */ { +/* 65 */ assert (obj != null); +/* 66 */ assert (this.adder != null); +/* 67 */ return operate(5, obj) != null; +/* */ } +/* */ +/* */ public VectorProperty setAdder(PropAdder adder) +/* */ { +/* 72 */ this.adder = adder; +/* 73 */ return this; +/* */ } +/* */ +/* */ public PropAdder getAdder() +/* */ { +/* 78 */ return this.adder; +/* */ } +/* */ +/* */ public void allowSorting(boolean allow) +/* */ { +/* 83 */ this.allowSorting = allow; +/* */ } +/* */ +/* */ public boolean shouldSort() +/* */ { +/* 88 */ return this.allowSorting; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VectorProperty.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VehicleDriver.java b/NET/worlds/scape/VehicleDriver.java new file mode 100644 index 0000000..79b6406 --- /dev/null +++ b/NET/worlds/scape/VehicleDriver.java @@ -0,0 +1,1086 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VehicleDriver +/* */ extends SwitchableBehavior +/* */ implements MouseDeltaHandler, KeyUpHandler, KeyDownHandler, MouseDownHandler, MouseUpHandler, FrameHandler +/* */ { +/* */ protected VehicleShape vehicle; +/* */ static final boolean debug = true; +/* */ static final float gravity = 32.1F; +/* */ static final float densityOfAir = 0.0801F; +/* */ static final float dragCoefficient = 0.3F; +/* */ static final float feetToWorld = 30.48F; +/* */ static final float worldToFeet = 0.0328084F; +/* */ static final float epsilon = 0.001F; +/* */ static final float maxCamber = 0.4F; +/* */ static final float rotationalDampener = 0.5F; +/* */ static final int asphalt = 0; +/* */ static final int grass = 1; +/* */ static final int numTerrainTypes = 2; +/* 66 */ float acceleratorDepression = 0.0F; +/* */ +/* 68 */ float brakesDepression = 0.0F; +/* */ +/* 70 */ int currentGear = 1; +/* */ +/* 72 */ float steeringWheelPosition = 0.0F; +/* */ +/* 74 */ boolean gasKeyDown = false; boolean brakeKeyDown = false; +/* 75 */ boolean leftKeyDown = false; boolean rightKeyDown = false; +/* */ +/* */ +/* 78 */ Point3 velocityVector = new Point3(0.0F, 0.0F, 0.0F); +/* 79 */ Point3 velocityVectorCarFrame = new Point3(0.0F, 0.0F, 0.0F); +/* 80 */ float velocity = 0.0F; +/* */ +/* 82 */ Point3 angularVelocity = new Point3(0.0F, 0.0F, 0.0F); +/* 83 */ Point3 angularVelocityCarFrame = new Point3(0.0F, 0.0F, 0.0F); +/* */ +/* 85 */ Point3 worldCenterOfMass = new Point3(0.0F, 0.0F, 0.0F); +/* 86 */ float engineRPM = 0.0F; +/* */ +/* */ +/* */ +/* 90 */ Point3 integratedForce = new Point3(0.0F, 0.0F, 0.0F); +/* */ +/* 92 */ Point3 integratedTorque = new Point3(0.0F, 0.0F, 0.0F); +/* */ +/* */ +/* 95 */ boolean disabled = false; +/* */ +/* */ float[] minRPMs; +/* */ Tire[] tires; +/* */ protected Room room; +/* */ protected Pilot pilot; +/* */ +/* */ protected class Tire +/* */ { +/* */ Point3 force; +/* */ Point3 torque; +/* */ Point3 relativePos; +/* */ float underGround; +/* */ double driveForce; +/* */ float wheelAngle; +/* */ boolean slipping; +/* */ +/* */ public Tire() +/* */ { +/* 114 */ this.force = new Point3(); +/* 115 */ this.torque = new Point3(); +/* 116 */ this.relativePos = new Point3(); +/* 117 */ this.driveForce = 0.0D; +/* 118 */ this.underGround = 0.0F; +/* 119 */ this.wheelAngle = 0.0F; +/* 120 */ this.slipping = false; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public VehicleDriver(VehicleShape p_Vehicle) +/* */ { +/* 132 */ this.vehicle = p_Vehicle; +/* */ +/* 134 */ initLateralForceTable(); +/* 135 */ initTorqueTable(); +/* 136 */ initRPMTable(); +/* 137 */ this.tires = new Tire[4]; +/* 138 */ for (int tire = 0; tire < 4; tire++) +/* */ { +/* 140 */ this.tires[tire] = new Tire(); +/* 141 */ this.tires[tire].relativePos.copy(this.vehicle.tirePositions[tire]); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(MouseDeltaEvent e) +/* */ { +/* 150 */ if (UniverseHandler.handle(e)) { +/* 151 */ return true; +/* */ } +/* 153 */ return false; +/* */ } +/* */ +/* */ public boolean handle(KeyDownEvent e) +/* */ { +/* 158 */ if (UniverseHandler.handle(e)) { +/* 159 */ return true; +/* */ } +/* 161 */ switch (e.key) +/* */ { +/* */ +/* */ case '': +/* 165 */ this.gasKeyDown = true; +/* 166 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 171 */ this.brakeKeyDown = true; +/* 172 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 177 */ this.leftKeyDown = true; +/* 178 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 183 */ this.rightKeyDown = true; +/* 184 */ break; +/* */ +/* */ +/* */ +/* */ case 'R': +/* */ case 'r': +/* 190 */ this.currentGear = 0; +/* 191 */ break; +/* */ +/* */ +/* */ +/* */ case '1': +/* 196 */ if (this.vehicle.stickShift) this.currentGear = 1; +/* 197 */ break; +/* */ +/* */ +/* */ +/* */ case '2': +/* 202 */ if (this.vehicle.stickShift) this.currentGear = 2; +/* 203 */ break; +/* */ +/* */ +/* */ +/* */ case '3': +/* 208 */ if (this.vehicle.stickShift) this.currentGear = 3; +/* 209 */ break; +/* */ +/* */ +/* */ +/* */ case '4': +/* 214 */ if (this.vehicle.stickShift) this.currentGear = 4; +/* 215 */ break; +/* */ +/* */ +/* */ +/* */ case '5': +/* 220 */ if (this.vehicle.stickShift) { this.currentGear = 5; +/* */ } +/* */ break; +/* */ } +/* */ +/* 225 */ return true; +/* */ } +/* */ +/* */ public boolean handle(KeyUpEvent e) +/* */ { +/* 230 */ if (UniverseHandler.handle(e)) { +/* 231 */ return true; +/* */ } +/* 233 */ switch (e.key) +/* */ { +/* */ +/* */ case '': +/* 237 */ this.gasKeyDown = false; +/* 238 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 243 */ this.brakeKeyDown = false; +/* 244 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 249 */ this.leftKeyDown = false; +/* 250 */ break; +/* */ +/* */ +/* */ +/* */ case '': +/* 255 */ this.rightKeyDown = false; +/* */ } +/* */ +/* */ +/* */ +/* 260 */ return true; +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 265 */ return false; +/* */ } +/* */ +/* */ public boolean handle(MouseUpEvent e) +/* */ { +/* 270 */ return false; +/* */ } +/* */ +/* 273 */ static float lastTime = 0.0F; +/* */ static final int lateralForceIncrements = 1000; +/* */ static float[][] muTable; +/* */ +/* */ public boolean handle(FrameEvent e) { +/* 278 */ if (!(e.receiver instanceof Pilot)) { +/* 279 */ return true; +/* */ } +/* 281 */ this.pilot = ((Pilot)e.receiver); +/* 282 */ if (!this.pilot.isActive()) { +/* 283 */ return true; +/* */ } +/* */ +/* 286 */ Point3Temp com = Point3Temp.make(this.vehicle.centerOfGravity); +/* 287 */ com.times(30.48F); +/* 288 */ com.times(this.pilot.getObjectToWorldMatrix()); +/* */ +/* 290 */ com.times(0.0328084F); +/* 291 */ this.worldCenterOfMass.set(com.x, com.y, com.z); +/* */ +/* */ +/* 294 */ this.room = this.pilot.getRoom(); +/* */ +/* */ +/* */ +/* 298 */ int now = e.time; +/* 299 */ float dt = (now - lastTime) / 1000.0F; +/* 300 */ lastTime = now; +/* */ +/* */ +/* */ +/* 304 */ if (dt <= 0.0F) { +/* 305 */ return true; +/* */ } +/* */ +/* */ +/* 309 */ if (dt > 0.33F) { +/* 310 */ dt = 0.33F; +/* */ } +/* */ +/* 313 */ if (this.gasKeyDown) { +/* 314 */ this.acceleratorDepression = ((float)(this.acceleratorDepression + 1.2D * dt)); +/* */ } else +/* 316 */ this.acceleratorDepression = 0.0F; +/* 317 */ if (this.acceleratorDepression > 1.0D) { +/* 318 */ this.acceleratorDepression = 1.0F; +/* */ } +/* 320 */ if (this.brakeKeyDown) { +/* 321 */ this.brakesDepression = ((float)(this.brakesDepression + 1.2D * dt)); +/* */ } else +/* 323 */ this.brakesDepression = 0.0F; +/* 324 */ if (this.brakesDepression > 1.0D) { +/* 325 */ this.brakesDepression = 1.0F; +/* */ } +/* 327 */ float wheelDelta = 0.282F * dt; +/* */ +/* */ +/* 330 */ if (Math.abs(this.velocityVectorCarFrame.y) < 10.0F) { +/* 331 */ wheelDelta = (float)(wheelDelta * 0.5D); +/* */ } +/* 333 */ if (this.leftKeyDown) { +/* 334 */ this.steeringWheelPosition -= wheelDelta; +/* 335 */ } else if (this.rightKeyDown) { +/* 336 */ this.steeringWheelPosition += wheelDelta; +/* */ } else +/* 338 */ this.steeringWheelPosition = 0.0F; +/* 339 */ if (this.steeringWheelPosition > 0.5D) +/* 340 */ this.steeringWheelPosition = 0.5F; +/* 341 */ if (this.steeringWheelPosition < -0.5D) { +/* 342 */ this.steeringWheelPosition = -0.5F; +/* */ } +/* 344 */ DoPhysics(dt); +/* */ +/* 346 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ protected void DoPhysics(float dt) +/* */ { +/* 353 */ System.out.println("-----------------------------"); +/* */ +/* */ +/* 356 */ float engineTorque = this.vehicle.maxEngineTorque * +/* 357 */ this.acceleratorDepression * getTorque(this.engineRPM); +/* */ +/* 359 */ assert (this.vehicle.wheelDiameter != 0.0F); +/* */ +/* 361 */ float gearRatio = getGearRatio(this.currentGear); +/* */ +/* */ +/* */ +/* 365 */ float wheelForce = engineTorque * this.vehicle.rearEndRatio * +/* 366 */ gearRatio / (this.vehicle.wheelDiameter * 0.5F); +/* */ +/* */ +/* 369 */ if (Math.abs(this.velocityVectorCarFrame.y) > 2.0D) +/* */ { +/* 371 */ wheelForce -= this.brakesDepression * this.vehicle.mass * 100.0F; +/* */ +/* */ +/* */ } +/* 375 */ else if (this.brakesDepression > 0.0F) { +/* 376 */ this.velocityVectorCarFrame.y = 0.0F; +/* */ } +/* */ +/* */ +/* 380 */ if (gearRatio == 0.0F) { +/* 381 */ wheelForce *= -1.0F; +/* */ } +/* */ +/* 384 */ if (this.disabled) { +/* 385 */ wheelForce = 0.0F; +/* */ } +/* */ +/* 388 */ switch (this.vehicle.driveType) +/* */ { +/* */ +/* */ case 0: +/* 392 */ wheelForce = (float)(wheelForce * 0.25D); +/* 393 */ this.tires[0].driveForce = (this.tires[1].driveForce = +/* 394 */ wheelForce); +/* 395 */ this.tires[2].driveForce = (this.tires[3].driveForce = +/* 396 */ wheelForce); +/* 397 */ break; +/* */ +/* */ +/* */ +/* */ case 1: +/* 402 */ wheelForce = (float)(wheelForce * 0.5D); +/* 403 */ this.tires[0].driveForce = (this.tires[1].driveForce = +/* 404 */ wheelForce); +/* 405 */ this.tires[2].driveForce = (this.tires[3].driveForce = 0.0D); +/* 406 */ break; +/* */ +/* */ +/* */ +/* */ case 2: +/* */ default: +/* 412 */ wheelForce = (float)(wheelForce * 0.5D); +/* 413 */ this.tires[0].driveForce = (this.tires[1].driveForce = 0.0D); +/* 414 */ this.tires[2].driveForce = (this.tires[3].driveForce = +/* 415 */ wheelForce); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 421 */ float wheelAngle = this.steeringWheelPosition * 1.57F; +/* */ +/* 423 */ this.tires[0].wheelAngle = (this.tires[1].wheelAngle = -wheelAngle); +/* */ +/* */ +/* 426 */ float wheelRPM = 60.0F * this.velocityVectorCarFrame.y / ( +/* 427 */ 3.1415927F * this.vehicle.wheelDiameter); +/* 428 */ this.engineRPM = (wheelRPM * this.vehicle.rearEndRatio * gearRatio); +/* 429 */ if (this.engineRPM < this.vehicle.idleRPM) { +/* 430 */ this.engineRPM = this.vehicle.idleRPM; +/* */ } +/* 432 */ if (!this.vehicle.stickShift) +/* */ { +/* 434 */ if (this.engineRPM > this.vehicle.rpmTorquePeak) +/* */ { +/* 436 */ if (this.currentGear < 5) +/* 437 */ this.currentGear += 1; +/* */ } +/* 439 */ if (this.engineRPM < this.minRPMs[this.currentGear]) +/* */ { +/* 441 */ if (this.currentGear > 1) { +/* 442 */ this.currentGear -= 1; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 452 */ Point3Temp netForce = Point3Temp.make(0.0F, 0.0F, 0.0F); +/* 453 */ Point3Temp netTorque = Point3Temp.make(0.0F, 0.0F, 0.0F); +/* 454 */ for (int wheel = 0; wheel < 4; wheel++) +/* */ { +/* 456 */ calculateForces(this.tires[wheel]); +/* 457 */ netForce.plus(this.tires[wheel].force); +/* 458 */ netTorque.plus(this.tires[wheel].torque); +/* */ } +/* */ +/* */ +/* 462 */ Point3Temp airFriction = Point3Temp.make(this.velocityVectorCarFrame); +/* 463 */ airFriction.negate(); +/* 464 */ airFriction.normalize(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 471 */ float drag = 0.15F * this.vehicle.frontalArea * +/* 472 */ 0.0801F * this.velocity * this.velocity / 32.1F; +/* 473 */ airFriction.times(drag); +/* 474 */ netForce.plus(airFriction); +/* */ +/* */ +/* 477 */ netForce.vectorTimes(this.pilot.getObjectToWorldMatrix()); +/* */ +/* */ +/* */ +/* 481 */ System.out.println("Net force " + netForce.x + " " + +/* 482 */ netForce.y + " " + netForce.z); +/* 483 */ System.out.println("Net torque " + netTorque.x + " " + +/* 484 */ netTorque.y + " " + netTorque.z); +/* */ +/* */ +/* */ +/* */ +/* 489 */ Point3Temp gravityForce = Point3Temp.make(0.0F, 0.0F, +/* 490 */ -this.vehicle.mass * 32.1F); +/* 491 */ netForce.plus(gravityForce); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 497 */ Point3Temp inertialDampener = Point3Temp.make(0.5F, +/* 498 */ 0.5F, 0.5F); +/* 499 */ inertialDampener.times(this.angularVelocityCarFrame); +/* 500 */ inertialDampener.times(this.vehicle.momentsOfInertia); +/* 501 */ inertialDampener.times(1.0F / dt); +/* 502 */ netTorque.minus(inertialDampener); +/* */ +/* */ +/* */ +/* 506 */ this.integratedForce.plus(netForce); +/* 507 */ this.integratedForce.times(0.5F); +/* 508 */ this.integratedTorque.plus(netTorque); +/* 509 */ this.integratedTorque.times(0.5F); +/* */ +/* */ +/* */ +/* 513 */ Point3Temp acceleration = Point3Temp.make(this.integratedForce); +/* 514 */ acceleration.times(1.0F / this.vehicle.mass); +/* */ +/* 516 */ Point3Temp dV = Point3Temp.make(acceleration); +/* 517 */ dV.times(dt); +/* */ +/* */ +/* 520 */ Point3Temp lastV = Point3Temp.make(this.velocityVector); +/* 521 */ Point3Temp lastW = Point3Temp.make(this.angularVelocityCarFrame); +/* 522 */ this.velocityVector.plus(dV); +/* 523 */ this.velocityVector.plus(lastV); +/* 524 */ this.velocityVector.times(0.5F); +/* 525 */ this.velocity = this.velocityVector.length(); +/* 526 */ this.velocityVectorCarFrame.copy(this.velocityVector); +/* 527 */ this.velocityVectorCarFrame.vectorTimes( +/* 528 */ this.pilot.getObjectToWorldMatrix().invert()); +/* */ +/* */ +/* 531 */ Point3Temp dw = Point3Temp.make(this.integratedTorque); +/* 532 */ dw.times(dt); +/* 533 */ dw.dividedBy(this.vehicle.momentsOfInertia); +/* */ +/* 535 */ this.angularVelocityCarFrame.plus(dw); +/* 536 */ this.angularVelocityCarFrame.plus(lastW); +/* 537 */ this.angularVelocityCarFrame.times(0.5F); +/* 538 */ this.angularVelocity.copy(this.angularVelocityCarFrame); +/* 539 */ this.angularVelocity.vectorTimes(this.pilot.getObjectToWorldMatrix()); +/* */ +/* */ +/* 542 */ Point3Temp dx = Point3Temp.make(this.velocityVector); +/* 543 */ dx.times(dt); +/* */ +/* 545 */ float maxUnderground = 0.0F; +/* 546 */ for (int tire = 0; tire < 4; tire++) +/* */ { +/* 548 */ float diff = -this.tires[tire].underGround; +/* 549 */ if (diff > maxUnderground) +/* 550 */ maxUnderground = diff; +/* */ } +/* 552 */ dx.z += maxUnderground; +/* */ +/* */ +/* 555 */ dx.times(30.48F); +/* */ +/* 557 */ Point3Temp da = Point3Temp.make(this.angularVelocity); +/* 558 */ da.times(dt); +/* */ +/* 560 */ this.pilot.premoveThrough(dx); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 567 */ float convert = 57.295776F; +/* 568 */ this.pilot.pitch(da.x * convert); +/* 569 */ this.pilot.roll(da.y * convert); +/* 570 */ this.pilot.yaw(da.z * convert); +/* */ +/* */ +/* */ +/* 574 */ System.out.println("dx " + dx.x + " " + dx.y + " " + dx.z); +/* 575 */ System.out.println("da " + da.x + " " + da.y + " " + da.z); +/* 576 */ System.out.println("pos" + this.pilot.getX() + " " + +/* 577 */ this.pilot.getY() + " " + this.pilot.getZ()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void calculateForces(Tire tire) +/* */ { +/* 587 */ tire.force.set(0.0F, 0.0F, 0.0F); +/* 588 */ tire.torque.set(0.0F, 0.0F, 0.0F); +/* */ +/* */ +/* 591 */ Transform o2w = this.pilot.getObjectToWorldMatrix(); +/* 592 */ Transform w2o = this.pilot.getObjectToWorldMatrix().invert(); +/* */ +/* 594 */ Point3Temp worldPos = Point3Temp.make(tire.relativePos); +/* 595 */ worldPos.plus(this.vehicle.centerOfGravity); +/* */ +/* */ +/* 598 */ worldPos.times(30.48F); +/* */ +/* 600 */ worldPos.times(o2w); +/* */ +/* */ +/* 603 */ double groundZ = this.room.floorHeight(worldPos.x, worldPos.y, +/* 604 */ worldPos.z); +/* */ +/* 606 */ Point3 N = this.room.surfaceNormal(worldPos.x, worldPos.y, +/* 607 */ worldPos.z); +/* */ +/* */ +/* 610 */ groundZ *= 0.03280840069055557D; +/* 611 */ worldPos.times(0.0328084F); +/* */ +/* 613 */ tire.underGround = ((float)(worldPos.z - groundZ)); +/* */ +/* */ +/* 616 */ if (tire.underGround > this.vehicle.shockLength) { return; +/* */ } +/* */ +/* */ +/* 620 */ Point3Temp R = Point3Temp.make(tire.relativePos); +/* 621 */ R.vectorTimes(o2w); +/* */ +/* 623 */ Point3Temp w = Point3Temp.make(this.angularVelocity); +/* 624 */ w.cross(R); +/* 625 */ w.plus(this.velocityVector); +/* 626 */ Point3Temp Vp = Point3Temp.make(w); +/* */ +/* */ +/* */ +/* 630 */ System.out.println("R " + R.x + " " + R.y + " " + R.z); +/* 631 */ System.out.println("Vp " + Vp.x + " " + Vp.y + " " + +/* 632 */ Vp.z); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 639 */ double normalSpeed = Vp.dot(N); +/* */ +/* */ +/* 642 */ Point3Temp No = Point3Temp.make(N); +/* 643 */ No.vectorTimes(w2o); +/* */ +/* */ +/* 646 */ Point3Temp tmp = Point3Temp.make(No); +/* 647 */ double scalarInertialMoment = tmp.dot( +/* 648 */ this.vehicle.momentsOfInertia); +/* 649 */ scalarInertialMoment = Math.abs(scalarInertialMoment); +/* */ +/* */ +/* 652 */ Point3Temp orthoNormal = Point3Temp.make(R); +/* 653 */ orthoNormal.cross(N); +/* 654 */ double r = orthoNormal.length(); +/* */ +/* */ +/* 657 */ double denominator = r * this.vehicle.mass + scalarInertialMoment; +/* 658 */ assert (denominator != 0.0D); +/* 659 */ double myMass = this.vehicle.mass * 0.25D; +/* 660 */ double weight = scalarInertialMoment * myMass / +/* 661 */ denominator; +/* 662 */ if (weight < 0.0D) weight = 0.0D; +/* 663 */ if (weight > this.vehicle.mass) { weight = myMass; +/* */ } +/* */ +/* 666 */ assert (this.vehicle.shockLength != 0.0F); +/* 667 */ double k = weight * 32.099998474121094D / this.vehicle.shockLength; +/* 668 */ double springLength = worldPos.z - (groundZ + +/* 669 */ this.vehicle.shockLength); +/* */ +/* 671 */ if (springLength < -this.vehicle.shockLength) +/* 672 */ springLength = -this.vehicle.shockLength; +/* 673 */ if (springLength > this.vehicle.shockLength) { +/* 674 */ springLength = this.vehicle.shockLength; +/* */ } +/* 676 */ double x = springLength; +/* 677 */ double groundForce = -k * x; +/* 678 */ double term = k * weight; +/* 679 */ assert (term >= 0.0D); +/* 680 */ double damp = -Math.sqrt(term) * normalSpeed * +/* 681 */ this.vehicle.shockDampingCoeff; +/* 682 */ groundForce += damp; +/* */ +/* */ +/* 685 */ Point3Temp groundForceVector = Point3Temp.make(No); +/* 686 */ groundForceVector.normalize(); +/* 687 */ groundForceVector.times((float)groundForce); +/* */ +/* */ +/* */ +/* 691 */ tire.force.plus(groundForceVector); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 701 */ Point3Temp VpCarFrame = Point3Temp.make(Vp); +/* 702 */ VpCarFrame.vectorTimes(w2o); +/* */ +/* 704 */ Point3Temp normalVelocity = Point3Temp.make(VpCarFrame); +/* 705 */ normalVelocity.z = 0.0F; +/* */ +/* */ +/* */ +/* */ +/* 710 */ Point3Temp intendedForce = Point3Temp.make(0.0F, 0.0F, 0.0F); +/* */ +/* 712 */ Transform wheelXform = Transform.make(); +/* 713 */ wheelXform.yaw(tire.wheelAngle * +/* 714 */ 229.1831F); +/* */ float mu; +/* */ float mu; +/* 717 */ if (normalVelocity.length() < 0.001F) +/* */ { +/* */ +/* 720 */ mu = 0.0F; +/* */ } else { float mu; +/* 722 */ if (Math.abs(No.x) > 0.4F) +/* */ { +/* */ +/* 725 */ mu = 0.0F; +/* */ } +/* */ else +/* */ { +/* 729 */ normalVelocity.normalize(); +/* */ +/* */ +/* */ +/* 733 */ Point3Temp wheelDirection = Point3Temp.make(0.0F, 1.0F, 0.0F); +/* 734 */ wheelDirection.vectorTimes(wheelXform); +/* */ +/* 736 */ wheelDirection.normalize(); +/* 737 */ float cosSlipAngle = normalVelocity.dot(wheelDirection); +/* */ +/* */ +/* */ +/* 741 */ System.out.println("wheel direction " + +/* 742 */ wheelDirection.x + " " + wheelDirection.y + +/* 743 */ " " + wheelDirection.z); +/* 744 */ System.out.println("normal velocity " + +/* 745 */ normalVelocity.x + " " + normalVelocity.y + +/* 746 */ " " + normalVelocity.z); +/* 747 */ System.out.println("cos of slip angle " + +/* 748 */ cosSlipAngle); +/* */ +/* */ +/* */ +/* */ +/* 753 */ mu = getLateralForceCoef(cosSlipAngle, 0); +/* */ +/* 755 */ float crossZ = normalVelocity.x * wheelDirection.y - +/* 756 */ normalVelocity.y * wheelDirection.x; +/* 757 */ if (crossZ > 0.0F) +/* 758 */ mu *= -1.0F; +/* */ } +/* */ } +/* 761 */ intendedForce.x = (mu * (float)groundForce); +/* */ +/* */ +/* 764 */ intendedForce.y = ((float)tire.driveForce); +/* */ +/* */ +/* */ +/* 768 */ System.out.println("Lateral forces " + intendedForce.x + +/* 769 */ ", " + intendedForce.y); +/* */ +/* */ +/* */ +/* 773 */ float forceMag = intendedForce.length(); +/* 774 */ float maxForce = (float)groundForce * this.vehicle.tireAdhesiveLimit; +/* 775 */ if (forceMag > maxForce) +/* */ { +/* 777 */ intendedForce.normalize(); +/* 778 */ intendedForce.times(maxForce); +/* 779 */ tire.slipping = true; +/* */ } +/* */ else +/* */ { +/* 783 */ tire.slipping = false; +/* */ } +/* */ +/* */ +/* */ +/* 788 */ intendedForce.vectorTimes(wheelXform); +/* */ +/* */ +/* 791 */ tire.force.plus(intendedForce); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 806 */ Point3Temp rollingFriction = Point3Temp.make(0.0F, 0.0F, 0.0F); +/* 807 */ float S = 1.0F; +/* 808 */ float magV = Vp.length(); +/* 809 */ rollingFriction.y = +/* 810 */ ((float)groundForce * 0.001F * (5.7F + 0.036F * magV * 0.6818182F) * S); +/* 811 */ if (this.velocityVectorCarFrame.y > 0.0F) { +/* 812 */ rollingFriction.y *= -1.0F; +/* */ } +/* 814 */ rollingFriction.vectorTimes(wheelXform); +/* */ +/* */ +/* */ +/* 818 */ System.out.println("Rolling friction " + +/* 819 */ rollingFriction.x + " " + rollingFriction.y + +/* 820 */ " " + rollingFriction.z); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 826 */ wheelXform.recycle(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 833 */ Point3Temp rCopy = Point3Temp.make(tire.relativePos); +/* 834 */ rCopy.negate(); +/* 835 */ tire.torque.copy(tire.force); +/* 836 */ tire.torque.cross(rCopy); +/* */ +/* */ +/* */ +/* 840 */ System.out.println("Underground " + springLength + +/* 841 */ " damping " + damp); +/* 842 */ System.out.println("Force " + tire.force.x + " " + +/* 843 */ tire.force.y + " " + tire.force.z); +/* */ +/* */ +/* 846 */ System.out.println("Torque " + tire.torque.x + " " + +/* 847 */ tire.torque.y + " " + tire.torque.z); +/* 848 */ System.out.println(); } +/* */ +/* */ private float getGearRatio(int gearNumber) { float gearRatio; +/* */ float gearRatio; +/* */ float gearRatio; +/* */ float gearRatio; +/* */ float gearRatio; +/* 855 */ float gearRatio; float gearRatio; switch (gearNumber) +/* */ { +/* */ +/* */ case 0: +/* 859 */ gearRatio = this.vehicle.gearRatio1; +/* 860 */ break; +/* */ +/* */ +/* */ +/* */ case 1: +/* 865 */ gearRatio = this.vehicle.gearRatio1; +/* 866 */ break; +/* */ +/* */ +/* */ +/* */ case 2: +/* 871 */ gearRatio = this.vehicle.gearRatio2; +/* 872 */ break; +/* */ +/* */ +/* */ +/* */ case 3: +/* 877 */ gearRatio = this.vehicle.gearRatio3; +/* 878 */ break; +/* */ +/* */ +/* */ +/* */ case 4: +/* 883 */ gearRatio = this.vehicle.gearRatio4; +/* 884 */ break; +/* */ +/* */ +/* */ +/* */ case 5: +/* 889 */ gearRatio = this.vehicle.gearRatio5; +/* 890 */ break; +/* */ +/* */ +/* */ +/* */ default: +/* 895 */ System.out.println("Illegal gear " + this.currentGear); +/* 896 */ gearRatio = 1.0F; +/* */ } +/* */ +/* */ +/* */ +/* 901 */ return gearRatio; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected float getLateralForceCoef(float cosSlipAngle, int terrainType) +/* */ { +/* 911 */ if (cosSlipAngle > 1.0D) cosSlipAngle = 1.0F; +/* 912 */ if (cosSlipAngle < -1.0D) cosSlipAngle = -1.0F; +/* 913 */ float index = (float)Math.ceil(Math.abs(cosSlipAngle) * +/* 914 */ 1000.0F / 1.0F); +/* 915 */ return muTable[terrainType][((int)index)]; +/* */ } +/* */ +/* 918 */ static boolean lateralForceTableInited = false; +/* */ +/* */ +/* */ static final int torqueIncrements = 500; +/* */ +/* */ +/* */ static final float maxRPM = 7000.0F; +/* */ +/* */ +/* */ static final float minRPM = 1500.0F; +/* */ +/* */ +/* */ static final float rpmInc = 500.0F; +/* */ +/* */ static final int numRPMs = 12; +/* */ +/* */ static float[] torqueTable; +/* */ +/* */ +/* */ protected void initLateralForceTable() +/* */ { +/* 939 */ if (lateralForceTableInited) return; +/* 940 */ lateralForceTableInited = true; +/* */ +/* 942 */ muTable = new float[2]['ϩ']; +/* */ +/* 944 */ for (int type = 0; type < 2; type++) +/* */ { +/* 946 */ for (int i = 0; i <= 1000; i++) +/* */ { +/* 948 */ float degrees = (float)Math.acos(i / +/* 949 */ 1000.0F); +/* 950 */ degrees = degrees * 360.0F / 6.2831855F; +/* */ +/* 952 */ switch (type) +/* */ { +/* */ +/* */ +/* */ +/* */ case 0: +/* 958 */ if (degrees > 45.0F) degrees = 45.0F; +/* 959 */ muTable[type][i] = +/* */ +/* */ +/* */ +/* */ +/* */ +/* 965 */ (-0.084496F + 0.1241739F * degrees - 0.003676377F * (float)Math.pow(degrees, 2.0D) - 5.5137E-6F * (float)Math.pow(degrees, 3.0D) + 6.461E-7F * (float)Math.pow( +/* 966 */ degrees, 4.0D)); +/* 967 */ break; +/* */ +/* */ +/* */ +/* */ case 1: +/* 972 */ muTable[type][i] = +/* */ +/* 974 */ (0.055731F + 0.069871F * degrees - 0.002175398F * degrees * degrees); +/* */ } +/* */ +/* */ +/* */ +/* 979 */ if (muTable[type][i] < 0.0F) { +/* 980 */ muTable[type][i] = 0.0F; +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 993 */ static boolean torqueTableInited = false; +/* */ +/* */ float getTorque(float rpm) +/* */ { +/* 997 */ if (rpm > 7000.0F) +/* 998 */ rpm = 7000.0F; +/* 999 */ if (rpm < 1500.0F) { +/* 1000 */ rpm = 1500.0F; +/* */ } +/* 1002 */ int index = (int)(rpm / 7000.0F); +/* 1003 */ return torqueTable[index]; +/* */ } +/* */ +/* 1006 */ static float[] rawTorqueData = { 80.0F, 82.0F, 91.0F, 92.0F, 89.0F, 90.0F, 98.0F, 93.0F, +/* 1007 */ 94.0F, 78.0F, 83.0F, 75.0F }; +/* */ +/* */ static final float torqueMax = 98.0F; +/* */ +/* */ void initTorqueTable() +/* */ { +/* 1013 */ if (torqueTableInited) return; +/* 1014 */ torqueTableInited = true; +/* */ +/* 1016 */ torqueTable = new float['ǵ']; +/* */ +/* 1018 */ for (int i = 0; i <= 500; i++) +/* */ { +/* 1020 */ float rpm = i / 500.0F * 7000.0F; +/* 1021 */ if (rpm < 1500.0F) rpm = 1500.0F; +/* 1022 */ int closest = 0; +/* 1023 */ for (int j = 0; j < 12; j++) +/* */ { +/* 1025 */ float thisRpm = j * 500.0F + 1500.0F; +/* 1026 */ if (thisRpm >= rpm) +/* */ { +/* 1028 */ closest = j; +/* 1029 */ break; +/* */ } +/* */ } +/* */ +/* 1033 */ if (closest == 0) +/* */ { +/* 1035 */ torqueTable[i] = (rawTorqueData[0] / 98.0F); +/* */ +/* */ } +/* */ else +/* */ { +/* 1040 */ Point2 low = new Point2(); +/* 1041 */ Point2 high = new Point2(); +/* 1042 */ Point2 result = new Point2(); +/* 1043 */ low.x = ((closest - 1) * 500.0F + 1500.0F); +/* 1044 */ low.y = rawTorqueData[(closest - 1)]; +/* 1045 */ low.x += 500.0F; +/* 1046 */ high.y = rawTorqueData[closest]; +/* 1047 */ float alpha = (rpm - low.x) / 500.0F; +/* */ +/* */ +/* */ +/* 1051 */ result.x = (low.x * alpha + high.x * (1.0F - alpha)); +/* 1052 */ result.y = (low.y * alpha + high.y * (1.0F - alpha)); +/* */ +/* 1054 */ torqueTable[i] = (result.y / 98.0F); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ private void initRPMTable() +/* */ { +/* 1062 */ this.minRPMs = new float[6]; +/* */ +/* 1064 */ float[] maxVel = new float[5]; +/* 1065 */ for (int x = 0; x < 5; x++) +/* */ { +/* 1067 */ maxVel[x] = +/* */ +/* 1069 */ (this.vehicle.rpmTorquePeak * 3.1415927F * this.vehicle.wheelDiameter / (60.0F * this.vehicle.rearEndRatio * getGearRatio(x))); +/* */ } +/* */ +/* 1072 */ this.minRPMs[0] = 0.0F; +/* 1073 */ for (int x = 1; x <= 5; x++) +/* */ { +/* 1075 */ this.minRPMs[x] = +/* */ +/* 1077 */ (60.0F * maxVel[(x - 1)] * this.vehicle.rearEndRatio * getGearRatio(x) / (3.1415927F * this.vehicle.wheelDiameter)); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VehicleDriver.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VehicleShape.java b/NET/worlds/scape/VehicleShape.java new file mode 100644 index 0000000..6337ace --- /dev/null +++ b/NET/worlds/scape/VehicleShape.java @@ -0,0 +1,660 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DialogReceiver; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VehicleShape +/* */ extends PosableShape +/* */ implements MouseDownHandler, DialogReceiver +/* */ { +/* */ static final int fourWheelDrive = 0; +/* */ static final int frontWheelDrive = 1; +/* */ static final int rearWheelDrive = 2; +/* 26 */ private String promptString = "Take her for a spin?"; +/* 27 */ public float rearEndRatio = 3.07F; +/* 28 */ public float frontalArea = 42.5F; +/* 29 */ public float wheelDiameter = 2.167F; +/* 30 */ public float coeffKineticFriction = 0.05F; +/* 31 */ public float coeffStaticFriction = 0.2F; +/* 32 */ public float mass = 100.0F; +/* 33 */ public float gearRatio1 = 2.88F; +/* 34 */ public float gearRatio2 = 1.91F; +/* 35 */ public float gearRatio3 = 1.33F; +/* 36 */ public float gearRatio4 = 1.0F; +/* 37 */ public float gearRatio5 = 0.7F; +/* 38 */ public float maxEngineTorque = 300.0F; +/* 39 */ public float tireAdhesiveLimit = 1.1F; +/* 40 */ public float shockDampingCoeff = 3.0F; +/* 41 */ public float shockLength = 0.15F; +/* 42 */ public float rpmTorquePeak = 4200.0F; +/* 43 */ public float idleRPM = 1000.0F; +/* 44 */ public boolean stickShift = false; +/* 45 */ public float initialGas = -1.0F; +/* 46 */ public float adjustCogX = 0.0F; +/* 47 */ public float adjustCogY = 0.0F; +/* 48 */ public float adjustCogZ = 0.0F; +/* 49 */ public int driveType = 2; +/* 50 */ public boolean fixedCamera = true; +/* 51 */ public float camX = 0.0F; +/* 52 */ public float camY = -80.0F; +/* 53 */ public float camZ = -120.0F; +/* 54 */ public float camRoll = -10.0F; +/* 55 */ public float camPitch = 0.0F; +/* 56 */ public float camYaw = 0.0F; +/* 57 */ public float camAimX = 15.0F; +/* 58 */ public float camAimY = 0.0F; +/* 59 */ public float camAimZ = 10.0F; +/* 60 */ public float eyeHeight = 150.0F; +/* */ +/* */ +/* 63 */ public String lastURL = ""; +/* */ +/* */ public Point3 centerOfGravity; +/* */ public Point3 momentsOfInertia; +/* */ public Point3[] tirePositions; +/* 68 */ private boolean avatarSwitchPending = false; +/* */ +/* */ +/* */ +/* */ VehicleShape() {} +/* */ +/* */ +/* */ VehicleShape(URL url) +/* */ { +/* 77 */ super(url); +/* */ } +/* */ +/* */ +/* 81 */ private static String[] vehicleShapeNames = { +/* 82 */ "dash" }; +/* */ +/* */ +/* */ public static boolean isVehicle(URL url) +/* */ { +/* 87 */ if (IniFile.gamma().getIniInt("enableVehicleShapes", 0) == 0) { +/* 88 */ return false; +/* */ } +/* 90 */ String s = url.toString(); +/* 91 */ for (int i = 0; i < vehicleShapeNames.length; i++) +/* */ { +/* 93 */ if (s.indexOf(vehicleShapeNames[i]) != -1) +/* 94 */ return true; +/* */ } +/* 96 */ return false; +/* */ } +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent event) +/* */ { +/* 102 */ if ((event.key & 0x1) == '\001') +/* */ { +/* 104 */ new OkCancelDialog(Console.getFrame(), this, +/* 105 */ "Change Avatar", "No", "Yes", this.promptString, +/* 106 */ true); +/* */ } +/* 108 */ return true; +/* */ } +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) +/* */ { +/* 113 */ if ((who instanceof OkCancelDialog)) +/* */ { +/* 115 */ if (confirmed) +/* */ { +/* */ +/* */ +/* */ +/* 120 */ this.avatarSwitchPending = true; +/* 121 */ boolean oldVIP = Console.getActive().getVIP(); +/* 122 */ Console.getActive().setVIP(true); +/* 123 */ Console.getActive().setAvatar(this.url); +/* 124 */ Console.getActive().setVIP(oldVIP); +/* */ } } } +/* */ +/* */ protected native void nativeAnalyzeShape(int paramInt, float paramFloat); +/* */ +/* */ protected native float nativeGetTirePosX(int paramInt); +/* */ +/* */ protected native float nativeGetTirePosY(int paramInt); +/* */ +/* */ protected native float nativeGetTirePosZ(int paramInt); +/* */ +/* */ protected native float nativeGetCogX(); +/* */ +/* */ protected native float nativeGetCogY(); +/* */ +/* */ protected native float nativeGetCogZ(); +/* */ +/* */ protected native float nativeGetMoiX(); +/* */ +/* */ protected native float nativeGetMoiY(); +/* */ +/* */ protected native float nativeGetMoiZ(); +/* */ +/* 147 */ public void prerender(Camera cam) { if ((!this.lastURL.equals(this.url.toString())) || (this.avatarSwitchPending)) +/* */ { +/* 149 */ this.lastURL = new String(this.url.toString()); +/* */ +/* 151 */ System.out.println("Analyze shape " + this.lastURL); +/* */ +/* 153 */ nativeAnalyzeShape(this.clumpID, this.mass); +/* 154 */ this.tirePositions = new Point3[4]; +/* 155 */ for (int i = 0; i < 4; i++) +/* */ { +/* 157 */ this.tirePositions[i] = new Point3(nativeGetTirePosX(i), +/* 158 */ nativeGetTirePosY(i), nativeGetTirePosZ(i)); +/* */ } +/* */ +/* 161 */ this.centerOfGravity = new Point3(nativeGetCogX(), nativeGetCogY(), +/* 162 */ nativeGetCogZ()); +/* 163 */ this.centerOfGravity.x += this.adjustCogX; +/* 164 */ this.centerOfGravity.y += this.adjustCogY; +/* 165 */ this.centerOfGravity.z += this.adjustCogZ; +/* */ +/* 167 */ this.momentsOfInertia = new Point3(nativeGetMoiX(), +/* 168 */ nativeGetMoiY(), nativeGetMoiZ()); +/* */ +/* */ +/* */ +/* 172 */ if (this.avatarSwitchPending) +/* */ { +/* 174 */ Pilot p = Console.getActive().getPilot(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 195 */ if ((p instanceof HoloPilot)) +/* */ { +/* 197 */ HoloPilot hp = (HoloPilot)p; +/* 198 */ Drone d = hp.getInternalDrone(); +/* 199 */ if (d != null) +/* */ { +/* 201 */ if ((d instanceof PosableDrone)) +/* */ { +/* 203 */ PosableDrone pd = (PosableDrone)d; +/* 204 */ PosableShape ps = pd.getInternalPosableShape(); +/* 205 */ if (ps != null) +/* */ { +/* 207 */ if ((ps instanceof VehicleShape)) +/* */ { +/* 209 */ VehicleShape vs = (VehicleShape)ps; +/* 210 */ vs.fixedCamera = this.fixedCamera; +/* 211 */ vs.camX = this.camX; +/* 212 */ vs.camY = this.camY; +/* 213 */ vs.camZ = this.camZ; +/* 214 */ vs.camRoll = this.camRoll; +/* 215 */ vs.camPitch = this.camPitch; +/* 216 */ vs.camYaw = this.camYaw; +/* 217 */ vs.camAimX = this.camAimX; +/* 218 */ vs.camAimY = this.camAimY; +/* 219 */ vs.camAimZ = this.camAimZ; +/* 220 */ vs.eyeHeight = this.eyeHeight; +/* 221 */ hp.setOutsideCameraMode( +/* 222 */ 99, +/* 223 */ 4); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 231 */ this.avatarSwitchPending = false; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 239 */ private static Object classCookie = new Object(); +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 244 */ Object ret = null; +/* 245 */ switch (index - offset) { +/* */ case 0: +/* 247 */ if (mode == 0) { +/* 248 */ ret = StringPropertyEditor.make( +/* 249 */ new Property(this, index, "Prompt String")); +/* 250 */ } else if (mode == 1) { +/* 251 */ ret = new String(this.promptString); +/* 252 */ } else if (mode == 2) { +/* 253 */ this.promptString = new String((String)value); +/* */ } +/* 255 */ break; +/* */ case 1: +/* 257 */ if (mode == 0) { +/* 258 */ ret = FloatPropertyEditor.make( +/* 259 */ new Property(this, index, "Rear End Ratio")); +/* 260 */ } else if (mode == 1) { +/* 261 */ ret = new Float(this.rearEndRatio); +/* 262 */ } else if (mode == 2) +/* 263 */ this.rearEndRatio = ((Float)value).floatValue(); +/* 264 */ break; +/* */ case 2: +/* 266 */ if (mode == 0) { +/* 267 */ ret = FloatPropertyEditor.make( +/* 268 */ new Property(this, index, "Frontal Area (sq.ft.)")); +/* 269 */ } else if (mode == 1) { +/* 270 */ ret = new Float(this.frontalArea); +/* 271 */ } else if (mode == 2) +/* 272 */ this.frontalArea = ((Float)value).floatValue(); +/* 273 */ break; +/* */ case 3: +/* 275 */ if (mode == 0) { +/* 276 */ ret = FloatPropertyEditor.make( +/* 277 */ new Property(this, index, "Wheel Diameter (ft.)")); +/* 278 */ } else if (mode == 1) { +/* 279 */ ret = new Float(this.wheelDiameter); +/* 280 */ } else if (mode == 2) +/* 281 */ this.wheelDiameter = ((Float)value).floatValue(); +/* 282 */ break; +/* */ case 4: +/* 284 */ if (mode == 0) { +/* 285 */ ret = FloatPropertyEditor.make( +/* 286 */ new Property(this, index, +/* 287 */ "Coefficient of Kinetic Friction")); +/* 288 */ } else if (mode == 1) { +/* 289 */ ret = new Float(this.coeffKineticFriction); +/* 290 */ } else if (mode == 2) +/* 291 */ this.coeffKineticFriction = ((Float)value).floatValue(); +/* 292 */ break; +/* */ case 5: +/* 294 */ if (mode == 0) { +/* 295 */ ret = FloatPropertyEditor.make( +/* 296 */ new Property(this, index, +/* 297 */ "Coefficient of Static Friction")); +/* 298 */ } else if (mode == 1) { +/* 299 */ ret = new Float(this.coeffStaticFriction); +/* 300 */ } else if (mode == 2) +/* 301 */ this.coeffStaticFriction = ((Float)value).floatValue(); +/* 302 */ break; +/* */ case 6: +/* 304 */ if (mode == 0) { +/* 305 */ ret = FloatPropertyEditor.make( +/* 306 */ new Property(this, index, "Mass (slugs)")); +/* 307 */ } else if (mode == 1) { +/* 308 */ ret = new Float(this.mass); +/* 309 */ } else if (mode == 2) +/* 310 */ this.mass = ((Float)value).floatValue(); +/* 311 */ break; +/* */ case 7: +/* 313 */ if (mode == 0) { +/* 314 */ ret = FloatPropertyEditor.make( +/* 315 */ new Property(this, index, "1st Gear Ratio")); +/* 316 */ } else if (mode == 1) { +/* 317 */ ret = new Float(this.gearRatio1); +/* 318 */ } else if (mode == 2) +/* 319 */ this.gearRatio1 = ((Float)value).floatValue(); +/* 320 */ break; +/* */ case 8: +/* 322 */ if (mode == 0) { +/* 323 */ ret = FloatPropertyEditor.make( +/* 324 */ new Property(this, index, "2nd Gear Ratio")); +/* 325 */ } else if (mode == 1) { +/* 326 */ ret = new Float(this.gearRatio2); +/* 327 */ } else if (mode == 2) +/* 328 */ this.gearRatio2 = ((Float)value).floatValue(); +/* 329 */ break; +/* */ case 9: +/* 331 */ if (mode == 0) { +/* 332 */ ret = FloatPropertyEditor.make( +/* 333 */ new Property(this, index, "3rd Gear Ratio")); +/* 334 */ } else if (mode == 1) { +/* 335 */ ret = new Float(this.gearRatio3); +/* 336 */ } else if (mode == 2) +/* 337 */ this.gearRatio3 = ((Float)value).floatValue(); +/* 338 */ break; +/* */ case 10: +/* 340 */ if (mode == 0) { +/* 341 */ ret = FloatPropertyEditor.make( +/* 342 */ new Property(this, index, "4th Gear Ratio")); +/* 343 */ } else if (mode == 1) { +/* 344 */ ret = new Float(this.gearRatio4); +/* 345 */ } else if (mode == 2) +/* 346 */ this.gearRatio4 = ((Float)value).floatValue(); +/* 347 */ break; +/* */ case 11: +/* 349 */ if (mode == 0) { +/* 350 */ ret = FloatPropertyEditor.make( +/* 351 */ new Property(this, index, "5th Gear Ratio")); +/* 352 */ } else if (mode == 1) { +/* 353 */ ret = new Float(this.gearRatio5); +/* 354 */ } else if (mode == 2) +/* 355 */ this.gearRatio5 = ((Float)value).floatValue(); +/* 356 */ break; +/* */ case 12: +/* 358 */ if (mode == 0) { +/* 359 */ ret = FloatPropertyEditor.make( +/* 360 */ new Property(this, index, +/* 361 */ "Max. Engine Torque (ft-lbs)")); +/* 362 */ } else if (mode == 1) { +/* 363 */ ret = new Float(this.maxEngineTorque); +/* 364 */ } else if (mode == 2) +/* 365 */ this.maxEngineTorque = ((Float)value).floatValue(); +/* 366 */ break; +/* */ case 13: +/* 368 */ if (mode == 0) { +/* 369 */ ret = FloatPropertyEditor.make( +/* 370 */ new Property(this, index, "Tire Adhesive Limit")); +/* 371 */ } else if (mode == 1) { +/* 372 */ ret = new Float(this.tireAdhesiveLimit); +/* 373 */ } else if (mode == 2) +/* 374 */ this.tireAdhesiveLimit = ((Float)value).floatValue(); +/* 375 */ break; +/* */ case 14: +/* 377 */ if (mode == 0) { +/* 378 */ ret = FloatPropertyEditor.make( +/* 379 */ new Property(this, index, +/* 380 */ "Shocks Damping Coefficient")); +/* 381 */ } else if (mode == 1) { +/* 382 */ ret = new Float(this.shockDampingCoeff); +/* 383 */ } else if (mode == 2) +/* 384 */ this.shockDampingCoeff = ((Float)value).floatValue(); +/* 385 */ break; +/* */ case 15: +/* 387 */ if (mode == 0) { +/* 388 */ ret = FloatPropertyEditor.make( +/* 389 */ new Property(this, index, "Shock Length (ft)")); +/* 390 */ } else if (mode == 1) { +/* 391 */ ret = new Float(this.shockLength); +/* 392 */ } else if (mode == 2) +/* 393 */ this.shockLength = ((Float)value).floatValue(); +/* 394 */ break; +/* */ case 16: +/* 396 */ if (mode == 0) { +/* 397 */ ret = FloatPropertyEditor.make( +/* 398 */ new Property(this, index, "Torque Peak (RPM)")); +/* 399 */ } else if (mode == 1) { +/* 400 */ ret = new Float(this.rpmTorquePeak); +/* 401 */ } else if (mode == 2) +/* 402 */ this.rpmTorquePeak = ((Float)value).floatValue(); +/* 403 */ break; +/* */ case 17: +/* 405 */ if (mode == 0) { +/* 406 */ ret = FloatPropertyEditor.make( +/* 407 */ new Property(this, index, "Idle RPM")); +/* 408 */ } else if (mode == 1) { +/* 409 */ ret = new Float(this.idleRPM); +/* 410 */ } else if (mode == 2) +/* 411 */ this.idleRPM = ((Float)value).floatValue(); +/* 412 */ break; +/* */ case 18: +/* 414 */ if (mode == 0) { +/* 415 */ ret = BooleanPropertyEditor.make( +/* 416 */ new Property(this, index, "Transmission Type"), +/* 417 */ "Automatic", "Manual"); +/* 418 */ } else if (mode == 1) { +/* 419 */ ret = new Boolean(this.stickShift); +/* 420 */ } else if (mode == 2) +/* 421 */ this.stickShift = ((Boolean)value).booleanValue(); +/* 422 */ break; +/* */ case 19: +/* 424 */ if (mode == 0) { +/* 425 */ ret = FloatPropertyEditor.make( +/* 426 */ new Property(this, index, "Gas (Gall., -1 for infinite)")); +/* 427 */ } else if (mode == 1) { +/* 428 */ ret = new Float(this.initialGas); +/* 429 */ } else if (mode == 2) +/* 430 */ this.initialGas = ((Float)value).floatValue(); +/* 431 */ break; +/* */ case 20: +/* 433 */ if (mode == 0) { +/* 434 */ ret = FloatPropertyEditor.make( +/* 435 */ new Property(this, index, "Center of gravity X adjust")); +/* 436 */ } else if (mode == 1) { +/* 437 */ ret = new Float(this.adjustCogX); +/* 438 */ } else if (mode == 2) +/* 439 */ this.adjustCogX = ((Float)value).floatValue(); +/* 440 */ break; +/* */ case 21: +/* 442 */ if (mode == 0) { +/* 443 */ ret = FloatPropertyEditor.make( +/* 444 */ new Property(this, index, "Center of gravity Y adjust")); +/* 445 */ } else if (mode == 1) { +/* 446 */ ret = new Float(this.adjustCogY); +/* 447 */ } else if (mode == 2) +/* 448 */ this.adjustCogY = ((Float)value).floatValue(); +/* 449 */ break; +/* */ case 22: +/* 451 */ if (mode == 0) { +/* 452 */ ret = FloatPropertyEditor.make( +/* 453 */ new Property(this, index, "Center of gravity Z adjust")); +/* 454 */ } else if (mode == 1) { +/* 455 */ ret = new Float(this.adjustCogZ); +/* 456 */ } else if (mode == 2) +/* 457 */ this.adjustCogZ = ((Float)value).floatValue(); +/* 458 */ break; +/* */ case 23: +/* 460 */ if (mode == 0) { +/* 461 */ ret = BooleanPropertyEditor.make( +/* 462 */ new Property(this, index, "Use fixed camera"), +/* 463 */ "No", "Yes"); +/* 464 */ } else if (mode == 1) { +/* 465 */ ret = new Boolean(this.fixedCamera); +/* 466 */ } else if (mode == 2) +/* 467 */ this.fixedCamera = ((Boolean)value).booleanValue(); +/* 468 */ break; +/* */ case 24: +/* 470 */ if (mode == 0) { +/* 471 */ ret = FloatPropertyEditor.make( +/* 472 */ new Property(this, index, "Camera X offset")); +/* 473 */ } else if (mode == 1) { +/* 474 */ ret = new Float(this.camX); +/* 475 */ } else if (mode == 2) +/* 476 */ this.camX = ((Float)value).floatValue(); +/* 477 */ break; +/* */ case 25: +/* 479 */ if (mode == 0) { +/* 480 */ ret = FloatPropertyEditor.make( +/* 481 */ new Property(this, index, "Camera Y offset")); +/* 482 */ } else if (mode == 1) { +/* 483 */ ret = new Float(this.camY); +/* 484 */ } else if (mode == 2) +/* 485 */ this.camY = ((Float)value).floatValue(); +/* 486 */ break; +/* */ case 26: +/* 488 */ if (mode == 0) { +/* 489 */ ret = FloatPropertyEditor.make( +/* 490 */ new Property(this, index, "Camera Z offset")); +/* 491 */ } else if (mode == 1) { +/* 492 */ ret = new Float(this.camZ); +/* 493 */ } else if (mode == 2) +/* 494 */ this.camZ = ((Float)value).floatValue(); +/* 495 */ break; +/* */ case 27: +/* 497 */ if (mode == 0) { +/* 498 */ ret = FloatPropertyEditor.make( +/* 499 */ new Property(this, index, "Camera Roll")); +/* 500 */ } else if (mode == 1) { +/* 501 */ ret = new Float(this.camRoll); +/* 502 */ } else if (mode == 2) +/* 503 */ this.camRoll = ((Float)value).floatValue(); +/* 504 */ break; +/* */ case 28: +/* 506 */ if (mode == 0) { +/* 507 */ ret = FloatPropertyEditor.make( +/* 508 */ new Property(this, index, "Camera Pitch")); +/* 509 */ } else if (mode == 1) { +/* 510 */ ret = new Float(this.camPitch); +/* 511 */ } else if (mode == 2) +/* 512 */ this.camPitch = ((Float)value).floatValue(); +/* 513 */ break; +/* */ case 29: +/* 515 */ if (mode == 0) { +/* 516 */ ret = FloatPropertyEditor.make( +/* 517 */ new Property(this, index, "Camera Yaw")); +/* 518 */ } else if (mode == 1) { +/* 519 */ ret = new Float(this.camYaw); +/* 520 */ } else if (mode == 2) +/* 521 */ this.camYaw = ((Float)value).floatValue(); +/* 522 */ break; +/* */ case 30: +/* 524 */ if (mode == 0) { +/* 525 */ ret = FloatPropertyEditor.make( +/* 526 */ new Property(this, index, "Camera Aim X")); +/* 527 */ } else if (mode == 1) { +/* 528 */ ret = new Float(this.camAimX); +/* 529 */ } else if (mode == 2) +/* 530 */ this.camAimX = ((Float)value).floatValue(); +/* 531 */ break; +/* */ case 31: +/* 533 */ if (mode == 0) { +/* 534 */ ret = FloatPropertyEditor.make( +/* 535 */ new Property(this, index, "Camera Aim Y")); +/* 536 */ } else if (mode == 1) { +/* 537 */ ret = new Float(this.camAimY); +/* 538 */ } else if (mode == 2) +/* 539 */ this.camAimY = ((Float)value).floatValue(); +/* 540 */ break; +/* */ case 32: +/* 542 */ if (mode == 0) { +/* 543 */ ret = FloatPropertyEditor.make( +/* 544 */ new Property(this, index, "Camera Aim Z")); +/* 545 */ } else if (mode == 1) { +/* 546 */ ret = new Float(this.camAimZ); +/* 547 */ } else if (mode == 2) +/* 548 */ this.camAimZ = ((Float)value).floatValue(); +/* 549 */ break; +/* */ case 33: +/* 551 */ if (mode == 0) { +/* 552 */ ret = FloatPropertyEditor.make( +/* 553 */ new Property(this, index, "Camera Eye Height")); +/* 554 */ } else if (mode == 1) { +/* 555 */ ret = new Float(this.eyeHeight); +/* 556 */ } else if (mode == 2) +/* 557 */ this.eyeHeight = ((Float)value).floatValue(); +/* 558 */ break; +/* */ +/* */ default: +/* 561 */ ret = super.properties(index, offset + 34, mode, value); +/* */ } +/* 563 */ return ret; +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 568 */ s.saveVersion(2, classCookie); +/* 569 */ s.saveBoolean(this.fixedCamera); +/* 570 */ s.saveFloat(this.camX); +/* 571 */ s.saveFloat(this.camY); +/* 572 */ s.saveFloat(this.camZ); +/* 573 */ s.saveFloat(this.camRoll); +/* 574 */ s.saveFloat(this.camPitch); +/* 575 */ s.saveFloat(this.camYaw); +/* 576 */ s.saveFloat(this.camAimX); +/* 577 */ s.saveFloat(this.camAimY); +/* 578 */ s.saveFloat(this.camAimZ); +/* 579 */ s.saveFloat(this.eyeHeight); +/* */ +/* 581 */ s.saveString(this.promptString); +/* 582 */ s.saveFloat(this.rearEndRatio); +/* 583 */ s.saveFloat(this.frontalArea); +/* 584 */ s.saveFloat(this.wheelDiameter); +/* 585 */ s.saveFloat(this.coeffKineticFriction); +/* 586 */ s.saveFloat(this.coeffStaticFriction); +/* 587 */ s.saveFloat(this.mass); +/* 588 */ s.saveFloat(this.gearRatio1); +/* 589 */ s.saveFloat(this.gearRatio2); +/* 590 */ s.saveFloat(this.gearRatio3); +/* 591 */ s.saveFloat(this.gearRatio4); +/* 592 */ s.saveFloat(this.gearRatio5); +/* 593 */ s.saveFloat(this.maxEngineTorque); +/* 594 */ s.saveFloat(this.tireAdhesiveLimit); +/* 595 */ s.saveFloat(this.shockDampingCoeff); +/* 596 */ s.saveFloat(this.shockLength); +/* 597 */ s.saveFloat(this.rpmTorquePeak); +/* 598 */ s.saveFloat(this.idleRPM); +/* 599 */ s.saveBoolean(this.stickShift); +/* 600 */ s.saveFloat(this.initialGas); +/* 601 */ s.saveFloat(this.adjustCogX); +/* 602 */ s.saveFloat(this.adjustCogY); +/* 603 */ s.saveFloat(this.adjustCogZ); +/* 604 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 609 */ switch (r.restoreVersion(classCookie)) { +/* */ case 2: +/* 611 */ this.fixedCamera = r.restoreBoolean(); +/* 612 */ this.camX = r.restoreFloat(); +/* 613 */ this.camY = r.restoreFloat(); +/* 614 */ this.camZ = r.restoreFloat(); +/* 615 */ this.camRoll = r.restoreFloat(); +/* 616 */ this.camPitch = r.restoreFloat(); +/* 617 */ this.camYaw = r.restoreFloat(); +/* 618 */ this.camAimX = r.restoreFloat(); +/* 619 */ this.camAimY = r.restoreFloat(); +/* 620 */ this.camAimZ = r.restoreFloat(); +/* 621 */ this.eyeHeight = r.restoreFloat(); +/* */ case 1: +/* 623 */ this.promptString = r.restoreString(); +/* 624 */ this.rearEndRatio = r.restoreFloat(); +/* 625 */ this.frontalArea = r.restoreFloat(); +/* 626 */ this.wheelDiameter = r.restoreFloat(); +/* 627 */ this.coeffKineticFriction = r.restoreFloat(); +/* 628 */ this.coeffStaticFriction = r.restoreFloat(); +/* 629 */ this.mass = r.restoreFloat(); +/* 630 */ this.gearRatio1 = r.restoreFloat(); +/* 631 */ this.gearRatio2 = r.restoreFloat(); +/* 632 */ this.gearRatio3 = r.restoreFloat(); +/* 633 */ this.gearRatio4 = r.restoreFloat(); +/* 634 */ this.gearRatio5 = r.restoreFloat(); +/* 635 */ this.maxEngineTorque = r.restoreFloat(); +/* 636 */ this.tireAdhesiveLimit = r.restoreFloat(); +/* 637 */ this.shockDampingCoeff = r.restoreFloat(); +/* 638 */ this.shockLength = r.restoreFloat(); +/* 639 */ this.rpmTorquePeak = r.restoreFloat(); +/* 640 */ this.idleRPM = r.restoreFloat(); +/* 641 */ this.stickShift = r.restoreBoolean(); +/* 642 */ this.initialGas = r.restoreFloat(); +/* 643 */ this.adjustCogX = r.restoreFloat(); +/* 644 */ this.adjustCogY = r.restoreFloat(); +/* 645 */ this.adjustCogZ = r.restoreFloat(); +/* */ case 0: +/* 647 */ super.restoreState(r); +/* 648 */ break; +/* */ +/* */ default: +/* 651 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VehicleShape.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VelocityBehavior.java b/NET/worlds/scape/VelocityBehavior.java new file mode 100644 index 0000000..1cecae5 --- /dev/null +++ b/NET/worlds/scape/VelocityBehavior.java @@ -0,0 +1,399 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VelocityBehavior +/* */ extends SwitchableBehavior +/* */ implements FrameHandler, BumpHandler +/* */ { +/* */ private RollingAttribute attr; +/* */ private long lastTime; +/* */ public float linearVel; +/* */ public float linearDamp; +/* */ protected Point3 dir; +/* */ public float angularVel; +/* */ public float angularDamp; +/* */ public Point3 axis; +/* */ +/* */ public VelocityBehavior(Point3Temp linearVectorPerSecond, float linearDampingPerSecond, Point3Temp angularAxis, float angularDegPerSecond, float angularDampingPerSecond) +/* */ { +/* 45 */ this.dir = new Point3(); +/* 46 */ this.linearVel = 0.0F; +/* 47 */ this.linearDamp = linearDampingPerSecond; +/* 48 */ addVelocity(linearVectorPerSecond); +/* */ +/* 50 */ this.axis = new Point3(angularAxis); +/* 51 */ this.axis.normalize(); +/* 52 */ this.angularVel = angularDegPerSecond; +/* 53 */ this.angularDamp = angularDampingPerSecond; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public VelocityBehavior() +/* */ { +/* 62 */ this(Point3Temp.make(0.0F, 0.0F, 0.0F)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public VelocityBehavior(Point3Temp vel) +/* */ { +/* 70 */ this(vel, 0.0F, Point3Temp.make(0.0F, 0.0F, 1.0F), 0.0F, 0.0F); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setDir(Point3Temp d) +/* */ { +/* 78 */ double len = Math.sqrt(d.x * d.x + d.y * d.y + d.z * d.z); +/* */ +/* 80 */ if (len == 0.0D) +/* */ { +/* 82 */ this.dir.x = 0.0F; +/* 83 */ this.dir.y = 0.0F; +/* 84 */ this.dir.z = 0.0F; +/* 85 */ return; +/* */ } +/* */ +/* */ +/* 89 */ this.dir.x = ((float)(d.x / len)); +/* 90 */ this.dir.y = ((float)(d.y / len)); +/* 91 */ this.dir.z = ((float)(d.z / len)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public VelocityBehavior addVelocity(Point3Temp vector) +/* */ { +/* 99 */ this.dir.times(this.linearVel).plus(vector); +/* 100 */ float len = this.dir.length(); +/* 101 */ if (len > 0.0F) +/* 102 */ this.dir.dividedBy(len); +/* 103 */ this.linearVel = len; +/* */ +/* 105 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setNotifyAttribute(RollingAttribute attr) +/* */ { +/* 113 */ this.attr = attr; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 130 */ this.bumplock = false; +/* */ +/* 132 */ WObject o = e.receiver; +/* */ +/* 134 */ float dT = (float)(e.time - this.lastTime) / 1000.0F; +/* */ +/* */ +/* */ +/* 138 */ if (this.lastTime == 0L) +/* */ { +/* 140 */ this.lastTime = e.time; +/* 141 */ return true; +/* */ } +/* */ +/* 144 */ this.lastTime = e.time; +/* */ +/* 146 */ if (this.linearVel != 0.0F) +/* */ { +/* 148 */ Point3Temp dist = Point3Temp.make(this.dir).times(dT * this.linearVel); +/* 149 */ o.moveThrough(dist); +/* */ +/* */ +/* 152 */ if (this.linearDamp != 0.0F) +/* */ { +/* 154 */ this.linearVel = ((float)(this.linearVel * Math.exp(-this.linearDamp * dT))); +/* */ +/* 156 */ if (Math.abs(this.linearVel) < this.linearDamp * 16.0F) { +/* 157 */ this.linearVel = 0.0F; +/* 158 */ if (this.attr != null) { +/* 159 */ this.attr.notifyStopped(); +/* */ } +/* */ } +/* */ } +/* */ } +/* 164 */ if (this.angularVel != 0.0F) +/* */ { +/* 166 */ o.spin(this.axis.x, this.axis.y, this.axis.z, this.angularVel * dT); +/* */ +/* 168 */ if (this.angularDamp != 0.0F) +/* */ { +/* 170 */ this.angularVel = ((float)(this.angularVel * Math.exp(-this.angularDamp * dT))); +/* 171 */ if (Math.abs(this.angularVel) < this.angularDamp * 0.6F) +/* 172 */ this.angularVel = 0.0F; +/* */ } +/* */ } +/* 175 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 180 */ private boolean bumplock = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean handle(BumpEventTemp b) +/* */ { +/* 190 */ if (this.bumplock) { +/* 191 */ return true; +/* */ } +/* 193 */ if (this.attr != null) { +/* 194 */ this.attr.handle(b); +/* */ } else +/* 196 */ processBumpEvent(b); +/* 197 */ this.bumplock = true; +/* 198 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void processBumpEvent(BumpEventTemp b) +/* */ { +/* 208 */ b.postBumpPath.minus(b.postBumpPath); +/* */ +/* */ +/* */ +/* */ +/* 213 */ if ((this.dir.x == 0.0F) && (this.dir.y == 0.0F) && (this.dir.z == 0.0F)) +/* */ { +/* 215 */ return; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 225 */ WObject bumper = b.receiver == b.target ? +/* 226 */ (WObject)b.source : b.target; +/* */ Point3Temp norm; +/* 228 */ Point3Temp norm; if (((bumper instanceof Camera)) || ((bumper instanceof Hologram))) +/* */ { +/* */ +/* 231 */ float orientation = (float)((360.0F - bumper.getYaw() + 90.0F) * +/* 232 */ 3.141592653589793D / 180.0D); +/* 233 */ norm = Point3Temp.make((float)Math.cos(orientation), +/* 234 */ (float)Math.sin(orientation), +/* 235 */ 0.0F); +/* */ } +/* */ else { +/* 238 */ norm = Point3Temp.make(b.bumpNormal); +/* */ } +/* */ +/* 241 */ float lb = (float)Math.sqrt(norm.x * norm.x + +/* 242 */ norm.y * norm.y + +/* 243 */ norm.z * norm.z); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 249 */ norm.x /= lb; +/* 250 */ norm.y /= lb; +/* 251 */ norm.z /= lb; +/* */ +/* 253 */ float projection = Math.abs(this.dir.x * norm.x + +/* 254 */ this.dir.y * norm.y + +/* 255 */ this.dir.z * norm.z); +/* */ +/* */ +/* 258 */ this.dir.x += norm.x * 2.0F * projection; +/* 259 */ this.dir.y += norm.y * 2.0F * projection; +/* 260 */ this.dir.z += norm.z * 2.0F * projection; +/* */ +/* */ +/* */ +/* 264 */ double n = Math.sqrt(this.dir.x * this.dir.x + this.dir.y * this.dir.y + this.dir.z * this.dir.z); +/* 265 */ if (n != 0.0D) +/* */ { +/* 267 */ Point3 tmp380_377 = this.dir;tmp380_377.x = ((float)(tmp380_377.x / n)); Point3 +/* 268 */ tmp396_393 = this.dir;tmp396_393.y = ((float)(tmp396_393.y / n)); Point3 +/* 269 */ tmp412_409 = this.dir;tmp412_409.z = ((float)(tmp412_409.z / n)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 289 */ Object ret = null; +/* 290 */ switch (index - offset) { +/* */ case 0: +/* 292 */ if (mode == 0) { +/* 293 */ ret = FloatPropertyEditor.make( +/* 294 */ new Property(this, index, "Linear Velocity")); +/* 295 */ } else if (mode == 1) { +/* 296 */ ret = new Float(this.linearVel); +/* 297 */ } else if (mode == 2) +/* 298 */ this.linearVel = ((Float)value).floatValue(); +/* 299 */ break; +/* */ case 1: +/* 301 */ if (mode == 0) { +/* 302 */ ret = FloatPropertyEditor.make( +/* 303 */ new Property(this, index, "Linear Damping")); +/* 304 */ } else if (mode == 1) { +/* 305 */ ret = new Float(this.linearDamp); +/* 306 */ } else if (mode == 2) +/* 307 */ this.linearDamp = ((Float)value).floatValue(); +/* 308 */ break; +/* */ case 2: +/* 310 */ if (mode == 0) { +/* 311 */ ret = Point3PropertyEditor.make( +/* 312 */ new Property(this, index, "Direction")); +/* 313 */ } else if (mode == 1) { +/* 314 */ ret = new Point3(this.dir); +/* 315 */ } else if (mode == 2) +/* 316 */ this.dir = ((Point3)value); +/* 317 */ break; +/* */ case 3: +/* 319 */ if (mode == 0) { +/* 320 */ ret = FloatPropertyEditor.make( +/* 321 */ new Property(this, index, "Angular Velocity")); +/* 322 */ } else if (mode == 1) { +/* 323 */ ret = new Float(this.angularVel); +/* 324 */ } else if (mode == 2) +/* 325 */ this.angularVel = ((Float)value).floatValue(); +/* 326 */ break; +/* */ case 4: +/* 328 */ if (mode == 0) { +/* 329 */ ret = FloatPropertyEditor.make( +/* 330 */ new Property(this, index, "Angular Damping")); +/* 331 */ } else if (mode == 1) { +/* 332 */ ret = new Float(this.angularDamp); +/* 333 */ } else if (mode == 2) +/* 334 */ this.angularDamp = ((Float)value).floatValue(); +/* 335 */ break; +/* */ case 5: +/* 337 */ if (mode == 0) { +/* 338 */ ret = Point3PropertyEditor.make( +/* 339 */ new Property(this, index, "Axis")); +/* 340 */ } else if (mode == 1) { +/* 341 */ ret = new Point3(this.axis); +/* 342 */ } else if (mode == 2) +/* 343 */ this.axis = ((Point3)value); +/* 344 */ break; +/* */ default: +/* 346 */ ret = super.properties(index, offset + 6, mode, value); +/* */ } +/* 348 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 353 */ return +/* */ +/* */ +/* */ +/* */ +/* 358 */ super.toString() + "[lin. velocity " + this.linearVel + ", lin. damp " + this.linearDamp + ", direction " + this.dir + ", ang. vel " + this.angularVel + ", ang. damp " + this.angularDamp + ", axis " + this.axis + "]"; +/* */ } +/* */ +/* 361 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 365 */ s.saveVersion(0, classCookie); +/* 366 */ super.saveState(s); +/* */ +/* 368 */ s.saveFloat(this.linearVel); +/* 369 */ s.saveFloat(this.linearDamp); +/* 370 */ s.save(this.dir); +/* 371 */ s.saveFloat(this.angularVel); +/* 372 */ s.saveFloat(this.angularDamp); +/* 373 */ s.save(this.axis); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 378 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 380 */ super.restoreState(r); +/* */ +/* 382 */ this.linearVel = r.restoreFloat(); +/* 383 */ this.linearDamp = r.restoreFloat(); +/* 384 */ this.dir = ((Point3)r.restore()); +/* 385 */ this.angularVel = r.restoreFloat(); +/* 386 */ this.angularDamp = r.restoreFloat(); +/* 387 */ this.axis = ((Point3)r.restore()); +/* 388 */ break; +/* */ default: +/* 390 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VelocityBehavior.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VideoControlAction.java b/NET/worlds/scape/VideoControlAction.java new file mode 100644 index 0000000..c1b14a5 --- /dev/null +++ b/NET/worlds/scape/VideoControlAction.java @@ -0,0 +1,158 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VideoControlAction +/* */ extends Action +/* */ { +/* */ VideoControlAction() +/* */ { +/* 19 */ this.mode = 1; +/* 20 */ this.repeat = 1; +/* 21 */ this.videoTexture = null; +/* 22 */ this.videoWall = null; +/* */ } +/* */ +/* */ +/* 26 */ private final int play = 1; +/* 27 */ private final int stop = 2; +/* */ private int mode; +/* */ private int repeat; +/* */ private VideoTexture videoTexture; +/* */ private VideoWall videoWall; +/* */ +/* 33 */ public Persister trigger(Event e, Persister seqID) { if (!getVideoTexture()) +/* */ { +/* 35 */ System.out.println("ERROR! Tried to attach VideoControlAction to something other than a Rect with a VideoTexture. or a VideoWall object."); +/* */ +/* */ +/* 38 */ return null; +/* */ } +/* */ +/* 41 */ switch (this.mode) +/* */ { +/* */ case 1: +/* 44 */ if (this.videoTexture == null) { +/* 45 */ this.videoWall.getVideoSurface().play(this.repeat); +/* */ } else +/* 47 */ this.videoTexture.getDirectShow().nPlay(this.repeat); +/* 48 */ break; +/* */ +/* */ case 2: +/* 51 */ if (this.videoTexture == null) { +/* 52 */ this.videoWall.getVideoSurface().stop(); +/* */ } else { +/* 54 */ this.videoTexture.getDirectShow().nStop(); +/* */ } +/* */ break; +/* */ } +/* 58 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ private boolean getVideoTexture() +/* */ { +/* 65 */ if (this.videoTexture != null) { +/* 66 */ return true; +/* */ } +/* */ +/* */ +/* 70 */ Object owner = getOwner(); +/* 71 */ if ((owner == null) || (!(owner instanceof Rect))) { +/* 72 */ return false; +/* */ } +/* 74 */ Rect r = (Rect)owner; +/* 75 */ this.videoTexture = r.getVideoAttribute(); +/* */ +/* 77 */ if (this.videoTexture == null) +/* */ { +/* 79 */ if ((owner instanceof VideoWall)) +/* */ { +/* 81 */ this.videoWall = ((VideoWall)owner); +/* 82 */ return true; +/* */ } +/* */ +/* 85 */ return false; +/* */ } +/* */ +/* 88 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 94 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 98 */ s.saveVersion(1, classCookie); +/* 99 */ super.saveState(s); +/* 100 */ s.saveInt(this.mode); +/* 101 */ s.saveInt(this.repeat); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 106 */ switch (r.restoreVersion(classCookie)) +/* */ { +/* */ case 0: +/* 109 */ super.restoreState(r); +/* 110 */ this.mode = r.restoreInt(); +/* 111 */ break; +/* */ case 1: +/* 113 */ super.restoreState(r); +/* 114 */ this.mode = r.restoreInt(); +/* 115 */ this.repeat = r.restoreInt(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int pmode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 126 */ Object ret = null; +/* 127 */ switch (index - offset) { +/* */ case 0: +/* 129 */ if (pmode == 0) { +/* 130 */ ret = IntegerPropertyEditor.make( +/* 131 */ new Property(this, index, "1=Play, 2=Stop")); +/* 132 */ } else if (pmode == 1) { +/* 133 */ ret = new Integer(this.mode); +/* 134 */ } else if (pmode == 2) +/* 135 */ this.mode = ((Integer)value).intValue(); +/* 136 */ break; +/* */ +/* */ case 1: +/* 139 */ if (pmode == 0) { +/* 140 */ ret = IntegerPropertyEditor.make( +/* 141 */ new Property(this, index, "Repeat count (-1 for infinite)")); +/* 142 */ } else if (pmode == 1) { +/* 143 */ ret = new Integer(this.repeat); +/* 144 */ } else if (pmode == 2) +/* 145 */ this.repeat = ((Integer)value).intValue(); +/* 146 */ break; +/* */ default: +/* 148 */ ret = super.properties(index, offset + 2, pmode, value); +/* */ } +/* 150 */ return ret; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoControlAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VideoManager.java b/NET/worlds/scape/VideoManager.java new file mode 100644 index 0000000..9dc0293 --- /dev/null +++ b/NET/worlds/scape/VideoManager.java @@ -0,0 +1,52 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VideoManager +/* */ { +/* 15 */ static Hashtable streams = new Hashtable(); +/* */ +/* */ public static VideoSurface get(String url, int rows, int w, int h) +/* */ { +/* 19 */ Object ob = streams.get(url); +/* */ +/* */ VideoSurface stream; +/* 22 */ if (ob == null) +/* */ { +/* 24 */ VideoSurface stream = new VideoSurface( +/* 25 */ null, rows, w, h); +/* 26 */ streams.put(url, stream); +/* */ } +/* */ else +/* */ { +/* 30 */ stream = (VideoSurface)ob; +/* */ } +/* */ +/* 33 */ stream.incReferenceCount(); +/* 34 */ stream.open(url); +/* 35 */ return stream; +/* */ } +/* */ +/* */ public static void release(VideoSurface stream) +/* */ { +/* 40 */ stream.decReferenceCount(); +/* 41 */ if (stream.getReferenceCount() == 0) +/* */ { +/* 43 */ streams.remove(stream.getVideoUrl()); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VideoSurface.java b/NET/worlds/scape/VideoSurface.java new file mode 100644 index 0000000..ef0dcb6 --- /dev/null +++ b/NET/worlds/scape/VideoSurface.java @@ -0,0 +1,75 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ public class VideoSurface +/* */ extends TextureSurface +/* */ { +/* */ protected DirectShow _ds; +/* */ protected String _currentURL; +/* */ protected int referenceCount; +/* */ +/* */ public VideoSurface(Texture[] texList, int rows, int w, int h) +/* */ { +/* 12 */ super(texList, rows, w, h); +/* 13 */ this.referenceCount = 0; +/* 14 */ this._ds = new DirectShow(getHwnd()); +/* */ } +/* */ +/* */ +/* */ +/* */ public void incReferenceCount() +/* */ { +/* 21 */ this.referenceCount += 1; +/* */ } +/* */ +/* */ public void decReferenceCount() +/* */ { +/* 26 */ this.referenceCount -= 1; +/* */ } +/* */ +/* */ public int getReferenceCount() +/* */ { +/* 31 */ return this.referenceCount; +/* */ } +/* */ +/* */ public int tick() +/* */ { +/* 36 */ return this._ds.nTick(); +/* */ } +/* */ +/* */ public String getVideoUrl() +/* */ { +/* 41 */ return this._currentURL; +/* */ } +/* */ +/* */ public void open(String url) +/* */ { +/* 46 */ if ((this._currentURL == null) || (!this._currentURL.equals(url))) +/* */ { +/* 48 */ this._ds.nStop(); +/* 49 */ this._ds.nOpen(url); +/* 50 */ this._currentURL = url; +/* */ } +/* */ } +/* */ +/* */ public void stop() +/* */ { +/* 56 */ this._ds.nStop(); +/* */ } +/* */ +/* */ public void play(int repeat) +/* */ { +/* 61 */ this._ds.nPlay(repeat); +/* */ } +/* */ +/* */ public synchronized void draw(Texture[] texList, int rows) +/* */ { +/* 66 */ setTextures(texList, rows); +/* 67 */ draw(this._ds); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoSurface.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VideoTexture.java b/NET/worlds/scape/VideoTexture.java new file mode 100644 index 0000000..4b7765f --- /dev/null +++ b/NET/worlds/scape/VideoTexture.java @@ -0,0 +1,294 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VideoTexture +/* */ extends Attribute +/* */ { +/* */ public VideoTexture(int attrID) +/* */ { +/* 30 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ public VideoTexture() {} +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 40 */ Rect s = (Rect)((Sharer)owner).getOwner(); +/* 41 */ s._videoAttribute = this; +/* */ +/* 43 */ assignMaterial(s); +/* */ } +/* */ +/* */ private void assignMaterial(Rect s) { +/* 47 */ int xTex = this._xSurface / 128; +/* 48 */ if (xTex < 1) +/* 49 */ xTex = 1; +/* 50 */ int yTex = this._ySurface / 128; +/* 51 */ if (yTex < 1) { +/* 52 */ yTex = 1; +/* */ } +/* 54 */ this._surface = null; +/* */ +/* 56 */ this._ds = null; +/* */ +/* 58 */ this._rows = yTex; +/* */ +/* 60 */ this._material = new Material(URL.make(this._defTextureURL), xTex, yTex); +/* 61 */ s.setMaterial(this._material); +/* */ +/* 63 */ this._textures = this._material.getTextures(); +/* 64 */ this._surface = new TextureSurface(this._textures, yTex, this._xSurface, this._ySurface); +/* */ +/* 66 */ this._ds = new DirectShow(this._surface.getHwnd()); +/* 67 */ this._ds.nOpen(this._textureURL); +/* 68 */ if (this._autoPlay) +/* 69 */ this._ds.nPlay(1); +/* */ } +/* */ +/* */ private void setTexture() { +/* 73 */ Sharer sh = (Sharer)getOwner(); +/* 74 */ if (sh == null) { +/* 75 */ return; +/* */ } +/* 77 */ Rect s = (Rect)sh.getOwner(); +/* 78 */ assignMaterial(s); +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 83 */ Rect s = (Rect)((Sharer)getOwner()).getOwner(); +/* 84 */ s._videoAttribute = null; +/* 85 */ if (this._ds != null) { +/* 86 */ this._ds.nStop(); +/* 87 */ this._ds = null; +/* */ } +/* 89 */ super.detach(); +/* */ } +/* */ +/* */ public void finalize() +/* */ { +/* 94 */ releaseAuxilaryData(); +/* 95 */ super.finalize(); +/* */ } +/* */ +/* 98 */ DirectShow _ds = null; +/* */ TextureSurface _surface; +/* */ Texture[] _textures; +/* 101 */ Material _material = null; +/* */ +/* */ +/* 104 */ String _textureURL = "http://dev.worlds.net/rr-worlds/video/eminem.asf"; +/* */ +/* */ +/* 107 */ String _defTextureURL = IniFile.override().getIniString("defaultAd", +/* 108 */ "adworlds.cmp"); +/* */ +/* */ +/* 111 */ int _xSurface = 128; int _ySurface = 128; +/* */ +/* */ +/* 114 */ boolean _autoPlay = true; +/* */ +/* */ +/* 117 */ int _rows = 1; +/* */ +/* */ public DirectShow getDirectShow() { +/* 120 */ return this._ds; +/* */ } +/* */ +/* */ public void videoFrame(FrameEvent f) { +/* 124 */ draw(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public final void noteChange() {} +/* */ +/* */ +/* */ +/* */ +/* */ public synchronized void draw() +/* */ { +/* 137 */ if ((this._surface != null) && (this._ds != null)) { +/* 138 */ this._surface.setTextures(this._material.getTextures(), this._rows); +/* 139 */ this._surface.draw(this._ds); +/* */ } +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 145 */ s.writeUTF(this._textureURL); +/* 146 */ s.writeInt(this._xSurface); +/* 147 */ s.writeInt(this._ySurface); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 152 */ this._textureURL = ds.readUTF(); +/* 153 */ this._xSurface = ds.readInt(); +/* 154 */ this._ySurface = ds.readInt(); +/* */ +/* 156 */ noteChange(); +/* 157 */ setTexture(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 166 */ Object ret = null; +/* 167 */ switch (index - offset) +/* */ { +/* */ case 0: +/* 170 */ if (mode == 0) { +/* 171 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 172 */ "Texture URL")); +/* 173 */ } else if (mode == 1) { +/* 174 */ ret = this._textureURL; +/* 175 */ } else if (mode == 2) { +/* 176 */ this._textureURL = ((String)value); +/* 177 */ setTexture(); +/* */ } +/* 179 */ break; +/* */ case 1: +/* 181 */ if (mode == 0) { +/* 182 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 183 */ "Texture Width"), 0, 1024); +/* 184 */ } else if (mode == 1) { +/* 185 */ ret = new Integer(this._xSurface); +/* 186 */ } else if (mode == 2) { +/* 187 */ this._xSurface = ((Integer)value).intValue(); +/* 188 */ setTexture(); +/* */ } +/* 190 */ break; +/* */ case 2: +/* 192 */ if (mode == 0) { +/* 193 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 194 */ "Texture Height"), 0, 1024); +/* 195 */ } else if (mode == 1) { +/* 196 */ ret = new Integer(this._ySurface); +/* 197 */ } else if (mode == 2) { +/* 198 */ this._ySurface = ((Integer)value).intValue(); +/* 199 */ setTexture(); +/* */ } +/* 201 */ break; +/* */ case 3: +/* 203 */ if (mode == 0) { +/* 204 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 205 */ "Auto-play?"), "No", "Yes"); +/* 206 */ } else if (mode == 1) { +/* 207 */ ret = new Boolean(this._autoPlay); +/* 208 */ } else if (mode == 2) { +/* 209 */ this._autoPlay = ((Boolean)value).booleanValue(); +/* 210 */ setTexture(); +/* */ } +/* 212 */ break; +/* */ +/* */ default: +/* 215 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* */ +/* 218 */ if (mode == 2) { +/* 219 */ noteChange(); +/* */ } +/* 221 */ return ret; +/* */ } +/* */ +/* */ +/* 225 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 229 */ s.saveVersion(1, classCookie); +/* 230 */ super.saveState(s); +/* */ +/* 232 */ s.saveString(this._textureURL); +/* 233 */ s.saveInt(this._xSurface); +/* 234 */ s.saveInt(this._ySurface); +/* 235 */ s.saveBoolean(this._autoPlay); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 240 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 242 */ super.restoreState(r); +/* 243 */ this._textureURL = r.restoreString(); +/* 244 */ this._xSurface = r.restoreInt(); +/* 245 */ this._ySurface = r.restoreInt(); +/* 246 */ noteChange(); +/* 247 */ break; +/* */ +/* */ case 1: +/* 250 */ super.restoreState(r); +/* 251 */ this._textureURL = r.restoreString(); +/* 252 */ this._xSurface = r.restoreInt(); +/* 253 */ this._ySurface = r.restoreInt(); +/* 254 */ this._autoPlay = r.restoreBoolean(); +/* 255 */ noteChange(); +/* 256 */ break; +/* */ +/* */ default: +/* 259 */ throw new TooNewException(); +/* */ } +/* */ +/* 262 */ setTexture(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void releaseAuxilaryData() +/* */ { +/* 269 */ if (this._ds != null) { +/* 270 */ this._ds.nStop(); +/* 271 */ this._ds = null; +/* */ } +/* */ +/* 274 */ if (this._surface != null) { +/* 275 */ this._surface.finalize(); +/* 276 */ this._surface = null; +/* */ } +/* */ +/* 279 */ if (this._material != null) { +/* 280 */ this._material.detach(); +/* 281 */ this._material.finalize(); +/* 282 */ this._material = null; +/* */ } +/* */ +/* */ +/* 286 */ this._textures = null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoTexture.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VideoWall.java b/NET/worlds/scape/VideoWall.java new file mode 100644 index 0000000..4b79bde --- /dev/null +++ b/NET/worlds/scape/VideoWall.java @@ -0,0 +1,263 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VideoWall +/* */ extends Rect +/* */ { +/* 17 */ VideoSurface _surface = null; +/* */ Texture[] _textures; +/* 19 */ Material _material = null; +/* */ +/* */ +/* 22 */ String _textureURL = "http://dev.worlds.net/rr-worlds/video/fatboy.asf"; +/* */ +/* */ +/* 25 */ String _defTextureURL = IniFile.override().getIniString("defaultAd", +/* 26 */ "adworlds.cmp"); +/* */ +/* */ +/* 29 */ int _xSurface = 140; int _ySurface = 104; +/* */ +/* */ +/* 32 */ boolean _autoPlay = true; +/* */ +/* */ +/* */ +/* */ +/* 37 */ int _autoPlayRepeats = 1; +/* */ +/* */ +/* 40 */ int _rows = 1; +/* */ +/* */ +/* */ +/* */ private void rebuild() +/* */ { +/* 46 */ unbuild(); +/* 47 */ int xTex = this._xSurface / 128 + 1; +/* */ +/* 49 */ int yTex = this._ySurface / 128 + 1; +/* */ +/* */ +/* 52 */ this._surface = null; +/* */ +/* 54 */ this._rows = yTex; +/* */ +/* 56 */ this._material = new Material(URL.make(this._defTextureURL), +/* 57 */ xTex, yTex); +/* 58 */ setMaterial(this._material); +/* */ +/* 60 */ this._textures = this._material.getTextures(); +/* 61 */ this._surface = VideoManager.get(this._textureURL, yTex, this._xSurface, +/* 62 */ this._ySurface); +/* */ +/* 64 */ if (this._autoPlay) { +/* 65 */ this._surface.play(1); +/* */ } +/* */ } +/* */ +/* */ public void finalize() { +/* 70 */ unbuild(); +/* 71 */ super.finalize(); +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 76 */ unbuild(); +/* 77 */ super.detach(); +/* */ } +/* */ +/* */ private void unbuild() +/* */ { +/* 82 */ if (this._surface != null) +/* */ { +/* 84 */ this._surface.stop(); +/* 85 */ VideoManager.release(this._surface); +/* 86 */ this._surface = null; +/* */ } +/* */ } +/* */ +/* */ public void changeURL(String newURL, int width, int height) +/* */ { +/* 92 */ this._textureURL = new String(newURL); +/* 93 */ this._xSurface = width; +/* 94 */ this._ySurface = height; +/* 95 */ rebuild(); +/* */ } +/* */ +/* */ public boolean handle(FrameEvent f) +/* */ { +/* 100 */ getState(); +/* 101 */ if (this.visible) +/* 102 */ draw(); +/* 103 */ return false; +/* */ } +/* */ +/* */ public void prerender(Camera cam) +/* */ { +/* 108 */ Point3Temp p = inCamSpace(cam); +/* */ +/* */ +/* */ +/* 112 */ boolean v = (p != null) && (p.z > 1.0F) && (p.x < p.z) && (-p.x < p.z); +/* */ +/* 114 */ if (v) this.visible = true; +/* */ } +/* */ +/* 117 */ public VideoSurface getVideoSurface() { return this._surface; } +/* */ +/* */ public synchronized void draw() +/* */ { +/* 121 */ if (this._surface != null) +/* */ { +/* 123 */ this._surface.draw(this._material.getTextures(), this._rows); +/* */ } +/* */ } +/* */ +/* */ public int getState() +/* */ { +/* 129 */ if (this._surface != null) { +/* 130 */ return this._surface.tick(); +/* */ } +/* 132 */ return 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 141 */ Object ret = null; +/* 142 */ switch (index - offset) +/* */ { +/* */ case 0: +/* 145 */ if (mode == 0) { +/* 146 */ ret = StringPropertyEditor.make( +/* 147 */ new Property(this, index, "Video URL")); +/* 148 */ } else if (mode == 1) { +/* 149 */ ret = this._textureURL; +/* 150 */ } else if (mode == 2) +/* */ { +/* 152 */ this._textureURL = ((String)value); +/* 153 */ rebuild(); +/* */ } +/* 155 */ break; +/* */ case 1: +/* 157 */ if (mode == 0) { +/* 158 */ ret = IntegerPropertyEditor.make( +/* 159 */ new Property(this, index, "Video Width (pixels)"), +/* 160 */ 0, 1024); +/* 161 */ } else if (mode == 1) { +/* 162 */ ret = new Integer(this._xSurface); +/* 163 */ } else if (mode == 2) +/* */ { +/* 165 */ this._xSurface = ((Integer)value).intValue(); +/* 166 */ rebuild(); +/* */ } +/* 168 */ break; +/* */ case 2: +/* 170 */ if (mode == 0) { +/* 171 */ ret = IntegerPropertyEditor.make( +/* 172 */ new Property(this, index, "Video Height (pixels)"), +/* 173 */ 0, 1024); +/* 174 */ } else if (mode == 1) { +/* 175 */ ret = new Integer(this._ySurface); +/* 176 */ } else if (mode == 2) +/* */ { +/* 178 */ this._ySurface = ((Integer)value).intValue(); +/* 179 */ rebuild(); +/* */ } +/* 181 */ break; +/* */ case 3: +/* 183 */ if (mode == 0) { +/* 184 */ ret = BooleanPropertyEditor.make( +/* 185 */ new Property(this, index, "Auto-play?"), +/* 186 */ "No", "Yes"); +/* 187 */ } else if (mode == 1) { +/* 188 */ ret = new Boolean(this._autoPlay); +/* 189 */ } else if (mode == 2) +/* */ { +/* 191 */ this._autoPlay = ((Boolean)value).booleanValue(); +/* 192 */ rebuild(); +/* */ } +/* 194 */ break; +/* */ case 4: +/* 196 */ if (mode == 0) { +/* 197 */ ret = IntegerPropertyEditor.make( +/* 198 */ new Property(this, index, "Repeats for Autoplay (-1 = infinite)"), +/* 199 */ -1, 1024); +/* 200 */ } else if (mode == 1) { +/* 201 */ ret = new Integer(this._autoPlayRepeats); +/* 202 */ } else if (mode == 2) +/* */ { +/* 204 */ this._autoPlayRepeats = ((Integer)value).intValue(); +/* 205 */ rebuild(); +/* */ } +/* 207 */ break; +/* */ +/* */ default: +/* 210 */ ret = super.properties(index, offset + 5, mode, value); +/* */ } +/* */ +/* 213 */ return ret; +/* */ } +/* */ +/* */ +/* 217 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 221 */ s.saveVersion(1, classCookie); +/* 222 */ super.saveState(s); +/* */ +/* 224 */ s.saveString(this._textureURL); +/* 225 */ s.saveInt(this._xSurface); +/* 226 */ s.saveInt(this._ySurface); +/* 227 */ s.saveBoolean(this._autoPlay); +/* 228 */ s.saveInt(this._autoPlayRepeats); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 233 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 235 */ super.restoreState(r); +/* 236 */ this._textureURL = r.restoreString(); +/* 237 */ this._xSurface = r.restoreInt(); +/* 238 */ this._ySurface = r.restoreInt(); +/* 239 */ this._autoPlay = r.restoreBoolean(); +/* 240 */ break; +/* */ +/* */ case 1: +/* 243 */ super.restoreState(r); +/* 244 */ this._textureURL = r.restoreString(); +/* 245 */ this._xSurface = r.restoreInt(); +/* 246 */ this._ySurface = r.restoreInt(); +/* 247 */ this._autoPlay = r.restoreBoolean(); +/* 248 */ this._autoPlayRepeats = r.restoreInt(); +/* 249 */ break; +/* */ +/* */ default: +/* 252 */ throw new TooNewException(); +/* */ } +/* */ +/* 255 */ rebuild(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VideoWall.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/VisiAttribute.java b/NET/worlds/scape/VisiAttribute.java new file mode 100644 index 0000000..77b8e80 --- /dev/null +++ b/NET/worlds/scape/VisiAttribute.java @@ -0,0 +1,91 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class VisiAttribute +/* */ extends Attribute +/* */ { +/* */ public VisiAttribute(int attrID) +/* */ { +/* 33 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ public VisiAttribute() {} +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 42 */ WObject w = (WObject)((Sharer)owner).getOwner(); +/* */ +/* 44 */ w._visibilityAttribute = this; +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 49 */ WObject w = (WObject)((Sharer)getOwner()).getOwner(); +/* 50 */ w._visibilityAttribute = null; +/* 51 */ super.detach(); +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) throws IOException +/* */ { +/* 56 */ s.writeBoolean(((WObject)getOwner().getOwner()).getVisible()); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 61 */ ((WObject)getOwner().getOwner()).setVisible(ds.readBoolean()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 67 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 71 */ s.saveVersion(0, classCookie); +/* 72 */ super.saveState(s); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 77 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 79 */ super.restoreState(r); +/* 80 */ break; +/* */ default: +/* 82 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\VisiAttribute.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WMPSoundPlayer.java b/NET/worlds/scape/WMPSoundPlayer.java new file mode 100644 index 0000000..c8dbd82 --- /dev/null +++ b/NET/worlds/scape/WMPSoundPlayer.java @@ -0,0 +1,92 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.WebControlImp; +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WMPSoundPlayer +/* */ extends SoundPlayer +/* */ { +/* */ protected DirectShow ds; +/* */ protected boolean disabled; +/* */ +/* */ public WMPSoundPlayer(Sound owner) +/* */ { +/* 28 */ super(owner); +/* 29 */ this.ds = new DirectShow(); +/* */ } +/* */ +/* 32 */ static int activeCount = 0; +/* 33 */ boolean playing = false; +/* */ +/* */ public static boolean isActive() +/* */ { +/* 37 */ return activeCount > 0; +/* */ } +/* */ +/* */ +/* */ public boolean open(float volume, float stopDist, boolean atten, boolean pan) +/* */ { +/* 43 */ return true; +/* */ } +/* */ +/* */ public void start(int repeat) +/* */ { +/* 48 */ String megaURL = this.owner.getURL().toString(); +/* 49 */ megaURL = WebControlImp.processURL(megaURL); +/* */ +/* 51 */ this.ds.nOpen(URL.make(megaURL).unalias()); +/* 52 */ activeCount += 1; +/* 53 */ this.ds.nPlay(repeat); +/* 54 */ this.playing = true; +/* */ } +/* */ +/* */ +/* */ public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up) +/* */ { +/* 60 */ return true; +/* */ } +/* */ +/* */ public int getState() +/* */ { +/* 65 */ int nativeState = this.ds.nTick(); +/* 66 */ return nativeState == 3 ? 0 : 1; +/* */ } +/* */ +/* */ public void stop() +/* */ { +/* 71 */ this.ds.nStop(); +/* 72 */ activeCount -= 1; +/* 73 */ this.playing = false; +/* */ } +/* */ +/* */ public void close() +/* */ { +/* 78 */ if (this.playing) { +/* 79 */ stop(); +/* */ } +/* */ } +/* */ +/* */ public boolean setVolume(float v) { +/* 84 */ return true; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WMPSoundPlayer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WObject.java b/NET/worlds/scape/WObject.java new file mode 100644 index 0000000..7e29700 --- /dev/null +++ b/NET/worlds/scape/WObject.java @@ -0,0 +1,3633 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Gamma; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.RightMenu; +/* */ import NET.worlds.core.Debug; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.NetworkObject; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.DataInputStream; +/* */ import java.io.IOException; +/* */ import java.lang.reflect.Field; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WObject +/* */ extends Transform +/* */ implements Prerenderable +/* */ { +/* 231 */ private boolean mouseOver = false; +/* */ private String _toolTipText; +/* */ +/* */ public boolean getMouseOver() { +/* 235 */ if (this.mouseOver) { +/* 236 */ return true; +/* */ } +/* */ try +/* */ { +/* 240 */ obj = (WObject)getOwner(); +/* */ } catch (ClassCastException c) { WObject obj; +/* 242 */ return false; +/* */ } +/* */ WObject obj; +/* 245 */ if (obj == null) { +/* 246 */ return false; +/* */ } +/* 248 */ return obj.getMouseOver(); +/* */ } +/* */ +/* */ +/* */ public void setMouseOver(boolean m) +/* */ { +/* 254 */ this.mouseOver = m; +/* */ } +/* */ +/* */ +/* */ public String getToolTipText() +/* */ { +/* 260 */ if (this._toolTipText != null) { +/* 261 */ return this._toolTipText; +/* */ } +/* */ try +/* */ { +/* 265 */ obj = (WObject)getOwner(); +/* */ } catch (ClassCastException c) { WObject obj; +/* 267 */ return null; +/* */ } +/* */ WObject obj; +/* 270 */ if (obj == null) { +/* 271 */ return null; +/* */ } +/* 273 */ return obj.getToolTipText(); +/* */ } +/* */ +/* */ +/* */ public void setToolTipText(String newText) +/* */ { +/* 279 */ this._toolTipText = newText; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setName(String v) +/* */ { +/* 289 */ super.setName(getBangName(v)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private String getBangName(String s) +/* */ { +/* 298 */ boolean hasBang = s.startsWith("!"); +/* */ +/* 300 */ if (hasBang != isDynamic()) { +/* 301 */ if (hasBang) { +/* 302 */ return s.substring(1); +/* */ } +/* 304 */ return "!" + s; +/* */ } +/* */ +/* 307 */ return s; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void markEdited() +/* */ { +/* 316 */ if (!isDynamic()) { +/* 317 */ super.markEdited(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) +/* */ { +/* 328 */ if (this.contents != null) +/* 329 */ d.addChildVector(this.contents); +/* 330 */ if (this.eventHandlers != null) +/* 331 */ d.addChildVector(this.eventHandlers); +/* 332 */ if (this.actions != null) +/* 333 */ d.addChildVectorAction(this.actions); +/* 334 */ if (this._sharer != null) { +/* 335 */ d.addChildElement(this._sharer); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 354 */ private Vector contents = null; +/* */ private Shadow shadow; +/* */ public static boolean shadowsOn; +/* */ +/* */ public void add(WObject child) +/* */ { +/* 360 */ super.add(child); +/* */ +/* */ +/* 363 */ if (hasClump()) { +/* 364 */ child.recursiveAddRwChildren(this); +/* */ } +/* 366 */ if (child._sharer != null) { +/* 367 */ child._sharer.adjustShare(); +/* */ } +/* 369 */ if (this.contents == null) +/* 370 */ this.contents = new Vector(); +/* 371 */ this.contents.addElement(child); +/* */ } +/* */ +/* */ +/* */ +/* */ public Enumeration getContents() +/* */ { +/* 378 */ if (this.contents == null) { +/* 379 */ return new Vector().elements(); +/* */ } +/* 381 */ return this.contents.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasContents() +/* */ { +/* 389 */ return this.contents != null; +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean contentsContain(WObject w) +/* */ { +/* 396 */ if (this.contents == null) { +/* 397 */ return false; +/* */ } +/* 399 */ return this.contents.contains(w); +/* */ } +/* */ +/* */ +/* */ protected void noteUnadding(SuperRoot child) +/* */ { +/* 405 */ if ((this.contents != null) && (this.contents.removeElement(child)) && +/* 406 */ (this.contents.size() == 0)) { +/* 407 */ this.contents = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void makeShadow() +/* */ { +/* 425 */ assert (this.shadow == null); +/* 426 */ this.shadow = new DiskShadow(this); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detach() +/* */ { +/* 440 */ if (this.clumpID != 0) { +/* 441 */ markVoid(); +/* */ } +/* 443 */ super.detach(); +/* */ +/* 445 */ if (this._sharer != null) { +/* 446 */ this._sharer.adjustShare(); +/* */ } +/* 448 */ if (this.shadow != null) { +/* 449 */ this.shadow.adjustShadow(this); +/* 450 */ this.shadow = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 457 */ protected boolean discarded = false; +/* */ protected int clumpID; +/* */ +/* */ public void discard() { +/* 461 */ super.discard(); +/* */ +/* 463 */ this.discarded = true; +/* */ +/* 465 */ if (this.contents != null) { +/* 466 */ int i = this.contents.size(); +/* 467 */ do { ((WObject)this.contents.elementAt(i)).discard();i--; +/* 466 */ } while (i >= 0); +/* */ } +/* */ +/* 469 */ if (this.eventHandlers != null) { +/* 470 */ int i = this.eventHandlers.size(); +/* 471 */ do { removeHandler((SuperRoot)this.eventHandlers.elementAt(i));i--; +/* 470 */ } while (i >= 0); +/* */ } +/* */ +/* 473 */ if (this.actions != null) { +/* 474 */ int i = this.actions.size(); +/* 475 */ do { removeAction((Action)this.actions.elementAt(i));i--; +/* 474 */ } while (i >= 0); +/* */ } +/* */ +/* 477 */ releaseAuxilaryData(); +/* */ } +/* */ +/* */ protected void finalize() +/* */ { +/* 482 */ if (!this.discarded) { +/* 483 */ releaseAuxilaryData(); +/* */ } +/* */ +/* 486 */ super.finalize(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void reclump() +/* */ { +/* 505 */ if (this.clumpID != 0) { +/* 506 */ assert ((this.flags & 0x200000) == 0); +/* 507 */ this.flags |= 0x200000; +/* */ +/* 509 */ markVoid(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 515 */ recursiveAddRwChildren((WObject)getOwner()); +/* */ +/* 517 */ assert ((this.flags & 0x200000) != 0); +/* 518 */ this.flags &= 0xFFDFFFFF; +/* */ } +/* */ } +/* */ +/* */ public boolean isReclumping() { +/* 523 */ return (this.flags & 0x200000) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void noteTransformChange() +/* */ { +/* 542 */ setClumpMatrix(); +/* 543 */ updateHighlight(); +/* */ +/* 545 */ if (this.shadow != null) { +/* 546 */ this.shadow.adjustShadow(this); +/* */ } +/* 548 */ if (this._transformAttribute != null) { +/* 549 */ this._transformAttribute.noteChange(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void markVoid() +/* */ { +/* 559 */ if (this.contents != null) { +/* 560 */ int i = this.contents.size(); +/* 561 */ do { ((WObject)this.contents.elementAt(i)).markVoid();i--; +/* 560 */ } while (i >= 0); +/* */ } +/* */ +/* */ +/* 564 */ Room r = getRoomFromClump(); +/* */ +/* 566 */ if ((this instanceof FrameHandler)) { +/* 567 */ r.removeFrameHandler((FrameHandler)this, this); +/* */ } +/* 569 */ if (this.eventHandlers != null) { +/* 570 */ int i = this.eventHandlers.size(); +/* 571 */ do { Object f = this.eventHandlers.elementAt(i); +/* 572 */ if ((f instanceof FrameHandler)) { +/* 573 */ r.removeFrameHandler((FrameHandler)f, this); +/* */ } +/* 570 */ i--; } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 576 */ voidClump(); +/* */ +/* 578 */ if (this.shadow != null) { +/* 579 */ this.shadow.adjustShadow(this); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected void addRwChildren(WObject parent) +/* */ { +/* 597 */ addNewRwChild(parent); +/* */ } +/* */ +/* */ public void recursiveAddRwChildren(WObject parent) { +/* 601 */ addRwChildren(parent); +/* */ +/* 603 */ if (this.contents != null) { +/* 604 */ int end = this.contents.size(); +/* 605 */ for (int i = 0; i < end; i++) { +/* 606 */ ((WObject)this.contents.elementAt(i)).recursiveAddRwChildren(this); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected final void addNewRwChild(WObject container) +/* */ { +/* 621 */ assert (this.clumpID == 0); +/* */ +/* 623 */ createClump(); +/* */ +/* 625 */ newRwClumpChildHelper(container); +/* */ } +/* */ +/* */ +/* */ +/* */ protected void newRwClumpChildHelper(WObject container) +/* */ { +/* 632 */ assert (container != null); +/* */ +/* */ +/* 635 */ addChildToClump(container); +/* */ +/* */ +/* 638 */ newRwChildHelper(); +/* */ +/* */ +/* */ +/* */ +/* 643 */ if (!getVisible()) { +/* 644 */ updateVisible(); +/* */ } +/* */ +/* 647 */ if (this.shadow != null) { +/* 648 */ this.shadow.adjustShadow(this); +/* */ } +/* */ else { +/* 651 */ if (getShadowedLocally() ? !getLocalShadowed() : !shadowsOn) { +/* 652 */ return; +/* */ } +/* */ +/* 655 */ if (inRoomContents()) +/* */ { +/* 657 */ if ((getOwner() instanceof Room)) { +/* 658 */ makeShadow(); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void newRwChildHelper() +/* */ { +/* 669 */ initClumpData(); +/* */ +/* 671 */ setClumpMatrix(); +/* */ +/* */ +/* 674 */ Room r = getRoom(); +/* */ +/* 676 */ if ((this instanceof FrameHandler)) { +/* 677 */ r.addFrameHandler((FrameHandler)this, this); +/* */ } +/* 679 */ if (this.eventHandlers != null) { +/* 680 */ for (int i = 0; i < this.eventHandlers.size(); i++) { +/* 681 */ Object f = this.eventHandlers.elementAt(i); +/* 682 */ if ((f instanceof FrameHandler)) { +/* 683 */ r.addFrameHandler((FrameHandler)f, this); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public final boolean hasClump() +/* */ { +/* 700 */ return this.clumpID != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ public final int getID() +/* */ { +/* 707 */ return this.clumpID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp inCamSpace(Camera cam) +/* */ { +/* 724 */ Point3Temp p = Point3Temp.make(); +/* 725 */ return nativeInCamSpace(cam, p) ? p : null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Transform getObjectToWorldMatrix() +/* */ { +/* 776 */ if (hasClump()) { +/* 777 */ return getObjectToWorldMatrix(Transform.make()); +/* */ } +/* 779 */ Transform t = getTransform(); +/* */ +/* 781 */ SuperRoot o = getOwner(); +/* 782 */ if ((o instanceof WObject)) { +/* 783 */ Transform ot = ((WObject)o).getObjectToWorldMatrix(); +/* 784 */ t.post(ot); +/* 785 */ ot.recycle(); +/* */ } +/* */ +/* 788 */ return t; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp getWorldPosition() +/* */ { +/* 805 */ Transform t = getObjectToWorldMatrix(); +/* 806 */ Point3Temp ret = t.getPosition(); +/* 807 */ t.recycle(); +/* 808 */ return ret; +/* */ } +/* */ +/* 811 */ protected int highlightID = 0; +/* */ protected static final int isVisibleMask = 1; +/* */ protected static final int isBumpableMask = 2; +/* */ protected static final int isHologramRoughCutMask = 4; +/* */ protected static final int isMirrored = 4; +/* */ protected static final int isOptimizableMask = 8; +/* */ protected static final int isDrawFirstOnIntersectionMask = 16; +/* */ protected static final int isDrawOrderUnimportantMask = 32; +/* */ protected static final int isMaterialVisible = 64; +/* */ protected static final int isHighlitMask = 128; +/* */ protected static final int isAutoGapMask = 256; +/* */ protected static final int isAutoGapFromLocalMask = 512; +/* */ protected static final int isDisablePixelDoublingMask = 1024; +/* */ +/* */ public BoundBoxTemp getClumpBBox() { +/* 826 */ Point3Temp start = Point3Temp.make(); +/* 827 */ Point3Temp right = Point3Temp.make(); +/* */ +/* 829 */ getClumpBBox(start, right); +/* */ +/* 831 */ return BoundBoxTemp.make(start, right); +/* */ } +/* */ +/* */ +/* */ +/* */ protected static final int isSharerMode0 = 2048; +/* */ +/* */ +/* */ protected static final int isSharerMode1 = 4096; +/* */ +/* */ +/* */ protected static final int isSharerMode2 = 8192; +/* */ +/* */ +/* */ protected static final int duringRestore = 16384; +/* */ +/* */ +/* */ protected static final int isShadowedLocally = 32768; +/* */ +/* */ protected static final int isShadowed = 65536; +/* */ +/* */ protected static final int isAutobuiltMask = 131072; +/* */ +/* */ protected static final int isHologramViewplaneAlignedMask = 262144; +/* */ +/* */ protected static final int isDontConnect = 262144; +/* */ +/* */ protected static final int isSurfaceUFlippedMask = 524288; +/* */ +/* */ protected static final int isSurfaceVFlippedMask = 1048576; +/* */ +/* */ protected static final int isReclumpingMask = 2097152; +/* */ +/* */ protected static final int isHologramAutosize = 4194304; +/* */ +/* 866 */ protected int flags = 3; +/* */ Vector eventHandlers; +/* */ +/* */ public WObject setHighlit(boolean b) { +/* 870 */ if (b) { +/* 871 */ this.flags |= 0x80; +/* */ } else { +/* 873 */ this.flags &= 0xFF7F; +/* */ } +/* 875 */ updateHighlight(); +/* 876 */ return this; +/* */ } +/* */ +/* */ public final boolean getHighlit() { +/* 880 */ return (this.flags & 0x80) != 0; +/* */ } +/* */ +/* */ public void setAutobuilt(boolean b) { +/* 884 */ if (b) { +/* 885 */ this.flags |= 0x20000; +/* */ } else { +/* 887 */ this.flags &= 0xFFFDFFFF; +/* */ } +/* */ } +/* */ +/* */ public final boolean getAutobuilt() +/* */ { +/* 893 */ return (this.flags & 0x20000) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public WObject setOptimizable(boolean b) +/* */ { +/* 901 */ if (b) { +/* 902 */ this.flags |= 0x8; +/* */ } else { +/* 904 */ this.flags &= 0xFFFFFFF7; +/* */ } +/* 906 */ return this; +/* */ } +/* */ +/* */ public final boolean getOptimizable() { +/* 910 */ return (this.flags & 0x8) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ final void setSharerMode(int mode) +/* */ { +/* 920 */ assert ((mode >= 0) && (mode < 8)); +/* */ +/* 922 */ this.flags &= 0xC7FF; +/* 923 */ this.flags |= mode << 11; +/* */ +/* */ +/* 926 */ setName(getName()); +/* */ } +/* */ +/* */ final int getSharerMode() { +/* 930 */ return this.flags >>> 11 & 0x7; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public final boolean isDynamic() +/* */ { +/* 938 */ return (getSharerMode() & 0x4) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject setLocalAutoGap(boolean b) +/* */ { +/* 947 */ if (b) { +/* 948 */ this.flags |= 0x100; +/* */ } else { +/* 950 */ this.flags &= 0xFEFF; +/* */ } +/* */ +/* */ +/* 954 */ if ((this instanceof Room)) { +/* 955 */ for (Enumeration e = getDeepOwned(); e.hasMoreElements();) { +/* 956 */ Object o = e.nextElement(); +/* 957 */ if ((o instanceof WObject)) { +/* 958 */ ((WObject)o).noteTransformChange(); +/* */ } +/* */ } +/* */ } +/* 962 */ return this; +/* */ } +/* */ +/* */ public final boolean getLocalAutoGap() { +/* 966 */ return (this.flags & 0x100) != 0; +/* */ } +/* */ +/* */ public WObject setAutoGapFromRoom(boolean b) { +/* 970 */ if (b) { +/* 971 */ this.flags &= 0xFDFF; +/* */ } else { +/* 973 */ this.flags |= 0x200; +/* */ } +/* 975 */ noteTransformChange(); +/* 976 */ return this; +/* */ } +/* */ +/* */ public final boolean getAutoGapFromRoom() { +/* 980 */ return (this.flags & 0x200) == 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean getAutoGap() +/* */ { +/* 989 */ return (getAutoGapFromRoom() ? getRoom() : this).getLocalAutoGap(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void setVisible(boolean b) +/* */ { +/* 998 */ if (b != getVisible()) { +/* 999 */ if (b) { +/* 1000 */ this.flags |= 0x1; +/* */ } else { +/* 1002 */ this.flags &= 0xFFFFFFFE; +/* */ } +/* 1004 */ updateVisible(); +/* */ +/* 1006 */ if (this.shadow != null) { +/* 1007 */ this.shadow.adjustShadow(this); +/* */ } +/* 1009 */ if (this._visibilityAttribute != null) { +/* 1010 */ this._visibilityAttribute.noteChange(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ public boolean getLocalShadowed() +/* */ { +/* 1018 */ return (this.flags & 0x10000) != 0; +/* */ } +/* */ +/* */ public void setLocalShadowed(boolean b) { +/* 1022 */ if (b) { +/* 1023 */ this.flags |= 0x10000; +/* */ } else { +/* 1025 */ this.flags &= 0xFFFEFFFF; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getShadowedLocally() +/* */ { +/* 1033 */ return (this.flags & 0x8000) != 0; +/* */ } +/* */ +/* */ public void setShadowedLocally(boolean b) { +/* 1037 */ if (b) { +/* 1038 */ this.flags |= 0x8000; +/* */ } else { +/* 1040 */ this.flags &= 0xFFFF7FFF; +/* */ } +/* */ } +/* */ +/* */ +/* */ public final boolean getVisible() +/* */ { +/* 1047 */ return (this.flags & 0x1) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ public WObject setBumpable(boolean b) +/* */ { +/* 1054 */ if (b) { +/* 1055 */ this.flags |= 0x2; +/* */ } else { +/* 1057 */ this.flags &= 0xFFFFFFFD; +/* */ } +/* 1059 */ if (this._bumpableAttribute != null) { +/* 1060 */ this._bumpableAttribute.noteChange(); +/* */ } +/* 1062 */ return this; +/* */ } +/* */ +/* */ public final boolean getBumpable() { +/* 1066 */ return (this.flags & 0x2) != 0; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(Event event) +/* */ { +/* 1085 */ event.receiver = this; +/* 1086 */ boolean delivered = event.deliver(this); +/* */ +/* 1088 */ if (this.eventHandlers != null) { +/* 1089 */ for (Enumeration e = this.eventHandlers.elements(); e.hasMoreElements();) { +/* 1090 */ event.receiver = this; +/* 1091 */ if (event.deliver(e.nextElement())) +/* 1092 */ delivered = true; +/* */ } +/* */ } +/* 1095 */ if (delivered) { +/* 1096 */ return true; +/* */ } +/* 1098 */ if ((event instanceof UserEvent)) { +/* 1099 */ Object o = getOwner(); +/* 1100 */ if ((o instanceof WObject)) { +/* 1101 */ return ((WObject)o).deliver(event); +/* */ } +/* */ } +/* 1104 */ return false; +/* */ } +/* */ +/* */ public Enumeration getHandlers() +/* */ { +/* 1109 */ if (this.eventHandlers == null) { +/* 1110 */ return new Vector().elements(); +/* */ } +/* 1112 */ return this.eventHandlers.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasHandler(SuperRoot h) +/* */ { +/* 1121 */ return (this.eventHandlers != null) && (this.eventHandlers.indexOf(h) != -1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject addHandler(SuperRoot h) +/* */ { +/* 1130 */ if (this.eventHandlers == null) +/* 1131 */ this.eventHandlers = new Vector(); +/* 1132 */ this.eventHandlers.addElement(h); +/* */ +/* */ +/* 1135 */ if ((this.clumpID != 0) && ((h instanceof FrameHandler))) { +/* 1136 */ getRoomFromClump().addFrameHandler((FrameHandler)h, this); +/* */ } +/* 1138 */ super.add(h); +/* 1139 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Room getRoom() +/* */ { +/* 1147 */ return this.clumpID != 0 ? getRoomFromClump() : getRoomNotFromClump(); +/* */ } +/* */ +/* */ +/* */ +/* */ public Room getRoomNotFromClump() +/* */ { +/* 1154 */ SuperRoot o = getOwner(); +/* 1155 */ if ((o instanceof WObject)) { +/* 1156 */ return ((WObject)o).getRoomNotFromClump(); +/* */ } +/* 1158 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public World getWorld() +/* */ { +/* 1180 */ if (this.clumpID != 0) { +/* 1181 */ return getRoomFromClump().getWorld(); +/* */ } +/* 1183 */ Room r = getRoomNotFromClump(); +/* 1184 */ return r == null ? null : r.getWorld(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean isActive() +/* */ { +/* 1193 */ if (this.clumpID != 0) { +/* 1194 */ return true; +/* */ } +/* 1196 */ return super.isActive(); +/* */ } +/* */ +/* */ +/* */ +/* */ public void removeHandler(SuperRoot h) +/* */ { +/* 1203 */ if (this.eventHandlers.contains(h)) { +/* 1204 */ h.detach(); +/* */ +/* 1206 */ this.eventHandlers.removeElement(h); +/* 1207 */ if (this.eventHandlers.size() == 0) { +/* 1208 */ this.eventHandlers = null; +/* */ } +/* 1210 */ if ((this.clumpID != 0) && ((h instanceof FrameHandler))) { +/* 1211 */ getRoomFromClump().removeFrameHandler((FrameHandler)h, this); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 1218 */ protected Vector actions = null; +/* */ +/* */ +/* */ +/* */ public Enumeration getActions() +/* */ { +/* 1224 */ if (this.actions == null) +/* 1225 */ return new Vector().elements(); +/* 1226 */ return this.actions.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean hasActions() +/* */ { +/* 1233 */ return this.actions != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject addAction(Action a) +/* */ { +/* 1242 */ if (this.actions == null) { +/* 1243 */ this.actions = new Vector(); +/* */ } +/* 1245 */ this.actions.addElement(a); +/* */ +/* 1247 */ super.add(a); +/* 1248 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ public void removeAction(Action a) +/* */ { +/* 1255 */ assert (a.getOwner() == this); +/* */ +/* 1257 */ a.detach(); +/* */ +/* 1259 */ this.actions.removeElement(a); +/* 1260 */ if (this.actions.size() == 0) { +/* 1261 */ this.actions = null; +/* */ } +/* */ } +/* */ +/* */ +/* */ public void rightMenu() +/* */ { +/* 1268 */ RightMenu rm = new RightMenu(this, getActions()); +/* */ } +/* */ +/* */ +/* */ public void doAction(String actionLabel, Event evt) +/* */ { +/* 1274 */ if ((actionLabel == null) || (actionLabel.equals(""))) { +/* 1275 */ return; +/* */ } +/* 1277 */ if ((Gamma.getShaper() != null) && +/* 1278 */ (actionLabel.equals("Edit Properties..."))) { +/* 1279 */ Console.getFrame().getEditTile().viewProperties(this); +/* 1280 */ } else if (this.actions != null) { +/* 1281 */ int i = 0; +/* 1282 */ while (i < this.actions.size()) { +/* 1283 */ Action candidate = (Action)this.actions.elementAt(i); +/* 1284 */ i++; +/* 1285 */ if (actionLabel.equals(candidate.rightMenuLabel)) { +/* 1286 */ RunningActionHandler.trigger(candidate, getWorld(), evt); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 1293 */ protected BumpCalc bumpCalc = null; +/* */ static BumpCalc standardBoxBumpCalc; +/* */ +/* 1296 */ public WObject setBumpCalc(BumpCalc b) { if (this.bumpCalc != null) { +/* 1297 */ this.bumpCalc.detach(); +/* */ } +/* 1299 */ this.bumpCalc = b; +/* 1300 */ if (this.bumpCalc != null) { +/* 1301 */ super.add(this.bumpCalc); +/* */ } +/* 1303 */ return this; +/* */ } +/* */ +/* */ static +/* */ { +/* 227 */ nativeInit(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 418 */ shadowsOn = IniFile.gamma().getIniInt("shadows", 0) != 0; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1306 */ standardBoxBumpCalc = new BoxBumpCalc(); +/* */ +/* */ +/* 1309 */ standardBoxBumpCalc.setName("defaultBoxBumpCalc"); +/* */ } +/* */ +/* */ +/* */ +/* */ public BumpCalc getBumpCalc(BumpEventTemp b) +/* */ { +/* 1316 */ if (this.bumpCalc == null) +/* 1317 */ return standardBoxBumpCalc; +/* 1318 */ return this.bumpCalc; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Point3Temp getPlaneExtent() +/* */ { +/* 1327 */ return Point3Temp.make(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public BoundBoxTemp getBoundBox() +/* */ { +/* 1337 */ if (getVisible()) { +/* 1338 */ return getClumpBBox(); +/* */ } +/* 1340 */ Transform xfrm = getObjectToWorldMatrix(); +/* */ +/* 1342 */ BoundBoxTemp ret = BoundBoxTemp.make(xfrm.getPosition(), +/* 1343 */ getPlaneExtent().times(xfrm)); +/* 1344 */ xfrm.recycle(); +/* */ +/* 1346 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ public float getMinXYExtent() +/* */ { +/* 1353 */ if (getVisible()) { +/* 1354 */ return getClumpMinXYExtent(); +/* */ } +/* 1356 */ BoundBoxTemp box = getBoundBox(); +/* 1357 */ float x = box.hi.x - box.lo.x; +/* 1358 */ float y = box.hi.y - box.lo.y; +/* */ +/* 1360 */ return x < y ? x : y; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void detectBump(BumpEventTemp b) +/* */ { +/* 1373 */ BoundBoxTemp box = getBoundBox(); +/* 1374 */ if ((!box.isEmpty()) && (b.bound.overlaps(box))) { +/* 1375 */ getBumpCalc(b).detectBump(b, this); +/* */ } +/* 1377 */ if (this.contents != null) { +/* 1378 */ int i = this.contents.size(); +/* 1379 */ do { WObject w = (WObject)this.contents.elementAt(i); +/* 1380 */ if ((w.getBumpable()) && (b.source != w)) { +/* 1381 */ w.detectBump(b); +/* */ } +/* 1378 */ i--; } while (i >= 0); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void premoveThrough(Point3Temp motion) +/* */ { +/* 1390 */ Point3Temp pos = getPosition(); +/* */ +/* 1392 */ moveThrough(Point3Temp.make(motion).times(this).minus(pos)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ protected WObject changeRoom(Room newRoom, Transform invPos) +/* */ { +/* 1494 */ detach(); +/* 1495 */ newRoom.add(this); +/* 1496 */ makeIdentity(); +/* 1497 */ pre(invPos); +/* 1498 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 1509 */ Object ret = null; +/* */ +/* 1511 */ switch (index - offset) { +/* */ case 0: +/* 1513 */ if (mode == 0) { +/* 1514 */ ret = +/* 1515 */ PropAdder.make(new VectorProperty(this, index, "Contents")); +/* 1516 */ } else if (mode == 1) { +/* 1517 */ if (this.contents != null) +/* 1518 */ ret = this.contents.clone(); +/* 1519 */ } else if (mode == 4) { +/* 1520 */ ((WObject)value).detach(); +/* 1521 */ } else if (mode == 3) { +/* 1522 */ add((WObject)value); +/* 1523 */ } else if ((mode == 5) && ((value instanceof WObject)) && +/* 1524 */ (!(value instanceof Room))) +/* 1525 */ ret = value; +/* 1526 */ break; +/* */ case 1: +/* 1528 */ if (mode == 0) { +/* 1529 */ ret = PropAdder.make(new VectorProperty(this, index, +/* 1530 */ "Event Handlers")); +/* 1531 */ } else if (mode == 1) { +/* 1532 */ if (this.eventHandlers != null) +/* 1533 */ ret = this.eventHandlers.clone(); +/* 1534 */ } else if (mode == 4) { +/* 1535 */ removeHandler((SuperRoot)value); +/* 1536 */ } else if (mode == 3) { +/* 1537 */ addHandler((SuperRoot)value); +/* 1538 */ } else if ((mode == 5) && ( +/* 1539 */ ((value instanceof SwitchableBehavior)) || ((value instanceof Sensor)))) +/* 1540 */ ret = value; +/* 1541 */ break; +/* */ case 2: +/* 1543 */ if (mode == 0) { +/* 1544 */ ret = +/* 1545 */ PropAdder.make(new VectorProperty(this, index, "Actions")); +/* 1546 */ } else if (mode == 1) { +/* 1547 */ if (this.actions != null) +/* 1548 */ ret = this.actions.clone(); +/* 1549 */ } else if (mode == 4) { +/* 1550 */ removeAction((Action)value); +/* 1551 */ } else if (mode == 3) { +/* 1552 */ addAction((Action)value); +/* 1553 */ } else if ((mode == 5) && ((value instanceof Action))) +/* 1554 */ ret = value; +/* 1555 */ break; +/* */ case 3: +/* 1557 */ if (mode == 0) { +/* 1558 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1559 */ "Bumpable"), "No", "Yes"); +/* 1560 */ } else if (mode == 1) { +/* 1561 */ ret = new Boolean(getBumpable()); +/* 1562 */ } else if (mode == 2) +/* 1563 */ setBumpable(((Boolean)value).booleanValue()); +/* 1564 */ break; +/* */ case 4: +/* 1566 */ if (mode == 0) { +/* 1567 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1568 */ "Visible"), "No", "Yes"); +/* 1569 */ } else if (mode == 1) { +/* 1570 */ ret = new Boolean(getVisible()); +/* 1571 */ } else if (mode == 2) +/* 1572 */ setVisible(((Boolean)value).booleanValue()); +/* 1573 */ break; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ case 5: +/* 1586 */ if (mode == 0) { +/* 1587 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 1588 */ "Sharing Mode (100 for help)", true)); +/* 1589 */ } else if (mode == 1) { +/* 1590 */ ret = new Integer(getSharerMode()); +/* 1591 */ } else if (mode == 2) { +/* 1592 */ int val = ((Integer)value).intValue(); +/* 1593 */ if (((this instanceof Room)) && (val >= 0) && (val <= 5)) { +/* 1594 */ Console.println("A Room's sharing mode\nmust be 2, and is\nautomatically set by the shaper."); +/* */ +/* */ } +/* 1597 */ else if ((val != 0) && (val != 3) && (val != 5)) { +/* 1598 */ Console.println("0 = default (chooses 2 or 3 for you)"); +/* 1599 */ Console.println("2 = static (stored in .world)"); +/* 1600 */ Console.println("3 = forwarded static"); +/* 1601 */ Console.println("4 = dynamic (stored only on server)"); +/* 1602 */ Console.println("5 = forwarded dynamic"); +/* 1603 */ Console.println("Modes 2, and 4, are not generally\nsupported, except that mode 2\nis required for Rooms"); +/* */ +/* */ } +/* 1606 */ else if ((val == 5) && (getSourceURL() == null)) { +/* 1607 */ Console.println("Only WObjects read from files may be forwarded dynamic."); +/* */ } +/* */ else { +/* 1610 */ getSharer().setMode(val); +/* */ } } +/* 1612 */ break; +/* */ +/* */ case 6: +/* 1615 */ if (mode == 0) { +/* 1616 */ ret = PropAdder.make(new VectorProperty(this, index, +/* 1617 */ "Shared Attributes")); +/* 1618 */ } else if (mode == 1) { +/* 1619 */ if (this._sharer != null) { +/* 1620 */ ret = this._sharer.getAttributesList(); +/* */ } else +/* 1622 */ ret = new Vector(); +/* 1623 */ } else if (mode == 4) { +/* 1624 */ removeShareableAttribute((Attribute)value); +/* 1625 */ } else if (mode == 3) { +/* 1626 */ addShareableAttribute((Attribute)value); +/* 1627 */ } else if ((mode == 5) && ((value instanceof Attribute))) +/* 1628 */ ret = value; +/* 1629 */ break; +/* */ case 7: +/* 1631 */ if (mode == 0) { +/* 1632 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 1633 */ "Tool Tip Text")); +/* */ } +/* 1635 */ else if (mode == 1) { +/* 1636 */ ret = getToolTipText(); +/* 1637 */ } else if (mode == 2) { +/* 1638 */ setToolTipText((String)value); +/* */ } +/* 1640 */ break; +/* */ case 8: +/* 1642 */ if (mode == 0) { +/* 1643 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1644 */ "Mouse Change"), "No", "Yes"); +/* 1645 */ } else if (mode == 1) { +/* 1646 */ ret = new Boolean(getMouseOver()); +/* 1647 */ } else if (mode == 2) { +/* 1648 */ setMouseOver(((Boolean)value).booleanValue()); +/* */ } +/* 1650 */ break; +/* */ +/* */ default: +/* 1653 */ ret = super.properties(index, offset + 9, mode, value); +/* */ } +/* */ +/* 1656 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* 1661 */ private static Object classCookie = new Object(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void saveUnsharedWObjects(Saver s, Vector v) +/* */ throws IOException +/* */ { +/* 1671 */ int length = 0; +/* 1672 */ for (Enumeration en = v.elements(); en.hasMoreElements();) { +/* 1673 */ WObject w = (WObject)en.nextElement(); +/* 1674 */ if (((w instanceof Persister)) && (!(w instanceof NonPersister)) && +/* 1675 */ (!w.isDynamic())) { +/* 1676 */ length++; +/* */ } +/* */ } +/* 1679 */ s.saveInt(length); +/* 1680 */ for (Enumeration en = v.elements(); en.hasMoreElements();) { +/* 1681 */ WObject w = (WObject)en.nextElement(); +/* 1682 */ if (((w instanceof Persister)) && (!(w instanceof NonPersister)) && +/* 1683 */ (!w.isDynamic())) { +/* 1684 */ s.save(w); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void saveState(Saver s) throws IOException { +/* 1690 */ s.saveVersion(10, classCookie); +/* 1691 */ super.saveState(s); +/* */ +/* 1693 */ s.saveInt(this.flags & 0xFF7F); +/* */ +/* */ +/* 1696 */ if (this.contents == null) { +/* 1697 */ s.saveBoolean(false); +/* */ } else { +/* 1699 */ s.saveBoolean(true); +/* 1700 */ saveUnsharedWObjects(s, this.contents); +/* */ } +/* */ +/* 1703 */ s.saveVectorMaybeNull(this.eventHandlers); +/* 1704 */ s.saveVectorMaybeNull(this.actions); +/* 1705 */ s.saveMaybeNull(this.bumpCalc); +/* */ +/* */ +/* 1708 */ if ((this._sharer != null) && (this._sharer.isEmpty())) { +/* 1709 */ s.saveMaybeNull(null); +/* */ } else { +/* 1711 */ s.saveMaybeNull(this._sharer); +/* */ } +/* 1713 */ s.saveString(getToolTipText()); +/* 1714 */ s.saveBoolean(getMouseOver()); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 1719 */ restoreWObjectState(r); +/* */ } +/* */ +/* */ public void restoreWObjectState(Restorer r) throws IOException, TooNewException +/* */ { +/* 1724 */ Vector newContents = null; +/* 1725 */ Vector newActions = null; +/* 1726 */ Vector newHandlers = null; +/* */ +/* */ +/* */ +/* 1730 */ int vers = r.restoreVersion(classCookie); +/* 1731 */ switch (vers) { +/* */ case 0: +/* 1733 */ r.setOldFlag(); +/* 1734 */ super.restoreState(r); +/* */ +/* 1736 */ this.flags = r.restoreInt(); +/* 1737 */ r.restoreMaybeNull(); +/* 1738 */ this.flags |= 0x4000; +/* */ +/* 1740 */ newContents = r.restoreVectorMaybeNull(); +/* 1741 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1742 */ newActions = new Vector(); +/* 1743 */ break; +/* */ case 1: +/* 1745 */ r.setOldFlag(); +/* 1746 */ super.restoreState(r); +/* */ +/* 1748 */ this.flags = r.restoreInt(); +/* 1749 */ r.restoreMaybeNull(); +/* 1750 */ this.flags |= 0x4000; +/* */ +/* 1752 */ newContents = r.restoreVectorMaybeNull(); +/* 1753 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1754 */ newActions = r.restoreVectorMaybeNull(); +/* 1755 */ break; +/* */ case 2: +/* 1757 */ r.setOldFlag(); +/* 1758 */ super.restoreState(r); +/* 1759 */ this.flags = (r.restoreInt() | 0x4000); +/* 1760 */ newContents = r.restoreVectorMaybeNull(); +/* 1761 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1762 */ newActions = r.restoreVectorMaybeNull(); +/* 1763 */ break; +/* */ case 3: +/* 1765 */ super.restoreState(r); +/* 1766 */ this.flags = (r.restoreInt() | 0x4000); +/* 1767 */ newContents = r.restoreVectorMaybeNull(); +/* 1768 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1769 */ newActions = r.restoreVectorMaybeNull(); +/* 1770 */ r.restore(); +/* 1771 */ break; +/* */ case 4: +/* 1773 */ super.restoreState(r); +/* 1774 */ this.flags = (r.restoreInt() | 0x4000); +/* 1775 */ newContents = r.restoreVectorMaybeNull(); +/* 1776 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1777 */ newActions = r.restoreVectorMaybeNull(); +/* 1778 */ r.restore(); +/* 1779 */ this._sharer = ((Sharer)r.restoreMaybeNull()); +/* 1780 */ break; +/* */ case 5: +/* */ case 7: +/* */ case 8: +/* 1784 */ super.restoreState(r); +/* 1785 */ this.flags = (r.restoreInt() | 0x4000); +/* 1786 */ newContents = r.restoreVectorMaybeNull(); +/* 1787 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1788 */ newActions = r.restoreVectorMaybeNull(); +/* 1789 */ setBumpCalc((BumpCalc)r.restoreMaybeNull()); +/* 1790 */ this._sharer = ((Sharer)r.restoreMaybeNull()); +/* 1791 */ break; +/* */ case 9: +/* 1793 */ super.restoreState(r); +/* 1794 */ this.flags = (r.restoreInt() | 0x4000); +/* 1795 */ newContents = r.restoreVectorMaybeNull(); +/* 1796 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1797 */ newActions = r.restoreVectorMaybeNull(); +/* 1798 */ setBumpCalc((BumpCalc)r.restoreMaybeNull()); +/* 1799 */ this._sharer = ((Sharer)r.restoreMaybeNull()); +/* 1800 */ setToolTipText(r.restoreString()); +/* 1801 */ break; +/* */ case 10: +/* */ try { +/* 1804 */ super.restoreState(r); +/* 1805 */ this.flags = (r.restoreInt() | 0x4000); +/* 1806 */ newContents = r.restoreVectorMaybeNull(); +/* 1807 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1808 */ newActions = r.restoreVectorMaybeNull(); +/* 1809 */ setBumpCalc((BumpCalc)r.restoreMaybeNull()); +/* 1810 */ this._sharer = ((Sharer)r.restoreMaybeNull()); +/* */ +/* */ +/* 1813 */ setToolTipText(null); +/* 1814 */ if (!r.restoreBoolean()) { +/* 1815 */ short len = r.restoreShort(); +/* 1816 */ for (int i = 0; i < len; i++) { +/* 1817 */ r.restoreByte(); +/* */ } +/* */ } +/* */ +/* 1821 */ setMouseOver(r.restoreBoolean()); +/* */ } catch (Exception ex) { +/* 1823 */ Debug.LogDebug(ex.toString()); +/* 1824 */ Debug.LogDebug(ex.getMessage()); +/* 1825 */ ex.printStackTrace(); +/* */ +/* */ +/* 1828 */ Debug.LogDebug("error: " + toString()); +/* 1829 */ Debug.LogDebug("location: " + ((DataInputStream)r.is).available()); +/* 1830 */ Class aClass = getClass(); +/* 1831 */ Field[] fields = aClass.getFields(); +/* */ Field[] arrayOfField1; +/* 1833 */ int j = (arrayOfField1 = fields).length; for (int i = 0; i < j; i++) { Field field = arrayOfField1[i]; +/* */ try { +/* 1835 */ Debug.LogDebug(field.toString()); +/* 1836 */ if (field.get(this) != null) { +/* 1837 */ Debug.LogDebug(" : " + field.get(this).toString()); +/* */ } +/* */ } +/* */ catch (IllegalArgumentException e) { +/* 1841 */ e.printStackTrace(); +/* */ } +/* */ catch (IllegalAccessException e) { +/* 1844 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ try +/* */ { +/* 1850 */ throw ex; +/* */ } +/* */ catch (Exception e) { +/* 1853 */ e.printStackTrace(); +/* */ } +/* */ } +/* */ +/* */ case 6: +/* 1858 */ super.restoreState(r); +/* 1859 */ this.flags = (r.restoreInt() | 0x4000); +/* 1860 */ newContents = r.restoreVectorMaybeNull(); +/* 1861 */ newHandlers = r.restoreVectorMaybeNull(); +/* 1862 */ newActions = r.restoreVectorMaybeNull(); +/* 1863 */ setBumpCalc((BumpCalc)r.restoreMaybeNull()); +/* 1864 */ this._sharer = ((Sharer)r.restoreMaybeNull()); +/* 1865 */ r.restoreString(); +/* 1866 */ break; +/* */ default: +/* 1868 */ throw new TooNewException(); +/* */ } +/* */ +/* 1871 */ if (vers < 8) { +/* 1872 */ this.flags &= 0xFFFFFFBF; +/* */ } +/* 1874 */ if (newContents != null) { +/* 1875 */ for (int i = 0; i < newContents.size(); i++) +/* 1876 */ add((WObject)newContents.elementAt(i)); +/* */ } +/* 1878 */ if (newActions != null) { +/* 1879 */ for (int i = 0; i < newActions.size(); i++) +/* 1880 */ addAction((Action)newActions.elementAt(i)); +/* */ } +/* 1882 */ if (newHandlers != null) { +/* 1883 */ for (int i = 0; i < newHandlers.size(); i++) +/* 1884 */ addHandler((SuperRoot)newHandlers.elementAt(i)); +/* */ } +/* 1886 */ if (this._sharer != null) +/* 1887 */ super.add(this._sharer); +/* */ } +/* */ +/* 1890 */ public static boolean replaceWithMontyDoor = IniFile.gamma().getIniInt( +/* 1891 */ "replaceWithMontyDoor", 0) != 0; +/* */ +/* */ public void postRestore(int version) +/* */ { +/* 1895 */ super.postRestore(version); +/* */ +/* */ +/* */ +/* 1899 */ if (version < 7) { +/* 1900 */ for (Enumeration en = getHandlers(); en.hasMoreElements();) { +/* 1901 */ SuperRoot h = (SuperRoot)en.nextElement(); +/* 1902 */ if (h.getOwner() != this) { +/* 1903 */ SuperRoot newH = (SuperRoot)h.clone(); +/* */ +/* */ +/* 1906 */ this.eventHandlers.removeElement(h); +/* 1907 */ if (this.eventHandlers.size() == 0) +/* 1908 */ this.eventHandlers = null; +/* 1909 */ if ((this.clumpID != 0) && ((h instanceof FrameHandler))) { +/* 1910 */ getRoomFromClump().removeFrameHandler((FrameHandler)h, +/* 1911 */ this); +/* */ } +/* */ +/* 1914 */ addHandler(newH); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 1921 */ if ((replaceWithMontyDoor) && (getClass() == WObject.class)) { +/* 1922 */ replaceMonty(); +/* */ } +/* 1924 */ if (this._sharer != null) { +/* 1925 */ this._sharer.ownerPostRestore(); +/* */ } +/* 1927 */ this.flags &= 0xBFFF; +/* 1928 */ if (isDynamic()) { +/* 1929 */ getSharer(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void replaceMonty() +/* */ { +/* 1951 */ if ((this.actions == null) || (this.actions.size() != 3) || +/* 1952 */ (!(getOwner() instanceof WObject))) { +/* 1953 */ return; +/* */ } +/* 1955 */ int stage = 0; +/* */ try { +/* 1957 */ if (!(this.actions.elementAt(0) instanceof SetURLAction)) +/* 1958 */ return; +/* 1959 */ SetURLAction sua = (SetURLAction)this.actions.elementAt(0); +/* 1960 */ if ((!sua._propName.equals("File")) || (sua._roomName == null)) +/* 1961 */ return; +/* 1962 */ stage = 1; +/* */ +/* 1964 */ Object db = this.actions.elementAt(1); +/* 1965 */ Object cancel = this.actions.elementAt(2); +/* 1966 */ if ((!(db instanceof DialogAction)) || +/* 1967 */ (cancel.getClass() != db.getClass()) || +/* 1968 */ (((DialogAction)cancel).cancelOnly == ((DialogAction)db).cancelOnly)) +/* 1969 */ return; +/* 1970 */ if (((DialogAction)db).cancelOnly) +/* 1971 */ db = cancel; +/* 1972 */ stage = 2; +/* */ +/* 1974 */ if (!(this.actions.elementAt(0) instanceof SetURLAction)) +/* 1975 */ return; +/* 1976 */ stage = 3; +/* */ +/* 1978 */ if ((this.contents == null) || (this.contents.size() < 2) || (this.contents.size() > 3) || +/* 1979 */ (((WObject)this.contents.elementAt(0)).getClass() != Rect.class) || +/* 1980 */ (((WObject)this.contents.elementAt(1)).getClass() != Portal.class)) +/* 1981 */ return; +/* 1982 */ stage = 4; +/* */ +/* 1984 */ boolean isTwoPart = this.contents.size() == 3; +/* */ +/* 1986 */ Rect top = (Rect)this.contents.elementAt(0); +/* 1987 */ Portal port = (Portal)this.contents.elementAt(1); +/* 1988 */ Rect bottom = null; +/* */ +/* 1990 */ if (isTwoPart) { +/* 1991 */ if (((WObject)this.contents.elementAt(2)).getClass() != Rect.class) +/* 1992 */ return; +/* 1993 */ bottom = (Rect)this.contents.elementAt(2); +/* */ } +/* 1995 */ stage = 5; +/* */ +/* 1997 */ if ((top.eventHandlers == null) || +/* 1998 */ (top.eventHandlers.size() != 1) || +/* 1999 */ (top.eventHandlers.elementAt(0).getClass() != ClickSensor.class)) +/* 2000 */ return; +/* 2001 */ stage = 6; +/* */ +/* 2003 */ ClickSensor cs = (ClickSensor)top.eventHandlers.elementAt(0); +/* 2004 */ if (cs.countActions() != 1) +/* 2005 */ return; +/* 2006 */ stage = 7; +/* */ +/* 2008 */ if ((top.actions == null) || +/* 2009 */ (top.actions.size() != 3) || +/* 2010 */ (((Action)top.actions.elementAt(2)).getClass() != SequenceAction.class)) +/* 2011 */ return; +/* 2012 */ stage = 8; +/* */ +/* 2014 */ SequenceAction seq = (SequenceAction)top.actions.elementAt(2); +/* 2015 */ if (seq.actions != null) { +/* 2016 */ if (seq.actions.size() == (isTwoPart ? 9 : 7)) {} +/* 2017 */ } else return; +/* 2018 */ stage = 9; +/* */ +/* 2020 */ if ((port.actions == null) || (port.actions.size() != 2) || +/* 2021 */ (port._farSideRoomName == null) || +/* 2022 */ (port._farSidePortalName == null)) +/* 2023 */ return; +/* 2024 */ stage = 10; +/* */ +/* 2026 */ URL texture = (isTwoPart ? bottom : top).getMaterial().textureName; +/* 2027 */ if (texture == null) +/* 2028 */ return; +/* 2029 */ stage = 11; +/* */ +/* 2031 */ MontyDoor md = new MontyDoor(); +/* */ +/* 2033 */ md.setsAvatar = (db instanceof SelectAvatarAction); +/* 2034 */ if (!md.setsAvatar) { +/* 2035 */ if (!(db instanceof SendURLAction)) { +/* 2036 */ return; +/* */ } +/* 2038 */ md.description = ((SendURLAction)db).description; +/* 2039 */ md.url = ((SendURLAction)db).destination; +/* */ } else { +/* 2041 */ md.url = ((SelectAvatarAction)db).url; } +/* 2042 */ stage = 12; +/* */ +/* 2044 */ md.viewURL = sua._value; +/* 2045 */ md.viewName = sua._targetName; +/* 2046 */ md.setFarSideInfo(null, sua._roomName, port._farSidePortalName); +/* */ +/* 2048 */ md.post(port); +/* 2049 */ md.post(this); +/* */ +/* 2051 */ String texName = texture.getInternal(); +/* 2052 */ if (isTwoPart) { +/* 2053 */ if (texName.endsWith("b.cmp")) { +/* 2054 */ int len = texName.length(); +/* 2055 */ texName = texName.substring(0, len - 5) + "m2v*.mov"; +/* */ } else { +/* 2057 */ Console.println("Texture: " + texName); +/* 2058 */ return; +/* */ } +/* */ } +/* 2061 */ stage = 13; +/* 2062 */ md.setMaterial(new Material(URL.make(texName))); +/* */ +/* 2064 */ ((WObject)getOwner()).add(md); +/* 2065 */ detach(); +/* 2066 */ port.detach(); +/* */ +/* 2068 */ md.reset(); +/* 2069 */ stage = 100; +/* */ } finally { +/* 2071 */ if (stage != 100) { +/* 2072 */ Console.println( +/* 2073 */ "Failed MontyDoor conversion of " + getName() + " in stage " + stage + ".\n"); +/* */ } +/* */ } +/* 2071 */ if (stage != 100) { +/* 2072 */ Console.println( +/* 2073 */ "Failed MontyDoor conversion of " + getName() + " in stage " + stage + ".\n"); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 2081 */ String base = getName(); +/* */ +/* 2083 */ if (!isActive()) { +/* 2084 */ base = base + "(inactive)"; +/* */ } +/* 2086 */ base = base + toTransformSubstring(); +/* */ +/* 2088 */ if (this.contents == null) { +/* 2089 */ return base; +/* */ } +/* 2091 */ return base + this.contents.toString(); +/* */ } +/* */ +/* */ public static String getSaveExtension() +/* */ { +/* 2096 */ return "wob"; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WObject getServed() +/* */ { +/* 2107 */ int mode = getSharerMode(); +/* 2108 */ if (mode == 0) { +/* 2109 */ Sharer s = getSharer(); +/* 2110 */ if (s != null) { +/* 2111 */ mode = s.getMode(); +/* */ } +/* */ } +/* */ +/* 2115 */ if ((mode & 0x1) == 0) +/* */ { +/* */ +/* */ +/* 2119 */ return this; +/* */ } +/* */ +/* 2122 */ SuperRoot r = getOwner(); +/* 2123 */ if ((r != null) && ((r instanceof WObject))) { +/* 2124 */ return ((WObject)r).getServed(); +/* */ } +/* 2126 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void prerender(Camera cam) +/* */ { +/* 2136 */ WorldScriptManager.getInstance().onPrerender(this, cam); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public WorldServer getServer() +/* */ { +/* 2144 */ WObject wo = getServed(); +/* */ NetworkObject no; +/* 2146 */ NetworkObject no; if ((wo instanceof Room)) { +/* 2147 */ no = ((Room)wo).getNetworkRoom(); +/* */ } else { +/* 2149 */ no = (NetworkObject)wo; +/* */ } +/* */ +/* 2152 */ if (no == null) { +/* 2153 */ return null; +/* */ } +/* */ +/* 2156 */ assert (no != this); +/* */ +/* 2158 */ return no.getServer(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 2173 */ private Sharer _sharer = null; +/* */ +/* */ +/* */ public VisiAttribute _visibilityAttribute; +/* */ +/* */ +/* */ public TransAttribute _transformAttribute; +/* */ +/* */ public BumpAttribute _bumpableAttribute; +/* */ +/* */ +/* */ public Enumeration getAttributes() +/* */ { +/* 2186 */ return getSharer().getAttributes(); +/* */ } +/* */ +/* */ public Sharer getSharer() { +/* 2190 */ if (this._sharer == null) +/* */ { +/* 2192 */ assert ((this.flags & 0x4000) == 0); +/* */ +/* 2194 */ this._sharer = new Sharer(); +/* 2195 */ super.add(this._sharer); +/* */ } +/* 2197 */ return this._sharer; +/* */ } +/* */ +/* */ public boolean hasSharer() { +/* 2201 */ return this._sharer != null; +/* */ } +/* */ +/* */ public Attribute getAttribute(int attrID) { +/* 2205 */ return getSharer().getAttribute(attrID); +/* */ } +/* */ +/* */ public int addAttribute(Attribute a) { +/* 2209 */ return getSharer().addAttribute(a); +/* */ } +/* */ +/* */ public int addShareableAttribute(Attribute a) +/* */ { +/* 2214 */ return addAttribute(a); +/* */ } +/* */ +/* */ public void removeAttribute(Attribute a) { +/* 2218 */ getSharer().removeAttribute(a); +/* */ } +/* */ +/* */ public void removeShareableAttribute(Attribute a) +/* */ { +/* 2223 */ removeAttribute(a); +/* */ } +/* */ +/* */ public boolean isShared() { +/* 2227 */ return this._sharer != null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean acceptsLeftClicks() +/* */ { +/* 2237 */ return getMouseOver(); +/* */ } +/* */ +/* */ +/* */ public void releaseAuxilaryData() +/* */ { +/* 2243 */ if (this._sharer != null) { +/* 2244 */ this._sharer.releaseAuxilaryData(); +/* */ } +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ native void createClump(); +/* */ +/* */ public native boolean nativeInCamSpace(Camera paramCamera, Point3Temp paramPoint3Temp); +/* */ +/* */ protected native void voidClump(); +/* */ +/* */ protected native int extractClump(); +/* */ +/* */ native void addChildToClump(WObject paramWObject); +/* */ +/* */ native void setClumpMatrix(); +/* */ +/* */ private native void initClumpData(); +/* */ +/* */ native void doneWithEditing(); +/* */ +/* */ native int getNumVerts(); +/* */ +/* */ private native Transform getObjectToWorldMatrix(Transform paramTransform); +/* */ +/* */ protected native Transform getJointedObjectToWorldMatrix(Transform paramTransform); +/* */ +/* */ public native void updateHighlight(); +/* */ +/* */ public native void getClumpBBox(Point3Temp paramPoint3Temp1, Point3Temp paramPoint3Temp2); +/* */ +/* */ protected native void updateVisible(); +/* */ +/* */ public native Room getRoomFromClump(); +/* */ +/* */ public native boolean inRoomContents(); +/* */ +/* */ public native float getClumpMinXYExtent(); +/* */ +/* */ /* Error */ +/* */ public void moveThrough(Point3Temp motion) +/* */ { +/* */ // Byte code: +/* */ // 0: aload_0 +/* */ // 1: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 4: ifnull +10 -> 14 +/* */ // 7: aload_0 +/* */ // 8: invokevirtual 705 NET/worlds/scape/WObject:getBumpable ()Z +/* */ // 11: ifne +10 -> 21 +/* */ // 14: aload_0 +/* */ // 15: aload_1 +/* */ // 16: invokevirtual 726 NET/worlds/scape/WObject:moveBy (LNET/worlds/scape/Point3Temp;)LNET/worlds/scape/Transform; +/* */ // 19: pop +/* */ // 20: return +/* */ // 21: aload_0 +/* */ // 22: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 25: invokevirtual 730 NET/worlds/scape/Room:hasClump ()Z +/* */ // 28: ifne +4 -> 32 +/* */ // 31: return +/* */ // 32: invokestatic 731 NET/worlds/core/Std:getRealTime ()I +/* */ // 35: istore_2 +/* */ // 36: aload_0 +/* */ // 37: astore_3 +/* */ // 38: iconst_4 +/* */ // 39: istore 4 +/* */ // 41: goto +293 -> 334 +/* */ // 44: iload_2 +/* */ // 45: aload_3 +/* */ // 46: aload_1 +/* */ // 47: invokestatic 736 NET/worlds/scape/BumpEventTemp:make (ILNET/worlds/scape/WObject;LNET/worlds/scape/Point3Temp;)LNET/worlds/scape/BumpEventTemp; +/* */ // 50: astore 5 +/* */ // 52: aload 5 +/* */ // 54: getfield 739 NET/worlds/scape/BumpEventTemp:target LNET/worlds/scape/WObject; +/* */ // 57: ifnonnull +21 -> 78 +/* */ // 60: aload_3 +/* */ // 61: aload 5 +/* */ // 63: getfield 742 NET/worlds/scape/BumpEventTemp:fullPath LNET/worlds/scape/Point3Temp; +/* */ // 66: invokevirtual 726 NET/worlds/scape/WObject:moveBy (LNET/worlds/scape/Point3Temp;)LNET/worlds/scape/Transform; +/* */ // 69: pop +/* */ // 70: aload 5 +/* */ // 72: invokevirtual 745 NET/worlds/scape/BumpEventTemp:recycle ()V +/* */ // 75: goto +264 -> 339 +/* */ // 78: aload 5 +/* */ // 80: aload_3 +/* */ // 81: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 84: putfield 746 NET/worlds/scape/BumpEventTemp:postBumpRoom LNET/worlds/scape/Room; +/* */ // 87: aload 5 +/* */ // 89: aload_3 +/* */ // 90: invokevirtual 450 NET/worlds/scape/WObject:getObjectToWorldMatrix ()LNET/worlds/scape/Transform; +/* */ // 93: aload 5 +/* */ // 95: getfield 749 NET/worlds/scape/BumpEventTemp:path LNET/worlds/scape/Point3Temp; +/* */ // 98: invokevirtual 752 NET/worlds/scape/Transform:moveBy (LNET/worlds/scape/Point3Temp;)LNET/worlds/scape/Transform; +/* */ // 101: putfield 753 NET/worlds/scape/BumpEventTemp:postBumpPosition LNET/worlds/scape/Transform; +/* */ // 104: aload 5 +/* */ // 106: aload 5 +/* */ // 108: getfield 742 NET/worlds/scape/BumpEventTemp:fullPath LNET/worlds/scape/Point3Temp; +/* */ // 111: invokestatic 715 NET/worlds/scape/Point3Temp:make (LNET/worlds/scape/Point3Temp;)LNET/worlds/scape/Point3Temp; +/* */ // 114: fconst_1 +/* */ // 115: aload 5 +/* */ // 117: getfield 756 NET/worlds/scape/BumpEventTemp:fraction F +/* */ // 120: fsub +/* */ // 121: invokevirtual 759 NET/worlds/scape/Point3Temp:times (F)LNET/worlds/scape/Point3Temp; +/* */ // 124: putfield 762 NET/worlds/scape/BumpEventTemp:postBumpPath LNET/worlds/scape/Point3Temp; +/* */ // 127: aload_3 +/* */ // 128: invokevirtual 447 NET/worlds/scape/WObject:getTransform ()LNET/worlds/scape/Transform; +/* */ // 131: astore 6 +/* */ // 133: aload_0 +/* */ // 134: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 137: astore 7 +/* */ // 139: aload 5 +/* */ // 141: getfield 739 NET/worlds/scape/BumpEventTemp:target LNET/worlds/scape/WObject; +/* */ // 144: aload 5 +/* */ // 146: invokevirtual 554 NET/worlds/scape/WObject:deliver (LNET/worlds/scape/Event;)Z +/* */ // 149: pop +/* */ // 150: aload_3 +/* */ // 151: aload 5 +/* */ // 153: invokevirtual 554 NET/worlds/scape/WObject:deliver (LNET/worlds/scape/Event;)Z +/* */ // 156: pop +/* */ // 157: aload_3 +/* */ // 158: aload 6 +/* */ // 160: invokevirtual 765 NET/worlds/scape/WObject:isTransformEqual (LNET/worlds/scape/Transform;)Z +/* */ // 163: ifeq +12 -> 175 +/* */ // 166: aload 7 +/* */ // 168: aload_0 +/* */ // 169: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 172: if_acmpeq +26 -> 198 +/* */ // 175: aload 6 +/* */ // 177: invokevirtual 455 NET/worlds/scape/Transform:recycle ()V +/* */ // 180: aload 5 +/* */ // 182: invokevirtual 745 NET/worlds/scape/BumpEventTemp:recycle ()V +/* */ // 185: goto +154 -> 339 +/* */ // 188: astore 8 +/* */ // 190: aload 6 +/* */ // 192: invokevirtual 455 NET/worlds/scape/Transform:recycle ()V +/* */ // 195: aload 8 +/* */ // 197: athrow +/* */ // 198: aload 6 +/* */ // 200: invokevirtual 455 NET/worlds/scape/Transform:recycle ()V +/* */ // 203: aload 5 +/* */ // 205: getfield 746 NET/worlds/scape/BumpEventTemp:postBumpRoom LNET/worlds/scape/Room; +/* */ // 208: invokevirtual 769 NET/worlds/scape/Room:getObjectToWorldMatrix ()LNET/worlds/scape/Transform; +/* */ // 211: astore 7 +/* */ // 213: aload 7 +/* */ // 215: invokevirtual 770 NET/worlds/scape/Transform:invert ()LNET/worlds/scape/Transform; +/* */ // 218: pop +/* */ // 219: aload_3 +/* */ // 220: invokevirtual 414 NET/worlds/scape/WObject:getRoom ()LNET/worlds/scape/Room; +/* */ // 223: aload 5 +/* */ // 225: getfield 746 NET/worlds/scape/BumpEventTemp:postBumpRoom LNET/worlds/scape/Room; +/* */ // 228: if_acmpeq +38 -> 266 +/* */ // 231: aload 7 +/* */ // 233: aload 5 +/* */ // 235: getfield 753 NET/worlds/scape/BumpEventTemp:postBumpPosition LNET/worlds/scape/Transform; +/* */ // 238: invokevirtual 773 NET/worlds/scape/Transform:pre (LNET/worlds/scape/Transform;)LNET/worlds/scape/Transform; +/* */ // 241: pop +/* */ // 242: aload_3 +/* */ // 243: aload 5 +/* */ // 245: getfield 746 NET/worlds/scape/BumpEventTemp:postBumpRoom LNET/worlds/scape/Room; +/* */ // 248: aload 7 +/* */ // 250: invokevirtual 776 NET/worlds/scape/WObject:changeRoom (LNET/worlds/scape/Room;LNET/worlds/scape/Transform;)LNET/worlds/scape/WObject; +/* */ // 253: astore_3 +/* */ // 254: aload_3 +/* */ // 255: ifnonnull +33 -> 288 +/* */ // 258: aload 5 +/* */ // 260: invokevirtual 745 NET/worlds/scape/BumpEventTemp:recycle ()V +/* */ // 263: goto +76 -> 339 +/* */ // 266: aload_3 +/* */ // 267: invokevirtual 780 NET/worlds/scape/WObject:makeIdentity ()LNET/worlds/scape/Transform; +/* */ // 270: pop +/* */ // 271: aload_3 +/* */ // 272: aload 7 +/* */ // 274: invokevirtual 783 NET/worlds/scape/WObject:pre (LNET/worlds/scape/Transform;)LNET/worlds/scape/Transform; +/* */ // 277: pop +/* */ // 278: aload_3 +/* */ // 279: aload 5 +/* */ // 281: getfield 753 NET/worlds/scape/BumpEventTemp:postBumpPosition LNET/worlds/scape/Transform; +/* */ // 284: invokevirtual 783 NET/worlds/scape/WObject:pre (LNET/worlds/scape/Transform;)LNET/worlds/scape/Transform; +/* */ // 287: pop +/* */ // 288: aload 5 +/* */ // 290: getfield 753 NET/worlds/scape/BumpEventTemp:postBumpPosition LNET/worlds/scape/Transform; +/* */ // 293: invokevirtual 455 NET/worlds/scape/Transform:recycle ()V +/* */ // 296: aload 5 +/* */ // 298: aconst_null +/* */ // 299: putfield 753 NET/worlds/scape/BumpEventTemp:postBumpPosition LNET/worlds/scape/Transform; +/* */ // 302: aload 7 +/* */ // 304: invokevirtual 455 NET/worlds/scape/Transform:recycle ()V +/* */ // 307: aload 5 +/* */ // 309: getfield 762 NET/worlds/scape/BumpEventTemp:postBumpPath LNET/worlds/scape/Point3Temp; +/* */ // 312: astore_1 +/* */ // 313: goto +13 -> 326 +/* */ // 316: astore 9 +/* */ // 318: aload 5 +/* */ // 320: invokevirtual 745 NET/worlds/scape/BumpEventTemp:recycle ()V +/* */ // 323: aload 9 +/* */ // 325: athrow +/* */ // 326: aload 5 +/* */ // 328: invokevirtual 745 NET/worlds/scape/BumpEventTemp:recycle ()V +/* */ // 331: iinc 4 -1 +/* */ // 334: iload 4 +/* */ // 336: ifgt -292 -> 44 +/* */ // 339: return +/* */ // Line number table: +/* */ // Java source line #1405 -> byte code offset #0 +/* */ // Java source line #1406 -> byte code offset #14 +/* */ // Java source line #1407 -> byte code offset #20 +/* */ // Java source line #1412 -> byte code offset #21 +/* */ // Java source line #1413 -> byte code offset #31 +/* */ // Java source line #1415 -> byte code offset #32 +/* */ // Java source line #1419 -> byte code offset #36 +/* */ // Java source line #1421 -> byte code offset #38 +/* */ // Java source line #1425 -> byte code offset #44 +/* */ // Java source line #1428 -> byte code offset #52 +/* */ // Java source line #1429 -> byte code offset #60 +/* */ // Java source line #1480 -> byte code offset #70 +/* */ // Java source line #1430 -> byte code offset #75 +/* */ // Java source line #1433 -> byte code offset #78 +/* */ // Java source line #1434 -> byte code offset #87 +/* */ // Java source line #1435 -> byte code offset #93 +/* */ // Java source line #1434 -> byte code offset #98 +/* */ // Java source line #1436 -> byte code offset #104 +/* */ // Java source line #1437 -> byte code offset #114 +/* */ // Java source line #1436 -> byte code offset #121 +/* */ // Java source line #1439 -> byte code offset #127 +/* */ // Java source line #1441 -> byte code offset #133 +/* */ // Java source line #1443 -> byte code offset #139 +/* */ // Java source line #1444 -> byte code offset #150 +/* */ // Java source line #1447 -> byte code offset #157 +/* */ // Java source line #1450 -> byte code offset #175 +/* */ // Java source line #1480 -> byte code offset #180 +/* */ // Java source line #1448 -> byte code offset #185 +/* */ // Java source line #1449 -> byte code offset #188 +/* */ // Java source line #1450 -> byte code offset #190 +/* */ // Java source line #1451 -> byte code offset #195 +/* */ // Java source line #1450 -> byte code offset #198 +/* */ // Java source line #1458 -> byte code offset #203 +/* */ // Java source line #1459 -> byte code offset #213 +/* */ // Java source line #1460 -> byte code offset #219 +/* */ // Java source line #1461 -> byte code offset #231 +/* */ // Java source line #1462 -> byte code offset #242 +/* */ // Java source line #1465 -> byte code offset #254 +/* */ // Java source line #1480 -> byte code offset #258 +/* */ // Java source line #1466 -> byte code offset #263 +/* */ // Java source line #1468 -> byte code offset #266 +/* */ // Java source line #1469 -> byte code offset #271 +/* */ // Java source line #1470 -> byte code offset #278 +/* */ // Java source line #1472 -> byte code offset #288 +/* */ // Java source line #1473 -> byte code offset #296 +/* */ // Java source line #1474 -> byte code offset #302 +/* */ // Java source line #1477 -> byte code offset #307 +/* */ // Java source line #1479 -> byte code offset #313 +/* */ // Java source line #1480 -> byte code offset #318 +/* */ // Java source line #1481 -> byte code offset #323 +/* */ // Java source line #1480 -> byte code offset #326 +/* */ // Java source line #1421 -> byte code offset #331 +/* */ // Java source line #1483 -> byte code offset #339 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 340 0 this WObject +/* */ // 0 340 1 motion Point3Temp +/* */ // 35 10 2 now int +/* */ // 37 242 3 me WObject +/* */ // 39 296 4 loopCount int +/* */ // 50 277 5 be BumpEventTemp +/* */ // 131 68 6 t Transform +/* */ // 137 30 7 r Room +/* */ // 211 92 7 invPos Transform +/* */ // 188 8 8 localObject1 Object +/* */ // 316 8 9 localObject2 Object +/* */ // Exception table: +/* */ // from to target type +/* */ // 133 175 188 finally +/* */ // 52 70 316 finally +/* */ // 78 180 316 finally +/* */ // 188 258 316 finally +/* */ // 266 316 316 finally +/* */ } +/* */ +/* */ public void notifyRegister(int wid) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WObject.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WObjectHighlighter.java b/NET/worlds/scape/WObjectHighlighter.java new file mode 100644 index 0000000..e14a183 --- /dev/null +++ b/NET/worlds/scape/WObjectHighlighter.java @@ -0,0 +1,323 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WObjectHighlighter +/* */ implements MainCallback +/* */ { +/* */ private WObject target; +/* */ private Room room; +/* */ private boolean newState; +/* */ private boolean registered; +/* */ +/* */ public WObjectHighlighter(WObject target) +/* */ { +/* 274 */ this.target = target; +/* 275 */ start(); +/* */ } +/* */ +/* */ public synchronized void mainCallback() +/* */ { +/* 280 */ if (this.newState != this.target.getHighlit()) { +/* 281 */ this.target.setHighlit(this.newState); +/* 282 */ if (this.newState) { +/* 283 */ this.room = this.target.getRoom(); +/* 284 */ if (this.room != null) { +/* 285 */ this.room.highlightTarget = this.target; +/* */ } +/* */ } +/* 288 */ else if (this.room != null) { +/* 289 */ this.room.highlightTarget = null; +/* 290 */ this.room = null; +/* */ } +/* */ } +/* */ +/* 294 */ Main.unregister(this); +/* 295 */ this.registered = false; +/* */ } +/* */ +/* */ public synchronized void start() +/* */ { +/* 300 */ this.newState = true; +/* 301 */ registerMe(); +/* */ } +/* */ +/* */ public synchronized void stop() +/* */ { +/* 306 */ this.newState = false; +/* 307 */ registerMe(); +/* */ } +/* */ +/* */ private synchronized void registerMe() +/* */ { +/* 312 */ if (!this.registered) { +/* 313 */ Main.register(this); +/* 314 */ this.registered = true; +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WObjectHighlighter.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WaitAction.java b/NET/worlds/scape/WaitAction.java new file mode 100644 index 0000000..8bdf981 --- /dev/null +++ b/NET/worlds/scape/WaitAction.java @@ -0,0 +1,145 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WaitAction +/* */ extends Action +/* */ { +/* 30 */ float duration = 1.0F; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WaitAction() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WaitAction(float duration) +/* */ { +/* 47 */ this.duration = duration; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event evt, Persister seqID) +/* */ { +/* 56 */ long evttime = 0L; +/* 57 */ if (evt == null) { +/* 58 */ evttime = Std.getFastTime(); +/* */ } else +/* 60 */ evttime = evt.time; +/* 61 */ if (seqID == null) { +/* 62 */ seqID = new WaitActionState(evttime + (1000.0F * this.duration)); +/* */ } +/* 64 */ if (!((WaitActionState)seqID).run(evttime)) { +/* 65 */ seqID = null; +/* */ } +/* 67 */ return seqID; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 77 */ Object ret = null; +/* 78 */ switch (index - offset) { +/* */ case 0: +/* 80 */ if (mode == 0) { +/* 81 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 82 */ "Duration (s)")); +/* 83 */ } else if (mode == 1) { +/* 84 */ ret = new Float(this.duration); +/* 85 */ } else if (mode == 2) +/* 86 */ this.duration = ((Float)value).floatValue(); +/* 87 */ break; +/* */ default: +/* 89 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 91 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 98 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 102 */ s.saveVersion(2, classCookie); +/* 103 */ super.saveState(s); +/* 104 */ s.saveFloat(this.duration); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 110 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 112 */ r.setOldFlag(); +/* 113 */ super.restoreState(r); +/* 114 */ this.duration = r.restoreInt(); +/* 115 */ break; +/* */ case 1: +/* 117 */ r.setOldFlag(); +/* 118 */ super.restoreState(r); +/* 119 */ this.duration = r.restoreFloat(); +/* 120 */ r.restoreLong(); +/* 121 */ break; +/* */ case 2: +/* 123 */ super.restoreState(r); +/* 124 */ this.duration = r.restoreFloat(); +/* 125 */ break; +/* */ default: +/* 127 */ throw new TooNewException(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public String toString() +/* */ { +/* 137 */ return super.toString() + "[" + this.duration + " s]"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WaitAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WaitActionState.java b/NET/worlds/scape/WaitActionState.java new file mode 100644 index 0000000..88f149e --- /dev/null +++ b/NET/worlds/scape/WaitActionState.java @@ -0,0 +1,198 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.Std; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WaitActionState +/* */ implements Persister +/* */ { +/* */ long endTime; +/* */ +/* */ WaitActionState() {} +/* */ +/* */ WaitActionState(long endTime) +/* */ { +/* 155 */ this.endTime = endTime; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean run(long time) +/* */ { +/* 167 */ return time < this.endTime; +/* */ } +/* */ +/* */ +/* */ +/* 172 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 176 */ s.saveVersion(0, classCookie); +/* 177 */ s.saveLong(this.endTime - Std.getFastTime()); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 182 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 184 */ this.endTime = (r.restoreLong() + Std.getFastTime()); +/* 185 */ break; +/* */ default: +/* 187 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ +/* */ public void postRestore(int version) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WaitActionState.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WavSoundPlayer.java b/NET/worlds/scape/WavSoundPlayer.java new file mode 100644 index 0000000..a729709 --- /dev/null +++ b/NET/worlds/scape/WavSoundPlayer.java @@ -0,0 +1,402 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WavSoundPlayer +/* */ extends SoundPlayer +/* */ implements Runnable +/* */ { +/* */ float ang; +/* */ float dist; +/* */ float vol; +/* */ +/* */ public WavSoundPlayer(Sound owner) +/* */ { +/* 34 */ super(owner); +/* */ } +/* */ +/* */ static +/* */ { +/* 39 */ nativeInit(); +/* */ } +/* */ +/* */ public boolean open(float volume, float stopDist, boolean atten, boolean pan) +/* */ { +/* 44 */ return true; +/* */ } +/* */ +/* */ public void close() { +/* 48 */ stop(); +/* */ } +/* */ +/* */ public boolean position(Point3Temp cam, Point3Temp obj, Point3Temp out, Point3Temp up) +/* */ { +/* 53 */ Point3Temp toObj = Point3Temp.make(obj).minus(cam); +/* 54 */ Point3Temp right = Point3Temp.make(out).cross(up); +/* 55 */ float y = toObj.dot(out); +/* 56 */ float x = toObj.dot(right); +/* 57 */ this.ang = ((float)(Math.atan2(y, x) / 3.141592653589793D)); +/* 58 */ this.dist = toObj.length(); +/* */ +/* */ +/* 61 */ return setVolume(this.vol); +/* */ } +/* */ +/* */ public boolean setVolume(float v) { +/* 65 */ this.vol = v; +/* */ +/* 67 */ float leftFrac = 0.5F; +/* 68 */ if ((this.owner != null) && (this.owner.getPanning())) +/* */ { +/* */ +/* 71 */ leftFrac = Math.abs(this.ang); +/* */ +/* */ +/* 74 */ if (this.ang < 0.0F) { +/* 75 */ v = this.vol * (float)(0.5D + Math.abs(0.5D + this.ang)); +/* */ } +/* */ } +/* 78 */ if ((this.owner != null) && (this.owner.getAttenuate())) { +/* 79 */ float stopDist = this.owner.getStopDistance(); +/* 80 */ if (this.dist > stopDist) { +/* 81 */ volume(0.0F, 0.0F); +/* 82 */ return false; +/* */ } +/* */ +/* 85 */ v *= (stopDist - this.dist) / stopDist; +/* */ } +/* */ +/* 88 */ volume(v * leftFrac, v * (1.0F - leftFrac)); +/* 89 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int getState() +/* */ { +/* 98 */ return soundStack.contains(this) ? 0 : 1; +/* */ } +/* */ +/* */ +/* 102 */ private String playingSoundFile = ""; +/* */ +/* */ +/* */ private URL url; +/* */ +/* */ +/* */ +/* */ public void start(URL u) +/* */ { +/* 111 */ this.url = u; +/* 112 */ start(1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 118 */ private static Vector soundStack = new Vector(); +/* */ +/* */ private static Thread activeThread; +/* */ +/* */ int repeatsLeft; +/* */ +/* */ private static int playingThreads; +/* */ private static int systemPaused; +/* */ +/* */ private static WavSoundPlayer getActive() +/* */ { +/* 129 */ if (!soundStack.isEmpty()) +/* 130 */ return (WavSoundPlayer)soundStack.lastElement(); +/* 131 */ return null; +/* */ } +/* */ +/* */ public static boolean isActive() { +/* 135 */ return !soundStack.isEmpty(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void play(int repeatCount, boolean reuseLoop) +/* */ { +/* 146 */ this.playingSoundFile = this.url.unalias(); +/* */ +/* 148 */ soundStack.removeElement(this); +/* 149 */ soundStack.addElement(this); +/* */ +/* 151 */ this.repeatsLeft = repeatCount; +/* 152 */ if (this.repeatsLeft < 0) +/* */ { +/* 154 */ if ((!reuseLoop) && (systemPaused == 0)) +/* 155 */ nativePlay(true); +/* 156 */ activeThread = null; +/* */ } else { +/* 158 */ activeThread = new Thread(this); +/* 159 */ activeThread.start(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void start(int repeatCount) +/* */ { +/* 167 */ synchronized (soundStack) { +/* 168 */ WavSoundPlayer active = getActive(); +/* */ +/* 170 */ assert ((this.repeatsLeft == 0) && (active != this)); +/* 171 */ if (this.owner != null) { +/* 172 */ this.url = this.owner.getURL(); +/* */ } +/* */ +/* */ +/* 176 */ boolean activeWasLoop = activeThread == null; +/* 177 */ boolean reuseLoop = (active != null) && +/* 178 */ (activeWasLoop) && +/* 179 */ (repeatCount < 0) && +/* 180 */ (active.playingSoundFile.equals(this.url.unalias())); +/* */ +/* 182 */ if (active != null) { +/* 183 */ active.stop(reuseLoop); +/* */ +/* */ +/* 186 */ if (activeWasLoop) { +/* 187 */ soundStack.addElement(active); +/* */ } +/* */ } +/* 190 */ play(repeatCount, reuseLoop); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void run() +/* */ { +/* 211 */ synchronized (soundStack) { +/* 212 */ if (systemPaused > 0) { +/* 213 */ this.repeatsLeft = 0; +/* 214 */ return; +/* */ } +/* 216 */ playingThreads += 1; +/* */ } +/* */ +/* */ +/* 220 */ while (this.repeatsLeft > 0) { +/* 221 */ synchronized (soundStack) { +/* 222 */ if (activeThread != Thread.currentThread()) { +/* */ break; +/* */ } +/* 225 */ if (this.repeatsLeft > 0) { +/* 226 */ this.repeatsLeft -= 1; +/* */ } +/* */ } +/* */ +/* */ +/* 231 */ nativePlay(false); +/* */ } +/* */ +/* 234 */ synchronized (soundStack) { +/* 235 */ if (activeThread == Thread.currentThread()) { +/* 236 */ assert (getActive() == this); +/* 237 */ soundStack.removeElement(this); +/* 238 */ activeThread = null; +/* */ +/* */ +/* 241 */ WavSoundPlayer active = getActive(); +/* 242 */ if (active != null) +/* 243 */ active.play(-1, false); +/* */ } +/* 245 */ playingThreads -= 1; +/* 246 */ soundStack.notifyAll(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void stop(boolean leaveLoopRunning) +/* */ { +/* 262 */ if (getActive() == this) { +/* 263 */ boolean isLoop = activeThread == null; +/* 264 */ assert (((this.repeatsLeft < 0) && (isLoop)) || (!leaveLoopRunning)); +/* */ +/* */ +/* 267 */ this.repeatsLeft = 0; +/* */ +/* */ +/* 270 */ if ((!leaveLoopRunning) && (isLoop) && (systemPaused == 0)) { +/* 271 */ nativeStop(); +/* */ } +/* 273 */ activeThread = null; +/* */ } +/* */ +/* 276 */ soundStack.removeElement(this); +/* */ } +/* */ +/* */ +/* */ +/* */ public void stop() +/* */ { +/* 283 */ synchronized (soundStack) { +/* 284 */ if (getActive() == this) { +/* 285 */ stop(false); +/* */ +/* */ +/* 288 */ WavSoundPlayer active = getActive(); +/* 289 */ if (active != null) +/* 290 */ active.play(-1, false); +/* */ } else { +/* 292 */ soundStack.removeElement(this); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void pauseSystemExceptASF() +/* */ { +/* 312 */ synchronized (soundStack) { +/* 313 */ WavSoundPlayer active = getActive(); +/* 314 */ boolean isLoop = activeThread == null; +/* */ +/* 316 */ if (active != null) { +/* 317 */ if (isLoop) { +/* 318 */ active.nativeStop(); +/* */ } else { +/* 320 */ active.stop(false); +/* */ } +/* */ } +/* 323 */ systemPaused += 1; +/* */ +/* 325 */ if (active != null) { +/* 326 */ active.play(-1, false); +/* */ } +/* */ +/* 329 */ while (playingThreads > 0) { +/* */ try { +/* 331 */ soundStack.wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void resumeSystemExceptASF() +/* */ { +/* 347 */ synchronized (soundStack) +/* */ { +/* */ +/* */ +/* */ +/* 352 */ if (systemPaused > 0) +/* */ { +/* 354 */ systemPaused = 0; +/* */ +/* 356 */ WavSoundPlayer active = getActive(); +/* 357 */ if ((active != null) && (activeThread == null)) { +/* 358 */ active.play(-1, false); +/* */ } +/* */ } +/* */ } +/* */ } +/* */ +/* 364 */ static boolean ignoreVolumeChanges = IniFile.gamma().getIniInt("ignoreVolumeChanges", 1) != 0; +/* */ +/* 366 */ private static WavSoundTerminator terminator = new WavSoundTerminator(); +/* */ private static float lastLeftVol; +/* */ private static float lastRightVol; +/* */ +/* */ public void volume(float left, float right) { +/* 371 */ if (ignoreVolumeChanges) { +/* 372 */ return; +/* */ } +/* 374 */ synchronized (soundStack) { +/* 375 */ if ((getActive() == this) && ( +/* 376 */ (lastLeftVol != left) || (lastRightVol != right))) +/* */ { +/* 378 */ lastLeftVol = left; +/* 379 */ lastRightVol = right; +/* 380 */ nativeVolume(left, right); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public static native void nativeInit(); +/* */ +/* */ public static void pauseSystem() {} +/* */ +/* */ public static void resumeSystem() {} +/* */ +/* */ private native void nativePlay(boolean paramBoolean); +/* */ +/* */ private native void nativeVolume(float paramFloat1, float paramFloat2); +/* */ +/* */ private native void nativeStop(); +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WavSoundPlayer.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WavSoundTerminator.java b/NET/worlds/scape/WavSoundTerminator.java new file mode 100644 index 0000000..e60955a --- /dev/null +++ b/NET/worlds/scape/WavSoundTerminator.java @@ -0,0 +1,410 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.MainCallback; +/* */ import NET.worlds.console.MainTerminalCallback; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WavSoundTerminator +/* */ implements MainCallback, MainTerminalCallback +/* */ { +/* */ public WavSoundTerminator() +/* */ { +/* 395 */ Main.register(this); +/* */ } +/* */ +/* */ public void mainCallback() {} +/* */ +/* */ public void terminalCallback() { +/* 401 */ WavSoundPlayer.pauseSystem(); +/* 402 */ Main.unregister(this); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WavSoundTerminator.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WearAction.java b/NET/worlds/scape/WearAction.java new file mode 100644 index 0000000..a6a28a6 --- /dev/null +++ b/NET/worlds/scape/WearAction.java @@ -0,0 +1,450 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WearAction +/* */ extends Action +/* */ { +/* 31 */ char limb = 'B'; +/* */ +/* */ +/* 34 */ String val = ""; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Persister trigger(Event e, Persister seqID) +/* */ { +/* 42 */ Object owner = getOwner(); +/* 43 */ if (owner != null) { +/* 44 */ setAvLimb(this.limb, this.val); +/* */ } +/* 46 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void setAvLimb(char limb, String v) +/* */ { +/* 66 */ String str = PosableShape.getCurrentAvCustomizable(); +/* */ +/* 68 */ if (str == null) { +/* 69 */ return; +/* */ } +/* 71 */ int pos = str.indexOf(".", 7); +/* 72 */ String bodyType = str.substring(7, pos).toLowerCase(); +/* */ +/* */ int matStart; +/* */ +/* */ int matEnd; +/* 77 */ if ((limb == 'H') || (limb == 'E')) { +/* 78 */ int head = str.lastIndexOf("NS"); +/* 79 */ if (head < 0) { +/* 80 */ return; +/* */ } +/* */ +/* 83 */ if (v == null) { +/* 84 */ v = bodyType; +/* 85 */ if (limb == 'E') +/* */ { +/* 87 */ limb = 'H'; +/* */ +/* 89 */ if ((head >= 0) && (str.charAt(head + 5) == 'G')) { +/* 90 */ v = PosableShape.readName(str, head + 6).toLowerCase(); +/* */ } +/* */ } +/* */ } +/* 94 */ int face = str.lastIndexOf("DgT"); +/* 95 */ int faceEnd = -1; +/* 96 */ if (face < head) { +/* 97 */ if (limb == 'E') { +/* 98 */ Console.println( +/* 99 */ "Can't change the face of this type of head."); +/* 100 */ return; +/* */ } +/* */ +/* 103 */ face = -1; +/* */ } +/* */ else +/* */ { +/* 107 */ faceEnd = face + 2; +/* */ int i; +/* 109 */ while ((i = PosableShape.skipMat(str, faceEnd)) != faceEnd) { int i; +/* 110 */ faceEnd = i; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 116 */ URL urlVal = PosableShape.getAvURL(v); +/* 117 */ if (urlVal == null) { +/* 118 */ return; +/* */ } +/* 120 */ String val = urlVal.getAbsolute(); +/* 121 */ if (val == null) { +/* 122 */ return; +/* */ } +/* 124 */ if (limb == 'H') +/* */ { +/* 126 */ int newHead = val.lastIndexOf("NS"); +/* 127 */ if (newHead < 0) { +/* 128 */ return; +/* */ } +/* 130 */ String geom = ""; +/* 131 */ pos = str.indexOf(".0E", 7); +/* 132 */ if (!v.equalsIgnoreCase(str.substring(7, pos))) { +/* 133 */ geom = "G" + PosableShape.getBodyType(v); +/* */ } +/* 135 */ int matStart = head + 5; +/* 136 */ int matEnd = str.length(); +/* 137 */ v = geom + val.substring(newHead + 5); +/* */ } +/* */ else { +/* 140 */ int newFace = val.lastIndexOf("Dg"); +/* 141 */ if (newFace < 0) { +/* 142 */ return; +/* */ } +/* */ +/* */ +/* 146 */ int newEnd = newFace + 2; +/* 147 */ int i; while ((i = PosableShape.skipMat(val, newEnd)) != newEnd) { int i; +/* 148 */ newEnd = i; +/* */ } +/* 150 */ int matStart = face; +/* 151 */ int matEnd = faceEnd; +/* 152 */ v = val.substring(newFace, newEnd); +/* */ } +/* 154 */ } else if (limb == 'Q') { +/* 155 */ int sInd = str.lastIndexOf("NS"); +/* 156 */ if (sInd < 0) { +/* 157 */ Console.println("Can't customize this avatar."); +/* 158 */ return; +/* */ } +/* 160 */ int matStart = sInd + 2; +/* 161 */ int matEnd = sInd + 5; +/* */ +/* 163 */ if (v == null) +/* 164 */ v = "000"; +/* 165 */ } else if (limb == 'f') +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 171 */ int face = str.lastIndexOf("Dg"); +/* 172 */ if (face > 0) +/* */ { +/* */ +/* 175 */ int end = face + 2; +/* 176 */ int i; while ((i = PosableShape.skipMat(str, end)) != end) { int i; +/* 177 */ end = i; +/* */ } +/* */ +/* 180 */ int len = str.length() - 4; +/* */ +/* 182 */ String val = ""; +/* */ +/* 184 */ while (i < len) +/* */ { +/* 186 */ char c = str.charAt(i); +/* 187 */ if (c == 'Q') +/* */ { +/* 189 */ val = val + c; +/* 190 */ i++; +/* */ +/* */ } +/* 193 */ else if ((c >= '0') && (c <= '9')) +/* */ { +/* 195 */ val = val + c; +/* 196 */ i++; +/* */ +/* */ } +/* */ else +/* */ { +/* 201 */ int j = PosableShape.skipMat(str, i); +/* 202 */ if (i != j) +/* */ { +/* 204 */ val = val + "f"; +/* 205 */ i = j; +/* */ } +/* */ else +/* */ { +/* 209 */ i++; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* 216 */ if (v == null) +/* */ { +/* 218 */ URL origURL = PosableShape.getAvURL(bodyType); +/* 219 */ String origStr = ""; +/* 220 */ if (origURL != null) +/* */ { +/* 222 */ origStr = origURL.getInternal(); +/* */ } +/* 224 */ int origFace = origStr.lastIndexOf("Dg"); +/* */ +/* 226 */ if (origFace > 0) +/* */ { +/* */ +/* 229 */ int origEnd = origFace + 2; +/* 230 */ int k; while ((k = PosableShape.skipMat(origStr, +/* 231 */ origEnd)) != origEnd) { int k; +/* 232 */ origEnd = k; } +/* 233 */ str = +/* 234 */ str.substring(0, end) + origStr.substring(origEnd); +/* */ } +/* */ } +/* */ else +/* */ { +/* 239 */ str = str.substring(0, end) + val + ".rwg"; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 248 */ int matStart = PosableShape.getMatPosition(str, limb); +/* 249 */ if (matStart < 0) +/* 250 */ return; +/* 251 */ int matEnd = PosableShape.skipMat(str, matStart); +/* */ +/* 253 */ if (v == null) +/* */ { +/* 255 */ URL origURL = PosableShape.getAvURL(bodyType); +/* */ +/* 257 */ if (origURL == null) { +/* 258 */ return; +/* */ } +/* 260 */ String origStr = origURL.getInternal(); +/* 261 */ int origMat = PosableShape.getMatPosition(origStr, limb); +/* */ +/* */ +/* 264 */ if (origMat < 0) { +/* 265 */ return; +/* */ } +/* 267 */ int origMatEnd = PosableShape.skipMat(origStr, origMat); +/* */ +/* 269 */ v = origStr.substring(origMat, origMatEnd); +/* */ } +/* */ } +/* */ else +/* */ { +/* 274 */ matStart = PosableShape.getMatPosition(str, limb); +/* 275 */ if (matStart < 0) +/* 276 */ return; +/* 277 */ matEnd = PosableShape.skipMat(str, matStart); +/* */ +/* 279 */ if (v == null) +/* */ { +/* 281 */ URL origURL = PosableShape.getAvURL(bodyType); +/* 282 */ if (origURL == null) +/* */ { +/* 284 */ return; +/* */ } +/* */ +/* 287 */ String origStr = origURL.getInternal(); +/* 288 */ int origMat = PosableShape.getMatPosition(origStr, limb); +/* */ +/* */ +/* 291 */ if (origMat < 0) { +/* 292 */ return; +/* */ } +/* 294 */ int origMatEnd = PosableShape.skipMat(origStr, origMat); +/* */ +/* 296 */ v = origStr.substring(origMat, origMatEnd); +/* */ } +/* */ } +/* */ +/* 300 */ Console co = Console.getActive(); +/* 301 */ if (co != null) +/* 302 */ co.setAvatar(URL.make(str.substring(0, matStart) + +/* 303 */ v + str.substring(matEnd))); +/* */ } +/* */ +/* */ public static String makeMatString(int r, int g, int b) { +/* 307 */ StringBuffer sb = new StringBuffer("C"); +/* 308 */ sb.append(toBase64(r)); +/* 309 */ sb.append(toBase64(g)); +/* 310 */ sb.append(toBase64(b)); +/* 311 */ return sb.toString(); +/* */ } +/* */ +/* */ public static char toBase64(int i) { +/* 315 */ return PosableShape.base64.charAt(i); +/* */ } +/* */ +/* 318 */ private static String allowedLimbChars = "PBLMORUVIJKXYZabcdefHQE"; +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 326 */ Object ret = null; +/* 327 */ switch (index - offset) { +/* */ case 0: +/* 329 */ if (mode == 0) { +/* 330 */ ret = StringPropertyEditor.make( +/* 331 */ new Property(this, index, "Limb")); +/* 332 */ } else if (mode == 1) { +/* 333 */ ret = new String(this.limb); +/* 334 */ } else if (mode == 2) { +/* 335 */ String s = (String)value; +/* 336 */ if ((s.length() != 1) || +/* 337 */ (allowedLimbChars.indexOf(s.charAt(0)) < 0)) { +/* 338 */ Console.println("Limb must one of " + allowedLimbChars); +/* */ } else { +/* 340 */ this.limb = s.charAt(0); +/* 341 */ this.val = null; +/* */ } +/* */ } +/* */ +/* 345 */ break; +/* */ case 1: +/* 347 */ if (mode == 0) { +/* 348 */ ret = StringPropertyEditor.make( +/* 349 */ new Property(this, index, "Value").allowSetNull()); +/* 350 */ } else if (mode == 1) { +/* 351 */ ret = this.val; +/* 352 */ } else if (mode == 2) { +/* 353 */ String v = (String)value; +/* 354 */ if (v != null) +/* */ { +/* 356 */ if ((this.limb == 'H') || (this.limb == 'E')) +/* */ { +/* 358 */ if (PosableShape.readName(v, 0).length() != v.length()) { +/* 359 */ Console.println("Head and face must be set to all-lowercase name of body type."); +/* */ +/* 361 */ return ret; +/* */ } +/* 363 */ } else if (this.limb == 'Q') +/* */ { +/* 365 */ if (v.length() != 3) { +/* 366 */ Console.println( +/* 367 */ "Head size must be three letters, usually all the same."); +/* 368 */ return ret; +/* */ } +/* */ +/* 371 */ for (int i = 0; i < 3; i++) { +/* 372 */ char c = v.charAt(i); +/* 373 */ if ((c != '0') && ((c < 'a') || (c > 'z')) && ( +/* 374 */ (c < 'A') || (c > 'Z'))) +/* */ { +/* 376 */ Console.println( +/* 377 */ "Head size letters must each be one of z-a9A-Z."); +/* 378 */ return ret; +/* */ } +/* */ } +/* */ } +/* 382 */ else if (v.length() < 1) { +/* 383 */ v = null; +/* 384 */ } else if ((v.charAt(0) != 'C') && +/* 385 */ (v.charAt(0) != 'T')) +/* */ { +/* 387 */ Console.println( +/* 388 */ "Material must be C_X, CXYZ, or Ttexname."); +/* 389 */ return ret; +/* */ } +/* */ } +/* */ +/* 393 */ this.val = v; +/* */ } +/* 395 */ break; +/* */ default: +/* 397 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 399 */ return ret; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 405 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 409 */ s.saveVersion(1, classCookie); +/* 410 */ super.saveState(s); +/* 411 */ s.saveString(this.val); +/* 412 */ s.saveString(this.limb); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 417 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 419 */ super.restoreState(r); +/* */ +/* 421 */ int red = r.restoreInt(); +/* 422 */ int green = r.restoreInt(); +/* 423 */ int blue = r.restoreInt(); +/* 424 */ String v = r.restoreString(); +/* */ +/* 426 */ if (v == null) { +/* 427 */ this.val = makeMatString(red, green, blue); } else { char c; +/* 428 */ if ((v.length() == 1) && ((c = v.charAt(0)) >= 'A') && (c <= 'Z')) { +/* 429 */ this.val = ("C_" + v); +/* */ } else +/* 431 */ this.val = ("T" + v); +/* */ } +/* 433 */ this.limb = r.restoreString().charAt(0); +/* 434 */ break; +/* */ case 1: +/* 436 */ super.restoreState(r); +/* 437 */ this.val = r.restoreString(); +/* 438 */ this.limb = r.restoreString().charAt(0); +/* 439 */ break; +/* */ default: +/* 441 */ throw new TooNewException(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WearAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WearWall.java b/NET/worlds/scape/WearWall.java new file mode 100644 index 0000000..a550843 --- /dev/null +++ b/NET/worlds/scape/WearWall.java @@ -0,0 +1,358 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.util.StringTokenizer; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WearWall +/* */ extends Rect +/* */ { +/* 26 */ char limb = ' '; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 33 */ String tileList = ""; +/* */ +/* */ +/* */ WObject[] subs; +/* */ +/* */ +/* */ public void rebuild() +/* */ { +/* 41 */ unbuild(); +/* */ +/* 43 */ if (this.limb == ' ') { +/* 44 */ return; +/* */ } +/* */ +/* 47 */ int count = 0; +/* 48 */ StringTokenizer st = new StringTokenizer(this.tileList); +/* 49 */ while (st.hasMoreTokens()) { +/* 50 */ count++; +/* 51 */ st.nextToken(); +/* */ } +/* */ +/* 54 */ if (count == 0) { +/* 55 */ return; +/* */ } +/* */ +/* */ +/* 59 */ float width = getScaleX(); +/* 60 */ float height = getScaleZ(); +/* */ +/* 62 */ int wNum = 1; +/* 63 */ int hNum = 1; +/* */ +/* 65 */ while (wNum * hNum < count) +/* */ { +/* */ +/* 68 */ if (height * (wNum + 1) > width * (hNum + 1)) { +/* 69 */ hNum++; +/* */ } else { +/* 71 */ wNum++; +/* */ } +/* */ } +/* */ +/* 75 */ this.subs = new WObject[count]; +/* 76 */ float tw = 1.0F / wNum; +/* 77 */ float th = 1.0F / hNum; +/* */ +/* */ +/* 80 */ float wHalfSide = tw * getScaleX(); +/* 81 */ float hHalfSide = th * getScaleZ(); +/* 82 */ float sideLen = wHalfSide < hHalfSide ? wHalfSide : hHalfSide; +/* */ +/* 84 */ wHalfSide = (sideLen - 6.0F) / getScaleX() / 2.0F; +/* 85 */ hHalfSide = (sideLen - 6.0F) / getScaleZ() / 2.0F; +/* */ +/* 87 */ st = new StringTokenizer(this.tileList); +/* */ +/* 89 */ float y = -1.0F / getScaleY(); +/* 90 */ float z = 1.0F - th / 2.0F; +/* 91 */ int i = 0; +/* 92 */ for (int row = 0; row < hNum; z -= th) { +/* 93 */ float x = tw / 2.0F; +/* 94 */ for (int col = 0; col < wNum; x += tw) { +/* 95 */ if (!st.hasMoreTokens()) { +/* 96 */ return; +/* */ } +/* 98 */ Material m = null; +/* 99 */ String s = st.nextToken(); +/* 100 */ String bodyType = null; +/* */ try { +/* 102 */ char c = s.charAt(0); +/* 103 */ if ((c == 'C') || (c == 'T')) { +/* 104 */ if ((this.limb == 'H') || (this.limb == 'E')) { +/* */ break label780; +/* */ } +/* 107 */ if (c == 'C') { +/* 108 */ m = PosableShape.readColor(s, 1); +/* */ } else +/* 110 */ m = PosableShape.readTexture(s, 1); +/* */ } else { +/* 112 */ String name = PosableShape.readName(s, 0); +/* 113 */ if (this.limb == 'H') { +/* 114 */ bodyType = name; +/* 115 */ } else { if (this.limb != 'E') break label780; +/* 116 */ name = PosableShape.getFace(name); +/* */ +/* 118 */ m = PosableShape.readTexture(name, 0); +/* */ } +/* */ } +/* */ } +/* */ catch (StringIndexOutOfBoundsException e) +/* */ { +/* */ break label780; +/* */ } +/* */ +/* 127 */ if (bodyType != null) { +/* 128 */ s = PosableShape.getAvURL(bodyType).getAbsolute(); +/* */ int start; +/* 130 */ if ((s != null) && ((start = s.indexOf(".0E")) >= 0)) +/* */ { +/* 132 */ int start = PosableShape.skipLimb(s, start + 3); +/* 133 */ if (start >= 0) +/* */ { +/* */ +/* */ +/* 137 */ int headIndex = s.lastIndexOf("NS"); +/* 138 */ if (headIndex >= 0) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* 145 */ PosableShape p = +/* 146 */ new PosableShape(URL.make(s.substring(0, start) + +/* 147 */ "PGNG" + PosableShape.getBodyType(bodyType) + +/* 148 */ "Q" + s.substring(headIndex + 1)), false); +/* */ +/* 150 */ p.scale(750.0F / getScaleX(), +/* 151 */ 750.0F / getScaleY(), +/* 152 */ 750.0F / getScaleZ()); +/* 153 */ p.spin(0.0F, 1.0F, 1.0F, 180.0F); +/* 154 */ p.spin(0.0F, 1.0F, 0.0F, 180.0F); +/* 155 */ p.moveTo(x, y * 10.0F, z - hHalfSide / 2.0F); +/* 156 */ WearAction action = new WearAction(); +/* 157 */ action.limb = this.limb; +/* 158 */ action.val = bodyType; +/* 159 */ p.addAction(action); +/* 160 */ p.addHandler(new ClickSensor(action, 1)); +/* 161 */ add(p); +/* 162 */ this.subs[i] = p; +/* 163 */ } } } } else if (m != null) { +/* 164 */ m.setAmbient(0.75F); +/* 165 */ m.setDiffuse(0.0F); +/* 166 */ Rect r = new Rect(x - wHalfSide, y, z - hHalfSide, +/* 167 */ x + wHalfSide, y, z + hHalfSide, m); +/* 168 */ WearAction action = new WearAction(); +/* 169 */ action.limb = this.limb; +/* 170 */ action.val = s; +/* 171 */ r.addAction(action); +/* 172 */ r.addHandler(new ClickSensor(action, 1)); +/* 173 */ add(r); +/* 174 */ this.subs[i] = r; +/* */ } +/* */ label780: +/* 94 */ col++; i++; +/* */ } +/* 92 */ row++; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void unbuild() +/* */ { +/* 184 */ if (this.subs != null) { +/* 185 */ int i = this.subs.length; +/* 186 */ do { if (this.subs[i] != null) { +/* 187 */ this.subs[i].detach(); +/* */ } +/* 185 */ i--; } while (i >= 0); +/* */ } +/* */ +/* 188 */ this.subs = null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 197 */ Object ret = null; +/* 198 */ switch (index - offset) { +/* */ case 0: +/* 200 */ if (mode == 0) { +/* 201 */ ret = StringPropertyEditor.make( +/* 202 */ new Property(this, index, "Limb")); +/* 203 */ } else if (mode == 1) { +/* 204 */ ret = new String(this.limb); +/* 205 */ } else if (mode == 2) { +/* 206 */ String s = (String)value; +/* 207 */ if (s.length() >= 1) { +/* 208 */ this.limb = s.charAt(0); +/* 209 */ rebuild(); +/* */ } +/* */ } +/* 212 */ break; +/* */ case 1: +/* 214 */ if (mode == 0) { +/* 215 */ ret = StringPropertyEditor.make( +/* 216 */ new Property(this, index, "Tile List")); +/* 217 */ } else if (mode == 1) { +/* 218 */ ret = new String(this.tileList); +/* 219 */ } else if (mode == 2) { +/* 220 */ this.tileList = ((String)value); +/* 221 */ rebuild(); +/* */ } +/* 223 */ break; +/* */ default: +/* 225 */ ret = super.properties(index, offset + 2, mode, value); +/* */ } +/* 227 */ return ret; +/* */ } +/* */ +/* 230 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 234 */ unbuild(); +/* 235 */ s.saveVersion(2, classCookie); +/* 236 */ super.saveState(s); +/* 237 */ rebuild(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 242 */ int vers = r.restoreVersion(classCookie); +/* 243 */ switch (vers) { +/* */ case 0: +/* 245 */ super.restoreState(r); +/* 246 */ r.restoreString(); +/* 247 */ r.restoreString(); +/* 248 */ break; +/* */ case 1: +/* 250 */ super.restoreState(r); +/* 251 */ r.restoreString(); +/* 252 */ break; +/* */ case 2: +/* 254 */ super.restoreState(r); +/* 255 */ break; +/* */ default: +/* 257 */ throw new TooNewException(); +/* */ } +/* 259 */ rebuild(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WearWall.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WebPageWall.java b/NET/worlds/scape/WebPageWall.java new file mode 100644 index 0000000..359aeb0 --- /dev/null +++ b/NET/worlds/scape/WebPageWall.java @@ -0,0 +1,498 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.NoWebControlException; +/* */ import NET.worlds.console.WebControl; +/* */ import NET.worlds.console.WebControlFactory; +/* */ import NET.worlds.console.WebControlImp; +/* */ import NET.worlds.console.WebControlListener; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ public class WebPageWall +/* */ extends Rect +/* */ implements WebControlListener +/* */ { +/* 22 */ WebControlImp _wci = null; +/* */ TextureSurface _surface; +/* */ Texture[] _textures; +/* 25 */ Material _material = null; +/* */ +/* */ +/* 28 */ String _textureURL = "$SCRIPTSERVERgetad.pl?u=$USERNAME"; +/* */ +/* */ +/* 31 */ String _postTextureData = null; +/* */ +/* */ +/* 34 */ String _adURL = "http://www.worlds.com/"; +/* */ +/* 36 */ String _postAdData = null; +/* */ +/* */ +/* 39 */ String _defTextureURL = IniFile.override().getIniString("defaultAd", +/* 40 */ "adworlds.cmp"); +/* */ +/* */ +/* 43 */ int _xPercent = 100; int _yPercent = 100; +/* */ +/* */ +/* 46 */ int _xSurface = 468; int _ySurface = 60; +/* */ +/* */ +/* 49 */ boolean _hasToolbar = true; +/* */ +/* */ +/* 52 */ boolean _isFixed = false; +/* */ +/* */ +/* 55 */ int _rows = 1; +/* */ +/* */ +/* */ +/* */ +/* 60 */ int _refresh = 5; +/* */ +/* */ +/* 63 */ boolean _passClicks = true; +/* */ +/* */ +/* */ +/* 67 */ boolean _isAdBanner = true; +/* */ +/* 69 */ public boolean getIsAdBanner() { return this._isAdBanner; } +/* */ +/* */ +/* */ +/* 73 */ boolean _retryURL = false; +/* */ +/* */ public void rebuild() +/* */ { +/* 77 */ unbuild(); +/* 78 */ assignMaterial(); +/* */ } +/* */ +/* */ public void unbuild() +/* */ { +/* 83 */ if (this._wci != null) +/* */ { +/* 85 */ this._wci.detach(); +/* 86 */ this._wci = null; +/* */ } +/* */ } +/* */ +/* */ public void detach() +/* */ { +/* 92 */ unbuild(); +/* 93 */ super.detach(); +/* */ } +/* */ +/* */ public void finalize() +/* */ { +/* 98 */ unbuild(); +/* 99 */ super.finalize(); +/* */ } +/* */ +/* */ public boolean handle(MouseDownEvent event) +/* */ { +/* 104 */ if ((event.key & 0x1) == '\001') +/* */ { +/* 106 */ Point2 pt = deproject(); +/* */ +/* 108 */ if (this._passClicks) +/* */ { +/* 110 */ double realX = pt.x * this._surface.getWidth(); +/* 111 */ double realY = pt.y * this._surface.getHeight(); +/* 112 */ realY = this._surface.getHeight() - realY; +/* */ +/* 114 */ this._surface.sendLeftClick((int)realX, (int)realY); +/* 115 */ return false; +/* */ } +/* */ +/* 118 */ Console c = Console.getActive(); +/* 119 */ if ((c != null) && ((c instanceof DefaultConsole))) +/* */ { +/* 121 */ DefaultConsole dc = (DefaultConsole)c; +/* */ try { +/* 123 */ WebControl wc = new WebControl(dc.getRender(), +/* 124 */ this._xPercent, this._yPercent, this._hasToolbar, this._isFixed, +/* 125 */ false); +/* 126 */ wc.activate(); +/* 127 */ wc.setURL(this._adURL, this._postAdData); +/* */ +/* */ } +/* */ catch (NoWebControlException e) +/* */ { +/* 132 */ new SendURLAction(this._adURL).doIt(); +/* */ } +/* */ } +/* */ } +/* */ +/* 137 */ return false; +/* */ } +/* */ +/* 140 */ int frameCnt = -1; +/* */ +/* */ public void prerender(Camera cam) +/* */ { +/* 144 */ Point3Temp p = inCamSpace(cam); +/* */ +/* */ +/* */ +/* 148 */ boolean v = (p != null) && (p.z > 1.0F) && (p.x < p.z) && (-p.x < p.z); +/* */ +/* 150 */ if (v) this.visible = true; +/* */ } +/* */ +/* */ public boolean handle(FrameEvent f) +/* */ { +/* 155 */ if (this.visible) +/* */ { +/* 157 */ if ((this._retryURL) && (this._wci != null)) +/* */ { +/* 159 */ if (this._wci.setURL(this._textureURL, this._postTextureData)) { +/* 160 */ this._retryURL = false; +/* */ } else { +/* 162 */ return false; +/* */ } +/* */ } +/* 165 */ if (this._surface != null) +/* */ { +/* 167 */ if ((this.frameCnt > this._refresh) || (this.frameCnt == -1)) +/* */ { +/* 169 */ if ((this.frameCnt != -1) && (this._refresh == -1)) { +/* 170 */ return false; +/* */ } +/* 172 */ this.frameCnt = 0; +/* 173 */ draw(); +/* */ } +/* */ else +/* */ { +/* 177 */ this.frameCnt += 1; +/* */ } +/* */ } +/* */ } +/* */ +/* 182 */ return false; +/* */ } +/* */ +/* 185 */ public WebControlImp getWebControlImp() { return this._wci; } +/* */ +/* */ private void assignMaterial() +/* */ { +/* 189 */ int xTex = this._xSurface / 128; +/* 190 */ if (xTex < 1) xTex = 1; +/* 191 */ int yTex = this._ySurface / 128; +/* 192 */ if (yTex < 1) { yTex = 1; +/* */ } +/* 194 */ this._surface = null; +/* */ +/* 196 */ if (this._wci != null) +/* 197 */ this._wci.detach(); +/* 198 */ this._wci = null; +/* */ +/* 200 */ this._rows = yTex; +/* */ +/* 202 */ this._material = new Material(URL.make(this._defTextureURL), +/* 203 */ xTex, yTex); +/* 204 */ setMaterial(this._material); +/* */ +/* 206 */ this._textures = this._material.getTextures(); +/* 207 */ this._surface = new TextureSurface(this._textures, yTex, this._xSurface, +/* 208 */ this._ySurface); +/* */ try +/* */ { +/* 211 */ this._wci = WebControlFactory.createWebControlImp( +/* 212 */ this._surface.getHwnd(), false, this._isAdBanner); +/* */ } +/* */ catch (NoWebControlException e) +/* */ { +/* 216 */ System.out.println("Could not create MSIE control for billboard."); +/* */ +/* 218 */ this._wci = null; +/* 219 */ return; +/* */ } +/* 221 */ if (!this._wci.setURL(this._textureURL, this._postTextureData)) { +/* 222 */ this._retryURL = true; +/* */ } +/* 224 */ this._wci.addListener(this); +/* */ } +/* */ +/* */ public synchronized void draw() +/* */ { +/* 229 */ if ((this._surface != null) && (this._wci != null)) +/* */ { +/* 231 */ this._surface.setTextures(this._material.getTextures(), this._rows); +/* 232 */ this._surface.draw(this._wci); +/* */ } +/* */ } +/* */ +/* */ public void webControlEvent(int eventID) +/* */ { +/* 238 */ if ((eventID == 1) && (this._refresh == -1)) { +/* 239 */ draw(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 249 */ Object ret = null; +/* 250 */ switch (index - offset) { +/* */ case 0: +/* 252 */ if (mode == 0) { +/* 253 */ ret = StringPropertyEditor.make( +/* 254 */ new Property(this, index, "Wall's URL")); +/* 255 */ } else if (mode == 1) { +/* 256 */ ret = this._textureURL; +/* 257 */ } else if (mode == 2) +/* */ { +/* 259 */ this._textureURL = ((String)value); +/* 260 */ rebuild(); +/* */ } +/* 262 */ break; +/* */ case 1: +/* 264 */ if (mode == 0) { +/* 265 */ ret = StringPropertyEditor.make( +/* 266 */ new Property(this, index, "Wall's POST data")); +/* 267 */ } else if (mode == 1) { +/* 268 */ ret = this._postTextureData; +/* 269 */ } else if (mode == 2) +/* */ { +/* 271 */ this._postTextureData = ((String)value); +/* 272 */ rebuild(); +/* */ } +/* 274 */ break; +/* */ case 2: +/* 276 */ if (mode == 0) { +/* 277 */ ret = IntegerPropertyEditor.make( +/* 278 */ new Property(this, index, "Wall Page Width (pixels)"), +/* 279 */ 0, 1024); +/* 280 */ } else if (mode == 1) { +/* 281 */ ret = new Integer(this._xSurface); +/* 282 */ } else if (mode == 2) +/* */ { +/* 284 */ this._xSurface = ((Integer)value).intValue(); +/* 285 */ rebuild(); +/* */ } +/* 287 */ break; +/* */ case 3: +/* 289 */ if (mode == 0) { +/* 290 */ ret = IntegerPropertyEditor.make( +/* 291 */ new Property(this, index, "Wall Page Height (pixels)"), +/* 292 */ 0, 1024); +/* 293 */ } else if (mode == 1) { +/* 294 */ ret = new Integer(this._ySurface); +/* 295 */ } else if (mode == 2) +/* */ { +/* 297 */ this._ySurface = ((Integer)value).intValue(); +/* 298 */ rebuild(); +/* */ } +/* 300 */ break; +/* */ case 4: +/* 302 */ if (mode == 0) { +/* 303 */ ret = IntegerPropertyEditor.make( +/* 304 */ new Property(this, index, "Wall Refresh Rate (frames)"), +/* 305 */ -1, 1024); +/* 306 */ } else if (mode == 1) { +/* 307 */ ret = new Integer(this._refresh); +/* 308 */ } else if (mode == 2) +/* 309 */ this._refresh = ((Integer)value).intValue(); +/* 310 */ break; +/* */ case 5: +/* 312 */ if (mode == 0) { +/* 313 */ ret = BooleanPropertyEditor.make( +/* 314 */ new Property(this, index, "Use Scrollbars"), +/* 315 */ "No", +/* 316 */ "Yes"); +/* 317 */ } else if (mode == 1) { +/* 318 */ ret = new Boolean(!this._isAdBanner); +/* 319 */ } else if (mode == 2) +/* 320 */ this._isAdBanner = (!((Boolean)value).booleanValue()); +/* 321 */ break; +/* */ case 6: +/* 323 */ if (mode == 0) { +/* 324 */ ret = BooleanPropertyEditor.make( +/* 325 */ new Property(this, index, "Pass clicks"), +/* 326 */ "No - Click launches target page", +/* 327 */ "Yes - Mouse events passed through to wall page"); +/* 328 */ } else if (mode == 1) { +/* 329 */ ret = new Boolean(this._passClicks); +/* 330 */ } else if (mode == 2) +/* 331 */ this._passClicks = ((Boolean)value).booleanValue(); +/* 332 */ break; +/* */ case 7: +/* 334 */ if (mode == 0) { +/* 335 */ ret = StringPropertyEditor.make( +/* 336 */ new Property(this, index, "Target URL for click")); +/* 337 */ } else if (mode == 1) { +/* 338 */ ret = this._adURL; +/* 339 */ } else if (mode == 2) +/* 340 */ this._adURL = ((String)value); +/* 341 */ break; +/* */ case 8: +/* 343 */ if (mode == 0) { +/* 344 */ ret = StringPropertyEditor.make( +/* 345 */ new Property(this, index, "Target's POST data")); +/* 346 */ } else if (mode == 1) { +/* 347 */ ret = this._postAdData; +/* 348 */ } else if (mode == 2) +/* */ { +/* 350 */ this._postAdData = ((String)value); +/* 351 */ rebuild(); +/* */ } +/* 353 */ break; +/* */ case 9: +/* 355 */ if (mode == 0) { +/* 356 */ ret = BooleanPropertyEditor.make( +/* 357 */ new Property(this, index, "Target Page Size Units"), +/* 358 */ "Percentage", "Pixels"); +/* 359 */ } else if (mode == 1) { +/* 360 */ ret = new Boolean(this._isFixed); +/* 361 */ } else if (mode == 2) +/* 362 */ this._isFixed = ((Boolean)value).booleanValue(); +/* 363 */ break; +/* */ case 10: +/* 365 */ if (mode == 0) { +/* 366 */ ret = IntegerPropertyEditor.make( +/* 367 */ new Property(this, index, "Target X Overlay % or Width"), +/* 368 */ 0, 1024); +/* 369 */ } else if (mode == 1) { +/* 370 */ ret = new Integer(this._xPercent); +/* 371 */ } else if (mode == 2) +/* 372 */ this._xPercent = ((Integer)value).intValue(); +/* 373 */ break; +/* */ case 11: +/* 375 */ if (mode == 0) { +/* 376 */ ret = IntegerPropertyEditor.make( +/* 377 */ new Property(this, index, "Target Y Overlay % or Height"), +/* 378 */ 0, 1024); +/* 379 */ } else if (mode == 1) { +/* 380 */ ret = new Integer(this._yPercent); +/* 381 */ } else if (mode == 2) +/* 382 */ this._yPercent = ((Integer)value).intValue(); +/* 383 */ break; +/* */ case 12: +/* 385 */ if (mode == 0) { +/* 386 */ ret = BooleanPropertyEditor.make( +/* 387 */ new Property(this, index, "Target Page Has Toolbar"), +/* 388 */ "No", "Yes"); +/* 389 */ } else if (mode == 1) { +/* 390 */ ret = new Boolean(this._hasToolbar); +/* 391 */ } else if (mode == 2) +/* 392 */ this._hasToolbar = ((Boolean)value).booleanValue(); +/* 393 */ break; +/* */ +/* */ default: +/* 396 */ ret = super.properties(index, offset + 13, mode, value); +/* */ } +/* */ +/* 399 */ if (mode == 2) { +/* 400 */ rebuild(); +/* */ } +/* 402 */ return ret; +/* */ } +/* */ +/* */ +/* 406 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 410 */ s.saveVersion(3, classCookie); +/* 411 */ super.saveState(s); +/* */ +/* 413 */ s.saveString(this._adURL); +/* 414 */ s.saveString(this._textureURL); +/* 415 */ s.saveInt(this._xPercent); +/* 416 */ s.saveInt(this._yPercent); +/* 417 */ s.saveBoolean(this._hasToolbar); +/* 418 */ s.saveBoolean(this._isFixed); +/* 419 */ s.saveInt(this._xSurface); +/* 420 */ s.saveInt(this._ySurface); +/* 421 */ s.saveInt(this._refresh); +/* 422 */ s.saveBoolean(this._passClicks); +/* 423 */ s.saveBoolean(this._isAdBanner); +/* 424 */ s.saveString(this._postTextureData); +/* 425 */ s.saveString(this._postAdData); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 430 */ switch (r.restoreVersion(classCookie)) { +/* */ case 1: +/* 432 */ super.restoreState(r); +/* 433 */ this._adURL = r.restoreString(); +/* 434 */ this._textureURL = r.restoreString(); +/* 435 */ this._xPercent = r.restoreInt(); +/* 436 */ this._yPercent = r.restoreInt(); +/* 437 */ this._hasToolbar = r.restoreBoolean(); +/* 438 */ this._isFixed = r.restoreBoolean(); +/* 439 */ this._xSurface = r.restoreInt(); +/* 440 */ this._ySurface = r.restoreInt(); +/* 441 */ this._refresh = r.restoreInt(); +/* 442 */ this._passClicks = r.restoreBoolean(); +/* 443 */ this._isAdBanner = r.restoreBoolean(); +/* 444 */ break; +/* */ +/* */ case 2: +/* 447 */ super.restoreState(r); +/* 448 */ this._adURL = r.restoreString(); +/* 449 */ this._textureURL = r.restoreString(); +/* 450 */ this._xPercent = r.restoreInt(); +/* 451 */ this._yPercent = r.restoreInt(); +/* 452 */ this._hasToolbar = r.restoreBoolean(); +/* 453 */ this._isFixed = r.restoreBoolean(); +/* 454 */ this._xSurface = r.restoreInt(); +/* 455 */ this._ySurface = r.restoreInt(); +/* 456 */ this._refresh = r.restoreInt(); +/* 457 */ this._passClicks = r.restoreBoolean(); +/* 458 */ this._isAdBanner = r.restoreBoolean(); +/* 459 */ this._postTextureData = r.restoreString(); +/* 460 */ break; +/* */ +/* */ case 3: +/* 463 */ super.restoreState(r); +/* 464 */ this._adURL = r.restoreString(); +/* 465 */ this._textureURL = r.restoreString(); +/* 466 */ this._xPercent = r.restoreInt(); +/* 467 */ this._yPercent = r.restoreInt(); +/* 468 */ this._hasToolbar = r.restoreBoolean(); +/* 469 */ this._isFixed = r.restoreBoolean(); +/* 470 */ this._xSurface = r.restoreInt(); +/* 471 */ this._ySurface = r.restoreInt(); +/* 472 */ this._refresh = r.restoreInt(); +/* 473 */ this._passClicks = r.restoreBoolean(); +/* 474 */ this._isAdBanner = r.restoreBoolean(); +/* 475 */ this._postTextureData = r.restoreString(); +/* 476 */ this._postAdData = r.restoreString(); +/* 477 */ break; +/* */ default: +/* 479 */ throw new TooNewException(); +/* */ } +/* */ +/* 482 */ rebuild(); +/* */ } +/* */ +/* */ public boolean acceptsLeftClicks() +/* */ { +/* 487 */ if (getIsAdBanner()) { +/* 488 */ return true; +/* */ } +/* 490 */ return getMouseOver(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WebPageWall.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WebWallControlAction.java b/NET/worlds/scape/WebWallControlAction.java new file mode 100644 index 0000000..dac9611 --- /dev/null +++ b/NET/worlds/scape/WebWallControlAction.java @@ -0,0 +1,180 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.WebControlImp; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WebWallControlAction +/* */ extends Action +/* */ { +/* */ WebWallControlAction() +/* */ { +/* 16 */ this.mode = 1; +/* 17 */ this.webWall = null; +/* 18 */ this.postData = null; +/* 19 */ this.url = "http://www.worlds.com/"; +/* */ } +/* */ +/* */ +/* 23 */ private final int reload = 1; +/* 24 */ private final int setURL = 2; +/* 25 */ private final int refresh = 3; +/* 26 */ private final int back = 4; +/* 27 */ private final int forward = 5; +/* 28 */ private final int stop = 6; +/* 29 */ private final int home = 7; +/* */ private int mode; +/* */ private String url; +/* */ private String postData; +/* */ private WebPageWall webWall; +/* */ +/* */ public Persister trigger(Event e, Persister seqID) { +/* 36 */ if (!getWebWall()) +/* */ { +/* 38 */ System.out.println("ERROR! Tried to attach WebWallControlAction to something other than a WebWall object."); +/* */ +/* 40 */ return null; +/* */ } +/* */ +/* 43 */ switch (this.mode) +/* */ { +/* */ case 1: +/* 46 */ this.webWall.rebuild(); +/* 47 */ break; +/* */ +/* */ case 2: +/* 50 */ this.webWall.getWebControlImp().setURL(this.url, this.postData); +/* 51 */ break; +/* */ +/* */ case 3: +/* 54 */ this.webWall.getWebControlImp().refresh(); +/* 55 */ break; +/* */ +/* */ case 4: +/* 58 */ this.webWall.getWebControlImp().goBack(); +/* 59 */ break; +/* */ +/* */ case 5: +/* 62 */ this.webWall.getWebControlImp().goForward(); +/* 63 */ break; +/* */ +/* */ case 6: +/* 66 */ this.webWall.getWebControlImp().stop(); +/* 67 */ break; +/* */ +/* */ case 7: +/* 70 */ this.webWall.getWebControlImp().home(); +/* */ } +/* */ +/* */ +/* 74 */ return null; +/* */ } +/* */ +/* */ +/* */ private boolean getWebWall() +/* */ { +/* 80 */ if (this.webWall != null) { +/* 81 */ return true; +/* */ } +/* */ +/* */ +/* 85 */ Object owner = getOwner(); +/* 86 */ if ((owner == null) || (!(owner instanceof WebPageWall))) { +/* 87 */ return false; +/* */ } +/* 89 */ this.webWall = ((WebPageWall)owner); +/* */ +/* 91 */ if (this.webWall == null) +/* */ { +/* 93 */ return false; +/* */ } +/* */ +/* 96 */ if (this.webWall.getWebControlImp() == null) { +/* 97 */ return false; +/* */ } +/* 99 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* 104 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 108 */ s.saveVersion(0, classCookie); +/* 109 */ super.saveState(s); +/* 110 */ s.saveInt(this.mode); +/* 111 */ s.saveString(this.url); +/* 112 */ s.saveString(this.postData); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 117 */ switch (r.restoreVersion(classCookie)) +/* */ { +/* */ case 0: +/* 120 */ super.restoreState(r); +/* 121 */ this.mode = r.restoreInt(); +/* 122 */ this.url = r.restoreString(); +/* 123 */ this.postData = r.restoreString(); +/* */ } +/* */ +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int pmode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 134 */ Object ret = null; +/* 135 */ switch (index - offset) { +/* */ case 0: +/* 137 */ if (pmode == 0) { +/* 138 */ ret = IntegerPropertyEditor.make( +/* 139 */ new Property(this, index, "1=Reload, 2=SetURL, 3=Refresh, 4=Back, 5=Fwd, 6=Stop, 7=Home")); +/* */ } +/* 141 */ else if (pmode == 1) { +/* 142 */ ret = new Integer(this.mode); +/* 143 */ } else if (pmode == 2) +/* 144 */ this.mode = ((Integer)value).intValue(); +/* 145 */ break; +/* */ +/* */ case 1: +/* 148 */ if (pmode == 0) { +/* 149 */ ret = StringPropertyEditor.make(new Property(this, +/* 150 */ index, +/* 151 */ "URL for mode 2")); +/* 152 */ } else if (pmode == 1) { +/* 153 */ ret = this.url; +/* 154 */ } else if (pmode == 2) +/* 155 */ this.url = ((String)value).trim(); +/* 156 */ break; +/* */ +/* */ case 2: +/* 159 */ if (pmode == 0) { +/* 160 */ ret = StringPropertyEditor.make(new Property(this, +/* 161 */ index, +/* 162 */ "POST data for mode 2")); +/* 163 */ } else if (pmode == 1) { +/* 164 */ ret = this.postData; +/* 165 */ } else if (pmode == 2) +/* 166 */ this.postData = ((String)value).trim(); +/* 167 */ break; +/* */ +/* */ default: +/* 170 */ ret = super.properties(index, offset + 3, pmode, value); +/* */ } +/* 172 */ return ret; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WebWallControlAction.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/Whiteboard.java b/NET/worlds/scape/Whiteboard.java new file mode 100644 index 0000000..111cb83 --- /dev/null +++ b/NET/worlds/scape/Whiteboard.java @@ -0,0 +1,146 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import java.awt.Color; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class Whiteboard +/* */ extends Attribute +/* */ { +/* */ public Whiteboard(int attrID) +/* */ { +/* 28 */ super(attrID); +/* */ } +/* */ +/* */ +/* */ +/* */ public Whiteboard() {} +/* */ +/* */ +/* */ protected void noteAddingTo(SuperRoot owner) +/* */ { +/* 38 */ nada((Surface)((Sharer)owner).getOwner()); +/* */ +/* 40 */ setOwnerText(); +/* */ } +/* */ +/* */ +/* 44 */ String _line = "default text"; +/* */ +/* */ +/* */ +/* */ +/* */ public void set(String s) +/* */ { +/* 51 */ this._line = s; +/* */ +/* 53 */ setOwnerText(); +/* */ +/* 55 */ noteChange(); +/* */ } +/* */ +/* */ +/* */ protected void nada(Surface s) {} +/* */ +/* */ private void setOwnerText() +/* */ { +/* 63 */ Sharer sh = (Sharer)getOwner(); +/* 64 */ if (sh == null) { +/* 65 */ return; +/* */ } +/* 67 */ Surface surf = (Surface)sh.getOwner(); +/* */ +/* 69 */ surf.setMaterial(new Material(new StringTexture(this._line, +/* 70 */ Console.message("MaterialFont"), 20, Color.black, +/* 71 */ Color.white))); +/* */ } +/* */ +/* */ +/* */ +/* */ public String get() +/* */ { +/* 78 */ return this._line; +/* */ } +/* */ +/* */ public void generateNetData(DataOutputStream s) +/* */ throws IOException +/* */ { +/* 84 */ s.writeUTF(this._line); +/* */ } +/* */ +/* */ public void setFromNetData(DataInputStream ds, int len) throws IOException +/* */ { +/* 89 */ set(ds.readUTF()); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 99 */ Object ret = null; +/* 100 */ switch (index - offset) { +/* */ case 0: +/* 102 */ if (mode == 0) { +/* 103 */ ret = StringPropertyEditor.make( +/* 104 */ new Property(this, index, "Whiteboard text")); +/* 105 */ } else if (mode == 1) { +/* 106 */ ret = this._line; +/* 107 */ } else if (mode == 2) +/* 108 */ set((String)value); +/* 109 */ break; +/* */ default: +/* 111 */ ret = super.properties(index, offset + 1, mode, value); +/* */ } +/* 113 */ return ret; +/* */ } +/* */ +/* */ +/* 117 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 121 */ s.saveVersion(0, classCookie); +/* 122 */ super.saveState(s); +/* */ +/* 124 */ s.saveString(this._line); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 129 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 131 */ super.restoreState(r); +/* 132 */ this._line = r.restoreString(); +/* 133 */ break; +/* */ default: +/* 135 */ throw new TooNewException(); +/* */ } +/* */ +/* 138 */ setOwnerText(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\Whiteboard.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WidgetButton.java b/NET/worlds/scape/WidgetButton.java new file mode 100644 index 0000000..d51fca3 --- /dev/null +++ b/NET/worlds/scape/WidgetButton.java @@ -0,0 +1,163 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.GammaFrame; +/* */ import NET.worlds.console.ImageCanvas; +/* */ import java.awt.Canvas; +/* */ import java.awt.Dimension; +/* */ import java.awt.Graphics; +/* */ import java.awt.Image; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ abstract class WidgetButton +/* */ extends Canvas +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ private String name; +/* */ private Image image; +/* */ private Dimension dim; +/* */ private String prompt; +/* */ private ToolBar toolbar; +/* */ private boolean depressed; +/* */ +/* */ WidgetButton(ToolBar toolbar, String name, String prompt) +/* */ { +/* 40 */ this.name = name; +/* 41 */ this.toolbar = toolbar; +/* 42 */ this.prompt = prompt; +/* */ } +/* */ +/* */ public WObject getWObject() +/* */ { +/* 47 */ return this.toolbar.getCurrentWObject(); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 52 */ return null; +/* */ } +/* */ +/* */ protected ToolBar getToolBar() +/* */ { +/* 57 */ return this.toolbar; +/* */ } +/* */ +/* */ protected Point3Temp getWorldAxis(int ax, int ay, int az) +/* */ { +/* 62 */ Point3Temp p = new Point3(ax, ay, az) +/* 63 */ .vectorTimes(Pilot.getActive()); +/* 64 */ float x = Math.abs(p.x); +/* 65 */ float y = Math.abs(p.y); +/* 66 */ float z = Math.abs(p.z); +/* 67 */ if (x > y) { +/* 68 */ if (x > z) { +/* 69 */ return p.x > 0.0F ? Point3Temp.make(1.0F, 0.0F, 0.0F) : +/* 70 */ Point3Temp.make(-1.0F, 0.0F, 0.0F); +/* */ } +/* 72 */ } else if (y > z) +/* 73 */ return p.y > 0.0F ? Point3Temp.make(0.0F, 1.0F, 0.0F) : +/* 74 */ Point3Temp.make(0.0F, -1.0F, 0.0F); +/* 75 */ return p.z > 0.0F ? Point3Temp.make(0.0F, 0.0F, 1.0F) : +/* 76 */ Point3Temp.make(0.0F, 0.0F, -1.0F); +/* */ } +/* */ +/* */ protected void applyWorldTransform(boolean initialDrag, Transform t) +/* */ { +/* 81 */ WObject wobj = getWObject(); +/* 82 */ if (initialDrag) +/* 83 */ Console.getFrame().getEditTile().addUndoable( +/* 84 */ new UndoablTransform(wobj)); +/* 85 */ Point3Temp pos = wobj.getPosition(); +/* 86 */ wobj.moveTo(0.0F, 0.0F, 0.0F).post(t).moveBy(pos); +/* 87 */ wobj.markEdited(); +/* */ } +/* */ +/* */ public void draw(boolean depressed) +/* */ { +/* 92 */ this.depressed = depressed; +/* 93 */ Graphics g = getGraphics(); +/* 94 */ drawOutline(g); +/* 95 */ g.dispose(); +/* */ } +/* */ +/* */ +/* */ public void perform() {} +/* */ +/* */ +/* */ public boolean usesDrag() +/* */ { +/* 104 */ return true; +/* */ } +/* */ +/* */ private void drawOutline(Graphics g) +/* */ { +/* 109 */ g.setColor(getBackground()); +/* 110 */ g.draw3DRect(0, 0, this.dim.width - 1, this.dim.height - 1, !this.depressed); +/* */ } +/* */ +/* */ public boolean available() +/* */ { +/* 115 */ return getWObject() != null; +/* */ } +/* */ +/* */ public void paint(Graphics g) +/* */ { +/* 120 */ super.paint(g); +/* 121 */ if ((available()) && (this.dim.width != 0)) { +/* 122 */ g.drawImage(this.image, 2, 2, this); +/* 123 */ drawOutline(g); +/* */ } +/* */ } +/* */ +/* */ private Dimension imageSize() +/* */ { +/* 129 */ if (this.image == null) { +/* 130 */ this.image = ImageCanvas.getSystemImage(this.name, this); +/* 131 */ if (this.image != null) { +/* 132 */ int width = this.image.getWidth(this); +/* 133 */ int height = this.image.getHeight(this); +/* 134 */ if ((width != -1) && (height != -1)) { +/* 135 */ return this.dim = new Dimension(width + 4, height + 4); +/* */ } +/* */ } +/* 138 */ this.dim = new Dimension(0, 0); +/* */ } +/* 140 */ return this.dim; +/* */ } +/* */ +/* */ public Dimension getPreferredSize() +/* */ { +/* 145 */ return imageSize(); +/* */ } +/* */ +/* */ public Dimension getMinimumSize() +/* */ { +/* 150 */ return imageSize(); +/* */ } +/* */ +/* */ public String getPrompt() +/* */ { +/* 155 */ return this.prompt; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WidgetButton.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WobClassLoader.java b/NET/worlds/scape/WobClassLoader.java new file mode 100644 index 0000000..2ce876b --- /dev/null +++ b/NET/worlds/scape/WobClassLoader.java @@ -0,0 +1,144 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.File; +/* */ import java.io.FileInputStream; +/* */ import java.io.InputStream; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WobClassLoader +/* */ extends ClassLoader +/* */ { +/* 28 */ static Hashtable loaders = new Hashtable(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static synchronized Class get(String zipName, String cname) +/* */ { +/* 41 */ WobClassLoader cl = (WobClassLoader)loaders.get(zipName); +/* */ +/* 43 */ if (cl == null) { +/* 44 */ cl = new WobClassLoader(zipName); +/* 45 */ loaders.put(zipName, cl); +/* */ } +/* */ try +/* */ { +/* 49 */ return cl.loadClass(cname, true); +/* */ } catch (ClassNotFoundException e) {} +/* 51 */ return null; +/* */ } +/* */ +/* */ +/* 55 */ Hashtable> classes = new Hashtable(); +/* */ String zipName; +/* */ +/* */ public WobClassLoader(String n) { +/* 59 */ this.zipName = n; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected synchronized Class loadClass(String cname, boolean resolve) +/* */ throws ClassNotFoundException +/* */ { +/* 68 */ Class cl = (Class)this.classes.get(cname); +/* 69 */ if (cl == null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ try +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 82 */ return findSystemClass(cname); +/* */ } +/* */ catch (NoClassDefFoundError localNoClassDefFoundError) {}catch (ClassNotFoundException localClassNotFoundException) {} +/* */ +/* 86 */ byte[] data = loadData(cname); +/* 87 */ if (data != null) { +/* */ try { +/* 89 */ cl = defineClass(null, data, 0, data.length); +/* */ } catch (ClassFormatError e) { +/* 91 */ throw new ClassNotFoundException(cname); +/* */ } +/* */ } +/* */ +/* 95 */ if ((cl == null) || (!cname.equals(cl.getName()))) { +/* 96 */ throw new ClassNotFoundException(cname); +/* */ } +/* 98 */ this.classes.put(cname, cl); +/* */ } +/* 100 */ if (resolve) +/* 101 */ resolveClass(cl); +/* 102 */ return cl; +/* */ } +/* */ +/* */ +/* */ private byte[] loadData(String cname) +/* */ { +/* 108 */ byte[] data = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* 114 */ InputStream in = null; +/* */ try { +/* 116 */ if (cname != null) { +/* 117 */ File file = new File(this.zipName); +/* 118 */ int len = (int)file.length(); +/* 119 */ in = new FileInputStream(file); +/* */ +/* 121 */ data = new byte[len]; +/* 122 */ if (in.read(data) == len) { +/* 123 */ return data; +/* */ } +/* */ } +/* */ } catch (Exception localException1) {}finally { +/* 127 */ if (in != null) { +/* 128 */ try { in.close(); +/* */ } +/* */ catch (Exception localException3) {} +/* */ } +/* */ } +/* 127 */ if (in != null) +/* 128 */ try { in.close(); +/* */ } catch (Exception localException4) {} +/* 130 */ return null; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WobClassLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WobLoaded.java b/NET/worlds/scape/WobLoaded.java new file mode 100644 index 0000000..909fbf0 --- /dev/null +++ b/NET/worlds/scape/WobLoaded.java @@ -0,0 +1,12 @@ +package NET.worlds.scape; + +public abstract interface WobLoaded +{ + public abstract void wobLoaded(WobLoader paramWobLoader, SuperRoot paramSuperRoot); +} + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WobLoaded.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WobLoader.java b/NET/worlds/scape/WobLoader.java new file mode 100644 index 0000000..013f446 --- /dev/null +++ b/NET/worlds/scape/WobLoader.java @@ -0,0 +1,145 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WobLoader +/* */ implements BGLoaded +/* */ { +/* */ private WobLoaded loaded; +/* */ private URL origURL; +/* */ SuperRoot value; +/* */ +/* */ public WobLoader(URL url, WobLoaded loaded) +/* */ { +/* 31 */ this(url, loaded, false); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WobLoader(URL url, WobLoaded loaded, boolean immediate) +/* */ { +/* 41 */ this.origURL = url; +/* 42 */ this.loaded = loaded; +/* */ +/* 44 */ if (url.endsWith(".class")) { +/* 45 */ String s = url.getAbsolute(); +/* 46 */ if (s.startsWith("system:")) { +/* 47 */ int len = s.length(); +/* */ try { +/* 49 */ Class c = Class.forName(s.substring(7, len - 6)); +/* 50 */ SuperRoot sr = (SuperRoot)c.newInstance(); +/* 51 */ sr.loadInit(); +/* 52 */ gotIt(sr); +/* */ } catch (Exception e) { +/* 54 */ e.printStackTrace(System.out); +/* 55 */ Console.println("Can't make instance of class " + url); +/* 56 */ gotIt(null); +/* */ } +/* 58 */ return; +/* */ } +/* */ } +/* */ +/* 62 */ if (immediate) { +/* 63 */ String s = url.unalias(); +/* 64 */ if (s.indexOf(':') > 1) { +/* 65 */ gotIt(null); +/* */ } else +/* 67 */ syncBackgroundLoad(asyncBackgroundLoad(s, url), url); +/* */ } else { +/* 69 */ BackgroundLoader.get(this, url); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static SuperRoot immediateLoad(URL url) +/* */ { +/* 80 */ WobLoader w = new WobLoader(url, null, true); +/* 81 */ return w.value; +/* */ } +/* */ +/* */ public Object asyncBackgroundLoad(String localName, URL remoteURL) { +/* 85 */ if (remoteURL.endsWith(".class")) { +/* 86 */ return WobClassLoader.get(localName, remoteURL.getClassName()); +/* */ } +/* 88 */ return localName; +/* */ } +/* */ +/* */ public boolean syncBackgroundLoad(Object obj, URL remoteURL) +/* */ { +/* 93 */ SuperRoot sr = null; +/* */ +/* 95 */ if (obj != null) { +/* 96 */ if ((obj instanceof String)) { +/* 97 */ sr = SuperRoot.readFile((String)obj, remoteURL); +/* */ } else { +/* */ try { +/* 100 */ sr = (SuperRoot)((Class)obj).newInstance(); +/* 101 */ sr.loadInit(); +/* */ } catch (Exception e) { +/* 103 */ e.printStackTrace(System.out); +/* */ } +/* */ } +/* */ } +/* 107 */ gotIt(sr); +/* 108 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ private void gotIt(SuperRoot s) +/* */ { +/* 115 */ if (s != null) { +/* 116 */ s.setSourceURL(this.origURL); +/* */ } +/* 118 */ this.value = s; +/* 119 */ if (this.loaded != null) { +/* 120 */ this.loaded.wobLoaded(this, s); +/* */ } +/* */ } +/* */ +/* */ public Room getBackgroundLoadRoom() { +/* 125 */ if ((this.loaded instanceof SuperRoot)) { +/* 126 */ SuperRoot o = (SuperRoot)this.loaded; +/* */ +/* 128 */ while (o != null) { +/* 129 */ if ((o instanceof WObject)) +/* 130 */ return ((WObject)o).getRoom(); +/* 131 */ o = o.getOwner(); +/* */ } +/* */ } +/* */ +/* 135 */ return null; +/* */ } +/* */ +/* 138 */ public URL getWobName() { return this.origURL; } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WobLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/World.java b/NET/worlds/scape/World.java new file mode 100644 index 0000000..6490ffc --- /dev/null +++ b/NET/worlds/scape/World.java @@ -0,0 +1,1650 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.AdBanner; +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.Gamma; +/* */ import NET.worlds.console.Main; +/* */ import NET.worlds.console.ProgressBar; +/* */ import NET.worlds.console.Shaper; +/* */ import NET.worlds.console.WorldsMarkPart; +/* */ import NET.worlds.core.Hashtable; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import NET.worlds.network.WorldServer; +/* */ import java.io.BufferedReader; +/* */ import java.io.File; +/* */ import java.io.FileReader; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.text.MessageFormat; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class World +/* */ extends SuperRoot +/* */ implements URLSelf, LoadedURLSelf, IncrementalRestorer +/* */ { +/* */ public World getWorld() +/* */ { +/* 160 */ return this; +/* */ } +/* */ +/* 163 */ static WorldRedirector redir = new WorldRedirector(URL.make(Gamma.getHome() + +/* 164 */ "redir.txt")); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static void load(URL url, LoadedURLSelf callback, boolean force) +/* */ { +/* 173 */ if (Gamma.loadProgress != null) { +/* 174 */ Gamma.loadProgress.setMessage("Loading world files..."); +/* 175 */ Gamma.loadProgress.advance(); +/* */ } +/* */ +/* */ +/* 179 */ if (url.toString().indexOf("UserHomeWorld") != -1) { +/* 180 */ String homeWorld = WorldsMarkPart.getFirstSystemMarkURL(); +/* 181 */ if (homeWorld != null) +/* */ { +/* 183 */ int poundIdx = homeWorld.indexOf("#"); +/* 184 */ if (poundIdx != -1) +/* 185 */ homeWorld = homeWorld.substring(0, poundIdx); +/* 186 */ url = URL.make(homeWorld); +/* */ } +/* */ } +/* */ +/* */ +/* 191 */ File f = new File(url.unalias()); +/* 192 */ if (!f.exists()) { +/* 193 */ url = redir.get(url); +/* */ } +/* 195 */ if (isProscribed(url, force)) { +/* 196 */ callback.loadedURLSelf(null, url, "Can't autoload WorldsStore"); +/* 197 */ return; +/* */ } +/* */ +/* */ +/* */ +/* 202 */ World w = (World)worldHash.get(url); +/* 203 */ if (w != null) { +/* 204 */ w.incRef(); +/* 205 */ callback.loadedURLSelf(w, url, null); +/* */ } else { +/* 207 */ URLSelfLoader.load(url, callback, true); +/* */ } +/* */ } +/* */ +/* 211 */ public static void load(URL url, LoadedURLSelf callback) { load(url, callback, false); } +/* */ +/* */ +/* 214 */ private static boolean cloistered = false; +/* 215 */ private static boolean cloisteredSet = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isCloistered() +/* */ { +/* 223 */ if (!cloisteredSet) { +/* 224 */ URL homeDir = URL.make("home:" + WorldsMarkPart.getFirstWorld()); +/* 225 */ cloistered = new File(homeDir.unalias() + "/cloistered").exists(); +/* 226 */ cloisteredSet = true; +/* */ } +/* 228 */ return cloistered; +/* */ } +/* */ +/* */ public static URL getHomeStore() { +/* 232 */ URL storeinf = URL.make("home:" + WorldsMarkPart.getFirstWorld() + +/* 233 */ "/store.inf"); +/* 234 */ URL homeStore = URL.make("home:PolyGram/polygramdlb.world"); +/* */ +/* 236 */ File sf = new File(storeinf.unalias()); +/* 237 */ if ((!sf.exists()) || (!sf.isFile())) { +/* 238 */ sf = new File(URL.make("home:PolyGram/store.inf").unalias()); +/* 239 */ if ((!sf.exists()) || (!sf.isFile())) { +/* 240 */ return homeStore; +/* */ } +/* */ } +/* */ try +/* */ { +/* 245 */ BufferedReader rdr = new BufferedReader(new FileReader(sf)); +/* 246 */ String s = rdr.readLine(); +/* 247 */ rdr.close(); +/* 248 */ homeStore = new URL(s); +/* */ } +/* */ catch (IOException localIOException) {} +/* */ +/* 252 */ return homeStore; +/* */ } +/* */ +/* */ public static boolean isWorldsStoreProscribed() { +/* 256 */ return (isCloistered()) && +/* 257 */ (IniFile.gamma().getIniInt("WorldsStoreProscribed", 1) != 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public static boolean isProscribed(URL url, boolean forceLoad) +/* */ { +/* 270 */ if ((!forceLoad) && (!WorldValidator.allow(url.toString()))) { +/* 271 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 283 */ return false; +/* */ } +/* */ +/* */ public boolean isHomeWorld() { +/* 287 */ URL url = getSourceURL(); +/* 288 */ if (url != null) { +/* 289 */ URL homeURL = URL.make("home:" + WorldsMarkPart.getFirstWorld()); +/* 290 */ if (url.unalias().startsWith(homeURL.unalias() + "/")) +/* 291 */ return true; +/* */ } +/* 293 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setEdited(boolean state) +/* */ { +/* 301 */ if (state != this.hasBeenEdited) { +/* 302 */ this.hasBeenEdited = state; +/* 303 */ worldListChanged(); +/* */ } +/* */ } +/* */ +/* */ public void markEdited() +/* */ { +/* 309 */ setEdited(true); +/* */ } +/* */ +/* 312 */ private String adCubeBaseURL = null; +/* */ +/* */ public String getAdCubeBaseURL() { +/* 315 */ if (this.adCubeBaseURL == null) { +/* 316 */ String worldURL = getSourceURL().toString(); +/* */ +/* */ +/* 319 */ if (worldURL.lastIndexOf("/") == -1) { +/* 320 */ return "ads/ad"; +/* */ } +/* 322 */ worldURL = worldURL.substring(0, worldURL.lastIndexOf("/")); +/* */ +/* 324 */ WorldServer w = Pilot.getActive().getServer(); +/* 325 */ if ((w != null) && (w.getGalaxy().getOnline())) { +/* 326 */ String adserverURL = NetUpdate.getUpgradeServerURL(); +/* 327 */ if (adserverURL != null) +/* */ { +/* 329 */ int i1 = worldURL.lastIndexOf("/"); +/* 330 */ int i2 = worldURL.lastIndexOf(":"); +/* 331 */ i1 = i1 > i2 ? i1 : i2; +/* 332 */ if (i1 > -1) { +/* 333 */ worldURL = worldURL.substring(i1 + 1); +/* */ } +/* 335 */ return adserverURL + worldURL + "/ads/ad"; +/* */ } +/* */ } +/* */ +/* 339 */ return worldURL + "/ads/ad"; +/* */ } +/* */ +/* 342 */ return this.adCubeBaseURL; +/* */ } +/* */ +/* */ public void setAdCubeBaseURL(String s) { +/* 346 */ this.adCubeBaseURL = new String(s); +/* */ } +/* */ +/* 349 */ private boolean hasClickableAdCube = false; +/* */ +/* */ public boolean getHasClickableAdCube() { +/* 352 */ return this.hasClickableAdCube; +/* */ } +/* */ +/* */ public void setHasClickableAdCube(boolean b) { +/* 356 */ this.hasClickableAdCube = b; +/* */ } +/* */ +/* 359 */ private boolean adCubeFormatIsGif = false; +/* */ +/* */ public boolean getAdCubeFormatIsGif() { +/* 362 */ return this.adCubeFormatIsGif; +/* */ } +/* */ +/* */ public void setAdCubeFormatIsGif(boolean b) { +/* 366 */ this.adCubeFormatIsGif = b; +/* */ } +/* */ +/* 369 */ private String defaultAdCubeURL = IniFile.override().getIniString( +/* 370 */ "defaultAdCubeURL", "http://www.worlds.com/"); +/* */ +/* */ public String getDefaultAdCubeURL() { +/* 373 */ return this.defaultAdCubeURL; +/* */ } +/* */ +/* */ public void setDefaultAdCubeURL(String s) { +/* 377 */ this.defaultAdCubeURL = new String(s); +/* */ } +/* */ +/* */ +/* */ +/* */ public boolean getEdited() +/* */ { +/* 384 */ return this.hasBeenEdited; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 391 */ private boolean hasBeenEdited = false; +/* */ +/* */ +/* */ +/* */ private static void worldListChanged() +/* */ { +/* 397 */ if (Gamma.getShaper() != null) { +/* 398 */ Gamma.getShaper().worldListChange(); +/* */ } +/* */ } +/* */ +/* */ +/* */ public void getChildren(DeepEnumeration d) +/* */ { +/* 405 */ d.addChildEnumeration(getRooms()); +/* 406 */ if (this.eventHandlers != null) { +/* 407 */ d.addChildVector(this.eventHandlers); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Room getRoom(String roomName) +/* */ { +/* 416 */ if (roomName.indexOf("UserHomeRoom") != -1) { +/* 417 */ roomName = getDefaultRoomName(); +/* */ } +/* */ +/* 420 */ return (Room)this.roomHash.get(roomName); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public String getDefaultRoomName() +/* */ { +/* 430 */ if (getRoom(this.defaultRoomName) == null) { +/* 431 */ if (this.roomList.isEmpty()) { +/* 432 */ this.defaultRoomName = ""; +/* */ } else { +/* 434 */ this.defaultRoomName = ((Room)this.roomList.elementAt(0)).getName(); +/* */ } +/* */ } +/* 437 */ return this.defaultRoomName; +/* */ } +/* */ +/* */ public void setDefaultRoomName(String name) { +/* 441 */ this.defaultRoomName = name; +/* */ } +/* */ +/* 444 */ private String defaultRoomName = ""; +/* */ +/* */ +/* */ +/* */ +/* */ public void addRoom(Room room) +/* */ { +/* 451 */ String name = room.getName(); +/* 452 */ int roomNum = 1; +/* 453 */ while (getRoom(name) != null) +/* 454 */ name = "Room" + roomNum++; +/* 455 */ room.setName(name); +/* 456 */ this.roomHash.put(name, room); +/* 457 */ this.roomList.addElement(room); +/* 458 */ add(room); +/* */ +/* 460 */ URL sourceURL = getSourceURL(); +/* 461 */ if ((sourceURL != null) && (worldHash.containsKey(sourceURL))) +/* */ { +/* */ +/* 464 */ room.register(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void renameRoom(String oldName, String newName, Room room) +/* */ { +/* 474 */ if (oldName != null) { +/* 475 */ assert (this.roomHash.get(oldName) == room); +/* 476 */ this.roomHash.remove(oldName); +/* */ } else { +/* 478 */ assert (!this.roomList.removeElement(room)); +/* 479 */ this.roomList.addElement(room); +/* */ } +/* */ +/* 482 */ assert (newName != null); +/* 483 */ assert (room.getName().equals(newName)); +/* 484 */ this.roomHash.put(newName, room); +/* */ } +/* */ +/* */ +/* */ +/* */ public void removeRoom(Room room) +/* */ { +/* 491 */ this.roomHash.remove(this.roomHash.getKey(room)); +/* 492 */ this.roomList.removeElement(room); +/* */ } +/* */ +/* */ +/* */ +/* */ public Enumeration getRooms() +/* */ { +/* 499 */ return this.roomList.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ public static Room findRoomByName(String name) +/* */ { +/* 506 */ Enumeration we = worldList.elements(); +/* 507 */ Enumeration re; for (; we.hasMoreElements(); +/* */ +/* */ +/* 510 */ re.hasMoreElements()) +/* */ { +/* 508 */ World w = (World)we.nextElement(); +/* 509 */ re = w.getRooms(); +/* 510 */ continue; +/* 511 */ Room r = (Room)re.nextElement(); +/* 512 */ if (r.toString().equals(name)) { +/* 513 */ return r; +/* */ } +/* */ } +/* 516 */ return null; +/* */ } +/* */ +/* 519 */ protected Hashtable roomHash = new Hashtable(); +/* 520 */ protected Vector roomList = new Vector(); +/* */ +/* */ Vector eventHandlers; +/* */ +/* */ public void invokeActions(String actLabel) +/* */ { +/* 526 */ Enumeration en = getDeepOwned(); +/* 527 */ while (en.hasMoreElements()) { +/* 528 */ Object obj = en.nextElement(); +/* 529 */ if ((obj instanceof WObject)) { +/* 530 */ ((WObject)obj).doAction(actLabel, null); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean deliver(FrameEvent event) +/* */ { +/* 546 */ if (this.eventHandlers != null) { +/* 547 */ if (Main.profile != 0) { +/* 548 */ int i = this.eventHandlers.size(); +/* 549 */ do { FrameHandler fh = (FrameHandler)this.eventHandlers.elementAt(i); +/* 550 */ int start = Std.getRealTime(); +/* 551 */ long startBytes = Runtime.getRuntime().freeMemory(); +/* 552 */ event.retargetAndDeliver(fh, null); +/* 553 */ int dur = Std.getRealTime() - start; +/* 554 */ long used = Runtime.getRuntime().freeMemory() - startBytes; +/* 555 */ if (dur > Main.profile) { +/* 556 */ System.out.println("Took " + dur + "ms and " + used + +/* 557 */ " bytes to call world eventHandler " + fh); +/* */ } +/* 548 */ i--; } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ } +/* */ else +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 560 */ int i = this.eventHandlers.size(); +/* 561 */ do { event.retargetAndDeliver( +/* 562 */ (FrameHandler)this.eventHandlers.elementAt(i), null);i--; +/* 560 */ } while (i >= 0); +/* */ } +/* */ } +/* */ +/* 564 */ return true; +/* */ } +/* */ +/* 567 */ private static boolean[] didTouch = new boolean[1]; +/* */ +/* */ +/* */ private static int lastGeneratedFrameEvents; +/* */ +/* */ +/* */ private int renderStamp; +/* */ +/* */ +/* */ public static void generateFrameEvents(FrameEvent f) +/* */ { +/* 578 */ didTouch[0] = false; +/* */ +/* 580 */ int now = Std.getFastTime(); +/* */ +/* 582 */ int i = worldList.size(); +/* 583 */ do { World w = (World)worldList.elementAt(i); +/* 584 */ if (!w.discardIfOld(didTouch)) { +/* 585 */ w.deliver(f); +/* */ } +/* 582 */ i--; } while (i >= 0); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 590 */ if (Pilot.getActiveWorld() != null) { +/* 591 */ lastGeneratedFrameEvents = now; +/* */ } +/* */ } +/* */ +/* */ public Enumeration getHandlers() +/* */ { +/* 597 */ if (this.eventHandlers == null) { +/* 598 */ return new Vector().elements(); +/* */ } +/* 600 */ return this.eventHandlers.elements(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public boolean hasHandler(SuperRoot h) +/* */ { +/* 609 */ return (this.eventHandlers != null) && (this.eventHandlers.indexOf(h) != -1); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public World addHandler(SuperRoot h) +/* */ { +/* 618 */ if (!(h instanceof FrameHandler)) +/* */ { +/* 620 */ Object[] arguments = { new String(h.getName()) }; +/* 621 */ Console.println(MessageFormat.format( +/* 622 */ Console.message("FrameHandler"), arguments)); +/* 623 */ return this; +/* */ } +/* 625 */ if (this.eventHandlers == null) +/* 626 */ this.eventHandlers = new Vector(); +/* 627 */ this.eventHandlers.addElement(h); +/* */ +/* 629 */ add(h); +/* */ +/* 631 */ return this; +/* */ } +/* */ +/* */ +/* */ +/* */ public void removeHandler(SuperRoot h) +/* */ { +/* 638 */ if (this.eventHandlers.contains(h)) { +/* 639 */ h.detach(); +/* */ +/* 641 */ this.eventHandlers.removeElement(h); +/* 642 */ if (this.eventHandlers.size() == 0) { +/* 643 */ this.eventHandlers = null; +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void incRef() +/* */ { +/* 654 */ this.renderStamp = Std.getFastTime(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 675 */ private int timeoutAge = 15000; +/* 676 */ private int nextRoomCheck = 0; +/* */ +/* */ +/* */ +/* */ +/* */ public void decRef() {} +/* */ +/* */ +/* */ +/* */ +/* */ private void touchAdjacentRooms(boolean[] didTouch) +/* */ { +/* 688 */ if (didTouch[0] == 0) { +/* 689 */ didTouch[0] = true; +/* */ +/* */ +/* 692 */ Room r = Pilot.getActiveRoom(); +/* 693 */ if (r != null) { +/* 694 */ Vector portals = r.getOutgoingPortals(); +/* 695 */ int i = portals.size(); +/* 696 */ do { Room farr = ((Portal)portals.elementAt(i)).farSideRoom(); +/* 697 */ if (farr != null) { +/* 698 */ farr.noteRef(); +/* */ } +/* 695 */ i--; } while (i >= 0); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ boolean discardIfOld(boolean[] didTouch) +/* */ { +/* 712 */ int now = Std.getFastTime(); +/* 713 */ if (now < this.nextRoomCheck) { +/* 714 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 722 */ this.nextRoomCheck = (now + 5000 + (int)(3000.0D * Math.random())); +/* */ +/* 724 */ touchAdjacentRooms(didTouch); +/* */ +/* 726 */ int i = this.roomList.size(); +/* 727 */ do { ((Room)this.roomList.elementAt(i)).discardIfOld();i--; +/* 726 */ } while (i >= 0); +/* */ +/* */ +/* 729 */ if (this.hasBeenEdited) { +/* 730 */ return false; +/* */ } +/* 732 */ int age = now - this.renderStamp; +/* 733 */ if ((age > this.timeoutAge) && (this.renderStamp < lastGeneratedFrameEvents)) +/* */ { +/* */ +/* 736 */ if (age > this.timeoutAge) { +/* 737 */ discard(); +/* 738 */ return true; +/* */ } +/* */ } +/* */ +/* 742 */ return false; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public void discard() +/* */ { +/* 754 */ URL url = getSourceURL(); +/* 755 */ synchronized (worldHash) { +/* 756 */ worldHash.remove(url); +/* 757 */ worldList.removeElement(this); +/* */ } +/* 759 */ worldListChanged(); +/* */ +/* 761 */ URLSelfLoader.unload(this); +/* */ +/* 763 */ if (this.eventHandlers != null) { +/* 764 */ int i = this.eventHandlers.size(); +/* 765 */ do { removeHandler((SuperRoot)this.eventHandlers.elementAt(i));i--; +/* 764 */ } while (i >= 0); +/* */ } +/* 766 */ assert (this.eventHandlers == null); +/* */ +/* */ +/* */ +/* */ +/* 771 */ discardRooms(); +/* */ +/* 773 */ if (this.console != null) +/* 774 */ this.console.decRef(); +/* 775 */ this.console = null; +/* */ +/* */ +/* 778 */ System.gc(); +/* 779 */ System.runFinalization(); +/* */ } +/* */ +/* */ private void discardRooms() +/* */ { +/* 784 */ while (!this.roomList.isEmpty()) { +/* 785 */ Room r = (Room)this.roomList.elementAt(0); +/* 786 */ r.discard(); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ protected void finalize() +/* */ { +/* 795 */ discardRooms(); +/* 796 */ super.finalize(); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 803 */ private static Hashtable worldHash = new Hashtable(); +/* 804 */ private static Vector worldList = new Vector(); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 811 */ private boolean registerable = false; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void markInitialized() +/* */ { +/* 820 */ if (getSourceURL() != null) { +/* 821 */ register(); +/* */ } else { +/* 823 */ this.registerable = true; +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ private void register() +/* */ { +/* 831 */ URL url = getSourceURL(); +/* 832 */ synchronized (worldHash) { +/* 833 */ assert (!worldHash.containsKey(url)); +/* 834 */ worldHash.put(url, this); +/* 835 */ worldList.addElement(this); +/* */ } +/* 837 */ worldListChanged(); +/* 838 */ this.registerable = false; +/* */ +/* */ +/* */ +/* 842 */ int i = this.roomList.size(); +/* 843 */ do { ((Room)this.roomList.elementAt(i)).register();i--; +/* 842 */ } while (i >= 0); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void setSourceURL(URL url) +/* */ { +/* 850 */ super.setSourceURL(url); +/* */ +/* 852 */ if (this.registerable) { +/* 853 */ register(); +/* */ } +/* */ } +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) throws NoSuchPropertyException +/* */ { +/* 859 */ Object ret = null; +/* */ +/* 861 */ switch (index - offset) { +/* */ case 0: +/* 863 */ if (mode == 0) { +/* 864 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 865 */ "Default Room Name")); +/* 866 */ } else if (mode == 1) { +/* 867 */ ret = getDefaultRoomName(); +/* 868 */ } else if (mode == 2) { +/* 869 */ String name = (String)value; +/* 870 */ if (getRoom(name) == null) { +/* 871 */ Console.println(name + Console.message("No-room-named")); +/* */ } else +/* 873 */ setDefaultRoomName(name); +/* */ } +/* 875 */ break; +/* */ +/* */ case 1: +/* 878 */ if (mode == 0) { +/* 879 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 880 */ "Multiuser"), "No", "Yes"); +/* 881 */ } else if (mode == 1) { +/* 882 */ ret = new Boolean(getMultiuser()); +/* 883 */ } else if (mode == 2) +/* 884 */ setMultiuser(((Boolean)value).booleanValue()); +/* 885 */ break; +/* */ case 2: +/* 887 */ if (mode == 0) { +/* 888 */ ret = new Property(this, index, "Console"); +/* 889 */ } else if (mode == 1) +/* 890 */ ret = this.console; +/* 891 */ break; +/* */ +/* */ case 3: +/* 894 */ if (mode == 0) { +/* 895 */ ret = PropAdder.make(new VectorProperty(this, index, "Rooms")); +/* 896 */ } else if (mode == 1) { +/* 897 */ ret = VectorProperty.toVector(this.roomHash); +/* 898 */ } else if (mode == 4) { +/* 899 */ ((Room)value).detach(); +/* 900 */ } else if (mode == 3) { +/* 901 */ if (!(value instanceof Room)) +/* 902 */ throw new Error("Can only add Rooms to a World."); +/* 903 */ addRoom((Room)value); +/* 904 */ } else if ((mode == 5) && ((value instanceof Room))) { +/* 905 */ ret = value; } +/* 906 */ break; +/* */ case 4: +/* 908 */ if (mode == 0) { +/* 909 */ ret = FloatPropertyEditor.make(new Property(this, index, +/* 910 */ "Time-out Age (seconds)")); +/* 911 */ } else if (mode == 1) { +/* 912 */ ret = new Float(this.timeoutAge / 1000.0F); +/* 913 */ } else if (mode == 2) { +/* 914 */ this.timeoutAge = Math.round(((Float)value).floatValue() * 1000.0F); +/* */ } +/* 916 */ break; +/* */ +/* */ case 5: +/* 919 */ if (mode == 0) { +/* 920 */ ret = PropAdder.make(new VectorProperty(this, index, +/* 921 */ "Running Actions (delete to stop)")); +/* 922 */ } else if (mode == 1) { +/* 923 */ if (this.eventHandlers != null) +/* 924 */ ret = this.eventHandlers.clone(); +/* 925 */ } else if (mode == 4) { +/* 926 */ removeHandler((SuperRoot)value); +/* */ } +/* 928 */ break; +/* */ case 6: +/* 930 */ if (mode == 0) { +/* 931 */ ret = URLPropertyEditor.make(new Property(this, index, +/* 932 */ "Server URL"), "console"); +/* 933 */ } else if (mode == 1) { +/* 934 */ ret = this.desiredWorldServerURL; +/* 935 */ if (ret != null) { +/* 936 */ String u = this.desiredWorldServerURL.unalias(); +/* 937 */ if (u.startsWith("worldserver://")) +/* 938 */ ret = URL.make(u + "default.console"); +/* */ } +/* 940 */ } else if (mode == 2) { +/* 941 */ URL url = (URL)value; +/* 942 */ if (url != null) { +/* 943 */ String u = url.unalias(); +/* 944 */ int len = u.length(); +/* 945 */ if (u.startsWith("worldserver://")) +/* */ { +/* 947 */ if ((!url.endsWith("/default.console")) || (len < 31)) { +/* 948 */ Console.println( +/* 949 */ Console.message("server-URL") + "default.console"); +/* */ } +/* */ else +/* */ { +/* 953 */ u = u.substring(14, len - 16); } +/* */ } else +/* 955 */ url = Console.makeServerURL(u); +/* */ } else { +/* 957 */ setWorldServerURL(url); +/* */ } } +/* 959 */ break; +/* */ case 7: +/* 961 */ if (mode == 0) { +/* 962 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 963 */ "Courtesy VIP"), "No", "Yes"); +/* 964 */ } else if (mode == 1) { +/* 965 */ ret = new Boolean(getCourtesyVIP()); +/* 966 */ } else if (mode == 2) +/* 967 */ setCourtesyVIP(((Boolean)value).booleanValue()); +/* 968 */ break; +/* */ +/* */ case 8: +/* 971 */ if (mode == 0) { +/* 972 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 973 */ "Force Human"), "No", "Yes"); +/* 974 */ } else if (mode == 1) { +/* 975 */ ret = new Boolean(getForceHuman()); +/* 976 */ } else if (mode == 2) +/* 977 */ setForceHuman(((Boolean)value).booleanValue()); +/* 978 */ break; +/* */ +/* */ case 9: +/* 981 */ if (mode == 0) { +/* 982 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 983 */ "Has Ad Banner"), "No", "Yes"); +/* 984 */ } else if (mode == 1) { +/* 985 */ ret = new Boolean(getHasAdBanner()); +/* 986 */ } else if (mode == 2) { +/* 987 */ setHasAdBanner(((Boolean)value).booleanValue()); +/* 988 */ setupAdBanner(); +/* */ } +/* 990 */ break; +/* */ case 10: +/* 992 */ if (mode == 0) { +/* 993 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 994 */ "Banner Width")); +/* 995 */ } else if (mode == 1) { +/* 996 */ ret = new Integer(getBannerWidth()); +/* 997 */ } else if (mode == 2) { +/* 998 */ setBannerWidth(((Integer)value).intValue()); +/* 999 */ setupAdBanner(); +/* */ } +/* 1001 */ break; +/* */ case 11: +/* 1003 */ if (mode == 0) { +/* 1004 */ ret = IntegerPropertyEditor.make(new Property(this, index, +/* 1005 */ "Banner Height")); +/* 1006 */ } else if (mode == 1) { +/* 1007 */ ret = new Integer(getBannerHeight()); +/* 1008 */ } else if (mode == 2) { +/* 1009 */ setBannerHeight(((Integer)value).intValue()); +/* 1010 */ setupAdBanner(); +/* */ } +/* 1012 */ break; +/* */ case 12: +/* 1014 */ if (mode == 0) { +/* 1015 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 1016 */ "Ad Banner URL")); +/* 1017 */ } else if (mode == 1) { +/* 1018 */ ret = getBannerURL(); +/* 1019 */ } else if (mode == 2) { +/* 1020 */ String name = (String)value; +/* 1021 */ setBannerURL(name); +/* */ } +/* 1023 */ break; +/* */ case 13: +/* 1025 */ if (mode == 0) { +/* 1026 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1027 */ "Has Clickable Ad Cube"), "No", "Yes"); +/* 1028 */ } else if (mode == 1) { +/* 1029 */ ret = new Boolean(getHasClickableAdCube()); +/* 1030 */ } else if (mode == 2) { +/* 1031 */ setHasClickableAdCube(((Boolean)value).booleanValue()); +/* */ } +/* 1033 */ break; +/* */ +/* */ case 14: +/* 1036 */ if (mode == 0) { +/* 1037 */ ret = BooleanPropertyEditor.make(new Property(this, index, +/* 1038 */ "Ad Cube image format"), "CMP", "GIF"); +/* 1039 */ } else if (mode == 1) { +/* 1040 */ ret = new Boolean(getAdCubeFormatIsGif()); +/* 1041 */ } else if (mode == 2) { +/* 1042 */ setAdCubeFormatIsGif(((Boolean)value).booleanValue()); +/* */ } +/* 1044 */ break; +/* */ +/* */ case 15: +/* 1047 */ if (mode == 0) { +/* 1048 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 1049 */ "Ad cube base URL")); +/* 1050 */ } else if (mode == 1) { +/* 1051 */ ret = getAdCubeBaseURL(); +/* 1052 */ } else if (mode == 2) { +/* 1053 */ String name = (String)value; +/* 1054 */ setAdCubeBaseURL(name); +/* */ } +/* 1056 */ break; +/* */ +/* */ case 16: +/* 1059 */ if (mode == 0) { +/* 1060 */ ret = StringPropertyEditor.make(new Property(this, index, +/* 1061 */ "Ad cube default click URL")); +/* 1062 */ } else if (mode == 1) { +/* 1063 */ ret = getDefaultAdCubeURL(); +/* 1064 */ } else if (mode == 2) { +/* 1065 */ String name = (String)value; +/* 1066 */ setDefaultAdCubeURL(name); +/* */ } +/* 1068 */ break; +/* */ +/* */ default: +/* 1071 */ ret = super.properties(index, offset + 17, mode, value); +/* */ } +/* 1073 */ return ret; +/* */ } +/* */ +/* */ +/* 1077 */ private static Object classCookie = new Object(); +/* */ private static final int INIT = 0; +/* */ +/* 1080 */ public void saveState(Saver s) throws IOException { s.saveVersion(13, classCookie); +/* 1081 */ super.saveState(s); +/* 1082 */ s.saveString(this.defaultRoomName); +/* 1083 */ URL.save(s, this.desiredWorldServerURL); +/* 1084 */ s.saveInt(this.timeoutAge); +/* 1085 */ s.saveBoolean(getMultiuser()); +/* 1086 */ s.saveBoolean(getCourtesyVIP()); +/* 1087 */ s.saveBoolean(getForceHuman()); +/* 1088 */ s.saveBoolean(getHasAdBanner()); +/* 1089 */ s.saveInt(getBannerWidth()); +/* 1090 */ s.saveInt(getBannerHeight()); +/* 1091 */ s.saveString(getBannerURL()); +/* 1092 */ s.saveBoolean(getHasClickableAdCube()); +/* 1093 */ s.saveBoolean(getAdCubeFormatIsGif()); +/* 1094 */ s.saveString(getAdCubeBaseURL()); +/* 1095 */ s.saveString(getDefaultAdCubeURL()); +/* */ +/* 1097 */ s.save(this.roomHash); +/* */ } +/* */ +/* */ +/* */ +/* */ private static final int RESTOREROOMS = 1; +/* */ +/* */ +/* */ private static final int ADDROOMS = 2; +/* */ +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 1111 */ URLSelfLoader.immediateLoad(this, r); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private void restoreOldURL(Restorer r) +/* */ throws IOException +/* */ { +/* 1124 */ String s = r.restoreString(); +/* */ URL url; +/* */ URL url; +/* 1127 */ if ((s == null) || (s.equals("UNSHARED"))) { +/* 1128 */ url = null; } else { URL url; +/* 1129 */ if (!s.endsWith(".console")) { +/* 1130 */ url = Console.makeServerURL(s); +/* */ } else +/* 1132 */ url = URL.restore(r, s, null); +/* */ } +/* 1134 */ if (url == null) { +/* 1135 */ url = defaultServerURL; +/* */ } else { +/* 1137 */ setMultiuser(true); +/* */ } +/* 1139 */ setWorldServerURL(url); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public int restorePreRooms(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 1150 */ int version = r.restoreVersion(classCookie); +/* 1151 */ switch (version) { +/* */ case 0: +/* 1153 */ r.setOldFlag(); +/* 1154 */ setName(r.restoreString()); +/* 1155 */ this.defaultRoomName = r.restoreString(); +/* 1156 */ restoreOldURL(r); +/* 1157 */ this.roomHash = ((Hashtable)r.restore(false)); +/* */ +/* 1159 */ break; +/* */ case 1: +/* */ case 3: +/* 1162 */ r.setOldFlag(); +/* 1163 */ super.restoreState(r); +/* 1164 */ this.defaultRoomName = r.restoreString(); +/* 1165 */ restoreOldURL(r); +/* 1166 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1167 */ break; +/* */ case 2: +/* 1169 */ r.setOldFlag(); +/* 1170 */ super.restoreState(r); +/* 1171 */ this.defaultRoomName = r.restoreString(); +/* 1172 */ restoreOldURL(r); +/* 1173 */ r.restoreString(); +/* 1174 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1175 */ break; +/* */ case 4: +/* 1177 */ super.restoreState(r); +/* 1178 */ this.defaultRoomName = r.restoreString(); +/* 1179 */ restoreOldURL(r); +/* 1180 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1181 */ break; +/* */ case 5: +/* 1183 */ super.restoreState(r); +/* 1184 */ this.defaultRoomName = r.restoreString(); +/* 1185 */ restoreOldURL(r); +/* 1186 */ this.timeoutAge = r.restoreInt(); +/* 1187 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1188 */ break; +/* */ case 6: +/* 1190 */ super.restoreState(r); +/* 1191 */ this.defaultRoomName = r.restoreString(); +/* 1192 */ restoreOldURL(r); +/* 1193 */ this.timeoutAge = r.restoreInt(); +/* 1194 */ r.restoreBoolean(); +/* 1195 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1196 */ break; +/* */ case 7: +/* 1198 */ super.restoreState(r); +/* 1199 */ this.defaultRoomName = r.restoreString(); +/* */ +/* 1201 */ URL url = URL.restore(r); +/* 1202 */ if (url == null) { +/* 1203 */ url = defaultServerURL; +/* */ } else { +/* 1205 */ setMultiuser(true); +/* */ } +/* 1207 */ setWorldServerURL(url); +/* */ +/* 1209 */ this.timeoutAge = r.restoreInt(); +/* 1210 */ r.restoreBoolean(); +/* 1211 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1212 */ break; +/* */ case 8: +/* */ case 9: +/* */ case 10: +/* */ case 11: +/* */ case 12: +/* */ case 13: +/* 1219 */ super.restoreState(r); +/* 1220 */ this.defaultRoomName = r.restoreString(); +/* 1221 */ setWorldServerURL(URL.restore(r)); +/* 1222 */ this.timeoutAge = r.restoreInt(); +/* 1223 */ setMultiuser(r.restoreBoolean()); +/* 1224 */ if (version > 9) +/* 1225 */ setCourtesyVIP(r.restoreBoolean()); +/* 1226 */ if (version > 10) +/* 1227 */ setForceHuman(r.restoreBoolean()); +/* 1228 */ if (version > 11) { +/* 1229 */ setHasAdBanner(r.restoreBoolean()); +/* 1230 */ setBannerWidth(r.restoreInt()); +/* 1231 */ setBannerHeight(r.restoreInt()); +/* 1232 */ setBannerURL(r.restoreString()); +/* */ } +/* 1234 */ if (version > 12) { +/* 1235 */ setHasClickableAdCube(r.restoreBoolean()); +/* 1236 */ setAdCubeFormatIsGif(r.restoreBoolean()); +/* 1237 */ setAdCubeBaseURL(r.restoreString()); +/* 1238 */ setDefaultAdCubeURL(r.restoreString()); +/* */ } +/* 1240 */ this.roomHash = ((Hashtable)r.restore(false)); +/* 1241 */ break; +/* */ default: +/* 1243 */ throw new TooNewException(); +/* */ } +/* */ +/* 1246 */ for (Enumeration e = this.roomHash.elements(); e.hasMoreElements();) { +/* 1247 */ this.roomList.addElement(e.nextElement()); +/* */ } +/* 1249 */ if ((version < 9) && (this.timeoutAge == 60000)) { +/* 1250 */ this.timeoutAge = 15000; +/* */ } +/* 1252 */ return version; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object clone() +/* */ { +/* 1260 */ World newWorld = (World)super.clone(); +/* */ +/* */ +/* 1263 */ int worldNum = 1; +/* */ String newname; +/* */ URL key; +/* */ do { +/* 1267 */ newname = "World" + worldNum++; +/* 1268 */ key = URL.make("session:" + newname + ".world"); +/* 1269 */ } while (worldHash.containsKey(key)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1277 */ newWorld.setName(newname); +/* 1278 */ newWorld.setSourceURL(key); +/* */ +/* 1280 */ return newWorld; +/* */ } +/* */ +/* */ +/* */ +/* */ private static final int LOADCONSOLE = 3; +/* */ +/* */ +/* */ private static final int DONE = -1; +/* */ +/* */ +/* */ private Enumeration tmpenum; +/* */ +/* */ +/* */ public int incRestore(int state, Restorer r, URLSelfLoader p) +/* */ throws Exception +/* */ { +/* 1297 */ switch (state) { +/* */ case 0: +/* 1299 */ p.itemp2 = restorePreRooms(r); +/* 1300 */ p.itemp1 = this.roomHash.restoreCount(r); +/* */ +/* */ case 1: +/* 1303 */ if (--p.itemp1 >= 0) { +/* 1304 */ this.roomHash.restoreEntry(r); +/* 1305 */ return 1; +/* */ } +/* */ +/* */ +/* 1309 */ if (p.itemp2 == 4) { +/* 1310 */ this.timeoutAge = r.restoreInt(); +/* */ +/* */ +/* 1313 */ if ((this.timeoutAge == 900000) || (this.timeoutAge == 60000)) { +/* 1314 */ this.timeoutAge = 15000; +/* */ } +/* */ } +/* 1317 */ if (r.version() < 3) { +/* 1318 */ return -1; +/* */ } +/* */ case 2: case 3: +/* 1321 */ return finishRestore(state, +/* 1322 */ (r.version() != Saver.version()) || (r.oldFlag()), p.getURL()); +/* */ } +/* */ +/* 1325 */ if (!$assertionsDisabled) throw new AssertionError(); +/* 1326 */ return -1; +/* */ } +/* */ +/* */ +/* */ +/* */ public int finishRestore(int state, boolean oldFlag, URL url) +/* */ throws Exception +/* */ { +/* 1334 */ switch (state) +/* */ { +/* */ +/* */ +/* */ case 0: +/* */ case 1: +/* 1340 */ this.tmpenum = this.roomHash.elements(); +/* */ +/* 1342 */ this.roomHash = new Hashtable(); +/* */ +/* */ case 2: +/* 1345 */ if (this.tmpenum.hasMoreElements()) { +/* 1346 */ Room rm = (Room)this.tmpenum.nextElement(); +/* 1347 */ addRoom(rm); +/* 1348 */ return 2; +/* */ } +/* 1350 */ this.tmpenum = null; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ case 3: +/* 1359 */ if ((this.console == null) && (this.loadErr == null)) { +/* 1360 */ return 3; +/* */ } +/* 1362 */ if (this.loadErr != null) { +/* 1363 */ throw new IOException(this.loadErr); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1374 */ markInitialized(); +/* */ +/* 1376 */ return -1; } +/* */ +/* 1378 */ if (!$assertionsDisabled) throw new AssertionError(); +/* 1379 */ return -1; +/* */ } +/* */ +/* */ public void postRestore(int version) { +/* 1383 */ super.postRestore(version); +/* 1384 */ if (version > 2) +/* 1385 */ return; +/* 1386 */ int state = 0; +/* */ try { +/* 1388 */ while ((state = finishRestore(state, true, +/* 1389 */ URL.make("error:This file"))) != -1) {} +/* */ } +/* */ catch (Exception ex) +/* */ { +/* 1393 */ ex.printStackTrace(System.out); +/* 1394 */ if (!$assertionsDisabled) { throw new AssertionError(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* 1400 */ protected Console console = null; +/* */ +/* */ String loadErr; +/* */ +/* */ +/* */ public Console getConsole() +/* */ { +/* 1407 */ return this.console; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public void loadedURLSelf(URLSelf o, URL url, String err) +/* */ { +/* 1415 */ if ((err != null) || (!(o instanceof Console))) { +/* 1416 */ if (err == null) { +/* 1417 */ Object[] arguments = { new String(url) }; +/* 1418 */ Console.println(MessageFormat.format( +/* 1419 */ Console.message("no-world"), arguments)); +/* 1420 */ o.decRef(); +/* */ } +/* */ +/* */ +/* 1424 */ Console.println(Console.message("cant-load") + err); +/* 1425 */ Console.load(null, this); +/* */ +/* 1427 */ return; +/* */ } +/* */ +/* */ +/* 1431 */ Console oldConsole = this.console; +/* */ +/* 1433 */ this.console = ((Console)o); +/* */ +/* 1435 */ if (oldConsole != null) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1444 */ Galaxy oldGalaxy = oldConsole.getGalaxy(); +/* 1445 */ Galaxy galaxy = this.console.getGalaxy(); +/* */ +/* 1447 */ assert (oldGalaxy != null); +/* 1448 */ assert (galaxy != null); +/* 1449 */ if (oldGalaxy != galaxy) { +/* 1450 */ oldGalaxy.forceObjectRereg(); +/* */ } +/* */ +/* 1453 */ oldConsole.decRef(); +/* */ } +/* */ +/* 1456 */ this.worldServerURL = url; +/* */ +/* */ +/* 1459 */ if ((Pilot.getActive() != null) && (Pilot.getActive().getWorld() == this)) { +/* 1460 */ Pilot.changeActiveRoom(Pilot.getActive().getRoom()); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1468 */ static URL defaultServerURL = URL.make("worldserver://www.3dcd.com:6650/"); +/* */ private URL worldServerURL; +/* 1470 */ private URL desiredWorldServerURL = defaultServerURL; +/* */ +/* */ +/* */ private boolean isCourtesyVIP; +/* */ +/* */ +/* */ +/* */ public boolean getCourtesyVIP() +/* */ { +/* 1479 */ return this.isCourtesyVIP; +/* */ } +/* */ +/* */ private void setCourtesyVIP(boolean b) { +/* 1483 */ this.isCourtesyVIP = b; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1491 */ private boolean isForceHuman = false; +/* */ +/* */ public boolean getForceHuman() { +/* 1494 */ return this.isForceHuman; +/* */ } +/* */ +/* */ private void setForceHuman(boolean b) { +/* 1498 */ this.isForceHuman = b; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* 1505 */ private boolean hasAdBanner = false; +/* 1506 */ private int adBannerWidth = 474; +/* 1507 */ private int adBannerHeight = 65; +/* 1508 */ private String adBannerURL = "$SCRIPTSERVERgetad.pl?s=$SERIALNUM"; +/* */ +/* */ public boolean getHasAdBanner() { +/* 1511 */ return this.hasAdBanner; +/* */ } +/* */ +/* */ public void setHasAdBanner(boolean b) { +/* 1515 */ this.hasAdBanner = b; +/* */ } +/* */ +/* */ public int getBannerWidth() { +/* 1519 */ return this.adBannerWidth; +/* */ } +/* */ +/* */ public void setBannerWidth(int i) { +/* 1523 */ this.adBannerWidth = i; +/* */ } +/* */ +/* */ public int getBannerHeight() { +/* 1527 */ return this.adBannerHeight; +/* */ } +/* */ +/* */ public void setBannerHeight(int i) { +/* 1531 */ this.adBannerHeight = i; +/* */ } +/* */ +/* */ public String getBannerURL() { +/* 1535 */ return this.adBannerURL; +/* */ } +/* */ +/* */ public void setBannerURL(String s) { +/* 1539 */ this.adBannerURL = s; +/* */ } +/* */ +/* 1542 */ private static AdBanner theAdBanner = null; +/* */ private boolean isMultiuser; +/* */ +/* 1545 */ public void setupAdBanner() { if (theAdBanner != null) { +/* 1546 */ theAdBanner.detach(); +/* 1547 */ theAdBanner = null; +/* */ } +/* */ +/* 1550 */ if (this.hasAdBanner) { +/* 1551 */ theAdBanner = new AdBanner(this.adBannerWidth, this.adBannerHeight, +/* 1552 */ this.adBannerURL); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ private boolean getMultiuser() +/* */ { +/* 1563 */ return this.isMultiuser; +/* */ } +/* */ +/* */ private void setMultiuser(boolean b) { +/* 1567 */ this.isMultiuser = b; +/* 1568 */ setWorldServerURL(this.desiredWorldServerURL); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public World setWorldServerURL(URL s) +/* */ { +/* 1582 */ this.desiredWorldServerURL = s; +/* */ +/* */ +/* 1585 */ String i = s.getInternal(); +/* 1586 */ if ((i.startsWith("worldserver://www.3dcd.com")) && +/* 1587 */ (NetUpdate.overrideWorldServer != null)) { +/* 1588 */ i = i.substring(26); +/* 1589 */ if ((i.startsWith(":")) && +/* 1590 */ (NetUpdate.overrideWorldServer.indexOf(':', 13) >= 0)) +/* */ { +/* 1592 */ for (int j = 1; +/* 1593 */ j < i.length(); j++) +/* 1594 */ if (!Character.isDigit(i.charAt(j))) +/* */ break; +/* 1596 */ i = i.substring(j); +/* */ } +/* 1598 */ s = URL.make(NetUpdate.overrideWorldServer + i); +/* */ } +/* */ +/* 1601 */ this.loadErr = null; +/* 1602 */ Console.load(this.isMultiuser ? s : null, this); +/* */ +/* 1604 */ return this; +/* */ } +/* */ +/* */ public static Enumeration getWorlds() { +/* 1608 */ return worldList.elements(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\World.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldRedirector.java b/NET/worlds/scape/WorldRedirector.java new file mode 100644 index 0000000..cbd6d03 --- /dev/null +++ b/NET/worlds/scape/WorldRedirector.java @@ -0,0 +1,120 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.io.BufferedReader; +/* */ import java.io.FileReader; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ import java.net.MalformedURLException; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WorldRedirector +/* */ { +/* 34 */ private Hashtable _ht = new Hashtable(); +/* */ +/* */ +/* */ +/* */ public WorldRedirector() {} +/* */ +/* */ +/* */ public WorldRedirector(URL mappingfile) +/* */ { +/* */ try +/* */ { +/* 45 */ BufferedReader in = new BufferedReader( +/* 46 */ new FileReader(mappingfile.unalias())); +/* 47 */ addFile(in); +/* */ } +/* */ catch (IOException ioe) { +/* 50 */ System.out.println("Reading " + mappingfile + " got " + ioe); +/* */ } +/* */ } +/* */ +/* */ void addFile(BufferedReader in) +/* */ throws IOException +/* */ { +/* */ String line; +/* 58 */ while ((line = in.readLine()) != null) { String line; +/* 59 */ addLine(line); +/* */ } +/* */ } +/* */ +/* */ +/* */ void addLine(String line) +/* */ { +/* 66 */ if (line.startsWith("#")) +/* 67 */ return; +/* 68 */ int split = line.indexOf("=>"); +/* 69 */ if (split > 0) { +/* 70 */ String key = line.substring(0, split); +/* 71 */ String value = line.substring(split + 2); +/* */ +/* 73 */ this._ht.put(key, value); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public URL get(URL orig) +/* */ { +/* 82 */ String prefix = orig.toString(); +/* 83 */ String suffix = ""; +/* */ +/* */ for (;;) +/* */ { +/* 87 */ Object res = this._ht.get(prefix); +/* 88 */ if (res != null) { +/* */ try { URL result; +/* */ URL result; +/* 91 */ if (suffix == "") { +/* 92 */ result = new URL((String)res); +/* */ } else +/* 94 */ result = new URL((String)res + "/" + suffix); +/* 95 */ System.out.println("Redirecting " + orig + " => " + result); +/* 96 */ return result; +/* */ } +/* */ catch (MalformedURLException mue) +/* */ { +/* 100 */ System.out.println("Failed: " + mue); +/* */ } +/* */ } +/* 103 */ int split = prefix.lastIndexOf('/'); +/* 104 */ if (split == -1) { +/* 105 */ return orig; +/* */ } +/* 107 */ if (suffix == "") { +/* 108 */ suffix = prefix.substring(split + 1); +/* */ } else +/* 110 */ suffix = prefix.substring(split + 1) + "/" + suffix; +/* 111 */ prefix = prefix.substring(0, split); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldRedirector.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldScript.java b/NET/worlds/scape/WorldScript.java new file mode 100644 index 0000000..4f86903 --- /dev/null +++ b/NET/worlds/scape/WorldScript.java @@ -0,0 +1,97 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.DialogReceiver; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public abstract class WorldScript +/* */ implements DialogReceiver, AnimatedActionCallback +/* */ { +/* */ public static final int CURRENT_SCRIPT_VERSION = 15; +/* */ +/* */ public int getMinScriptVersion() +/* */ { +/* 20 */ return 15; +/* */ } +/* */ +/* */ +/* */ +/* */ public abstract void roomEnter(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract void roomExit(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract void worldEnter(); +/* */ +/* */ +/* */ +/* */ public abstract void worldExit(); +/* */ +/* */ +/* */ public abstract void onEachFrame(); +/* */ +/* */ +/* */ public void dialogDone(Object who, boolean confirmed) {} +/* */ +/* */ +/* */ public void onTriggerAction(String message) {} +/* */ +/* */ +/* */ public Vector onShapeClick(Object shape, String shapeName) +/* */ { +/* 51 */ return null; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 82 */ protected static WorldScriptToolkit toolkit = ; +/* */ +/* */ public void motionComplete(int completionCode) {} +/* */ +/* */ public void onMenuClick(String action, Object source) {} +/* */ +/* */ public void objectVisibilityNotification(Object obj, boolean visible) {} +/* */ +/* */ public void onConversation(String who, String text) {} +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldScript.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldScriptLoader.java b/NET/worlds/scape/WorldScriptLoader.java new file mode 100644 index 0000000..e323e78 --- /dev/null +++ b/NET/worlds/scape/WorldScriptLoader.java @@ -0,0 +1,276 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.PrintStream; +/* */ import java.util.Hashtable; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WorldScriptLoader +/* */ extends ClassLoader +/* */ { +/* 19 */ Hashtable> cache = new Hashtable(); +/* */ String lastWorldName; +/* */ +/* */ /* Error */ +/* */ private byte[] loadClassData(String name) +/* */ { +/* */ // Byte code: +/* */ // 0: ldc 27 +/* */ // 2: astore_2 +/* */ // 3: aload_1 +/* */ // 4: aload_2 +/* */ // 5: invokevirtual 29 java/lang/String:startsWith (Ljava/lang/String;)Z +/* */ // 8: ifeq +12 -> 20 +/* */ // 11: aload_1 +/* */ // 12: aload_2 +/* */ // 13: invokevirtual 35 java/lang/String:length ()I +/* */ // 16: invokevirtual 39 java/lang/String:substring (I)Ljava/lang/String; +/* */ // 19: astore_1 +/* */ // 20: aload_1 +/* */ // 21: ldc 43 +/* */ // 23: invokevirtual 45 java/lang/String:indexOf (Ljava/lang/String;)I +/* */ // 26: istore_3 +/* */ // 27: iload_3 +/* */ // 28: iconst_m1 +/* */ // 29: if_icmpne +8 -> 37 +/* */ // 32: iconst_0 +/* */ // 33: istore_3 +/* */ // 34: goto +18 -> 52 +/* */ // 37: iload_3 +/* */ // 38: new 30 java/lang/String +/* */ // 41: dup +/* */ // 42: ldc 43 +/* */ // 44: invokespecial 49 java/lang/String: (Ljava/lang/String;)V +/* */ // 47: invokevirtual 35 java/lang/String:length ()I +/* */ // 50: iadd +/* */ // 51: istore_3 +/* */ // 52: aload_1 +/* */ // 53: ldc 52 +/* */ // 55: invokevirtual 45 java/lang/String:indexOf (Ljava/lang/String;)I +/* */ // 58: istore 4 +/* */ // 60: iload_3 +/* */ // 61: ifne +10 -> 71 +/* */ // 64: aload_0 +/* */ // 65: getfield 54 NET/worlds/scape/WorldScriptLoader:lastWorldName Ljava/lang/String; +/* */ // 68: ifnonnull +51 -> 119 +/* */ // 71: iload 4 +/* */ // 73: iconst_m1 +/* */ // 74: if_icmpeq +15 -> 89 +/* */ // 77: aload_1 +/* */ // 78: iload_3 +/* */ // 79: iload 4 +/* */ // 81: invokevirtual 56 java/lang/String:substring (II)Ljava/lang/String; +/* */ // 84: astore 5 +/* */ // 86: goto +68 -> 154 +/* */ // 89: aload_1 +/* */ // 90: iload_3 +/* */ // 91: invokevirtual 39 java/lang/String:substring (I)Ljava/lang/String; +/* */ // 94: astore 5 +/* */ // 96: new 59 java/lang/StringBuilder +/* */ // 99: dup +/* */ // 100: aload_1 +/* */ // 101: invokestatic 61 java/lang/String:valueOf (Ljava/lang/Object;)Ljava/lang/String; +/* */ // 104: invokespecial 65 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 107: ldc 52 +/* */ // 109: invokevirtual 66 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 112: invokevirtual 70 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 115: astore_1 +/* */ // 116: goto +38 -> 154 +/* */ // 119: aload_0 +/* */ // 120: getfield 54 NET/worlds/scape/WorldScriptLoader:lastWorldName Ljava/lang/String; +/* */ // 123: astore 5 +/* */ // 125: aload_1 +/* */ // 126: ldc 52 +/* */ // 128: invokevirtual 74 java/lang/String:endsWith (Ljava/lang/String;)Z +/* */ // 131: ifne +23 -> 154 +/* */ // 134: new 59 java/lang/StringBuilder +/* */ // 137: dup +/* */ // 138: aload_1 +/* */ // 139: invokestatic 61 java/lang/String:valueOf (Ljava/lang/Object;)Ljava/lang/String; +/* */ // 142: invokespecial 65 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 145: ldc 52 +/* */ // 147: invokevirtual 66 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 150: invokevirtual 70 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 153: astore_1 +/* */ // 154: new 59 java/lang/StringBuilder +/* */ // 157: dup +/* */ // 158: invokestatic 77 NET/worlds/network/NetUpdate:getUpgradeServerURL ()Ljava/lang/String; +/* */ // 161: invokestatic 61 java/lang/String:valueOf (Ljava/lang/Object;)Ljava/lang/String; +/* */ // 164: invokespecial 65 java/lang/StringBuilder: (Ljava/lang/String;)V +/* */ // 167: aload 5 +/* */ // 169: invokevirtual 66 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 172: ldc 82 +/* */ // 174: invokevirtual 66 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 177: aload_1 +/* */ // 178: invokevirtual 66 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; +/* */ // 181: invokevirtual 70 java/lang/StringBuilder:toString ()Ljava/lang/String; +/* */ // 184: invokestatic 84 NET/worlds/network/URL:make (Ljava/lang/String;)LNET/worlds/network/URL; +/* */ // 187: astore 6 +/* */ // 189: aload 6 +/* */ // 191: iconst_1 +/* */ // 192: invokestatic 90 NET/worlds/network/Cache:getFile (LNET/worlds/network/URL;Z)LNET/worlds/network/CacheFile; +/* */ // 195: astore 7 +/* */ // 197: aload 7 +/* */ // 199: invokevirtual 96 NET/worlds/network/CacheFile:waitUntilLoaded ()V +/* */ // 202: aload 7 +/* */ // 204: invokevirtual 101 NET/worlds/network/CacheFile:error ()Z +/* */ // 207: ifeq +5 -> 212 +/* */ // 210: aconst_null +/* */ // 211: areturn +/* */ // 212: aload_0 +/* */ // 213: aload 5 +/* */ // 215: putfield 54 NET/worlds/scape/WorldScriptLoader:lastWorldName Ljava/lang/String; +/* */ // 218: aload 7 +/* */ // 220: invokevirtual 105 NET/worlds/network/CacheFile:getLocalName ()Ljava/lang/String; +/* */ // 223: astore 8 +/* */ // 225: new 108 java/io/File +/* */ // 228: dup +/* */ // 229: aload 8 +/* */ // 231: invokespecial 110 java/io/File: (Ljava/lang/String;)V +/* */ // 234: astore 9 +/* */ // 236: new 111 java/io/FileInputStream +/* */ // 239: dup +/* */ // 240: aload 9 +/* */ // 242: invokespecial 113 java/io/FileInputStream: (Ljava/io/File;)V +/* */ // 245: astore 10 +/* */ // 247: sipush 1024 +/* */ // 250: newarray +/* */ // 252: astore 11 +/* */ // 254: new 116 java/io/ByteArrayOutputStream +/* */ // 257: dup +/* */ // 258: invokespecial 118 java/io/ByteArrayOutputStream: ()V +/* */ // 261: astore 12 +/* */ // 263: aload 10 +/* */ // 265: aload 11 +/* */ // 267: invokevirtual 119 java/io/FileInputStream:read ([B)I +/* */ // 270: istore 13 +/* */ // 272: iload 13 +/* */ // 274: iconst_m1 +/* */ // 275: if_icmpne +6 -> 281 +/* */ // 278: goto +18 -> 296 +/* */ // 281: aload 12 +/* */ // 283: aload 11 +/* */ // 285: iconst_0 +/* */ // 286: iload 13 +/* */ // 288: invokevirtual 123 java/io/ByteArrayOutputStream:write ([BII)V +/* */ // 291: goto -28 -> 263 +/* */ // 294: astore 13 +/* */ // 296: aload 10 +/* */ // 298: invokevirtual 127 java/io/FileInputStream:close ()V +/* */ // 301: aload 12 +/* */ // 303: invokevirtual 130 java/io/ByteArrayOutputStream:toByteArray ()[B +/* */ // 306: areturn +/* */ // 307: astore 9 +/* */ // 309: aconst_null +/* */ // 310: areturn +/* */ // Line number table: +/* */ // Java source line #26 -> byte code offset #0 +/* */ // Java source line #27 -> byte code offset #3 +/* */ // Java source line #28 -> byte code offset #11 +/* */ // Java source line #32 -> byte code offset #20 +/* */ // Java source line #33 -> byte code offset #27 +/* */ // Java source line #34 -> byte code offset #32 +/* */ // Java source line #35 -> byte code offset #34 +/* */ // Java source line #36 -> byte code offset #37 +/* */ // Java source line #38 -> byte code offset #52 +/* */ // Java source line #41 -> byte code offset #60 +/* */ // Java source line #42 -> byte code offset #71 +/* */ // Java source line #43 -> byte code offset #77 +/* */ // Java source line #44 -> byte code offset #86 +/* */ // Java source line #45 -> byte code offset #89 +/* */ // Java source line #46 -> byte code offset #96 +/* */ // Java source line #48 -> byte code offset #116 +/* */ // Java source line #49 -> byte code offset #119 +/* */ // Java source line #50 -> byte code offset #125 +/* */ // Java source line #51 -> byte code offset #134 +/* */ // Java source line #56 -> byte code offset #154 +/* */ // Java source line #59 -> byte code offset #189 +/* */ // Java source line #60 -> byte code offset #197 +/* */ // Java source line #61 -> byte code offset #202 +/* */ // Java source line #62 -> byte code offset #210 +/* */ // Java source line #65 -> byte code offset #212 +/* */ // Java source line #66 -> byte code offset #218 +/* */ // Java source line #69 -> byte code offset #225 +/* */ // Java source line #71 -> byte code offset #236 +/* */ // Java source line #73 -> byte code offset #247 +/* */ // Java source line #75 -> byte code offset #254 +/* */ // Java source line #79 -> byte code offset #263 +/* */ // Java source line #80 -> byte code offset #272 +/* */ // Java source line #81 -> byte code offset #278 +/* */ // Java source line #82 -> byte code offset #281 +/* */ // Java source line #83 -> byte code offset #291 +/* */ // Java source line #88 -> byte code offset #296 +/* */ // Java source line #89 -> byte code offset #301 +/* */ // Java source line #90 -> byte code offset #307 +/* */ // Java source line #91 -> byte code offset #309 +/* */ // Local variable table: +/* */ // start length slot name signature +/* */ // 0 311 0 this WorldScriptLoader +/* */ // 0 311 1 name String +/* */ // 2 11 2 prefix String +/* */ // 26 65 3 nameIdx int +/* */ // 58 22 4 extIdx int +/* */ // 84 3 5 worldName String +/* */ // 94 3 5 worldName String +/* */ // 123 91 5 worldName String +/* */ // 187 3 6 scriptURL NET.worlds.network.URL +/* */ // 195 24 7 f NET.worlds.network.CacheFile +/* */ // 223 7 8 fileName String +/* */ // 234 7 9 file java.io.File +/* */ // 307 3 9 e Exception +/* */ // 245 52 10 fis java.io.FileInputStream +/* */ // 252 32 11 buffer byte[] +/* */ // 261 41 12 os java.io.ByteArrayOutputStream +/* */ // 270 17 13 bytesRead int +/* */ // 294 1 13 localException1 Exception +/* */ // Exception table: +/* */ // from to target type +/* */ // 263 278 294 java/lang/Exception +/* */ // 281 291 294 java/lang/Exception +/* */ // 225 306 307 java/lang/Exception +/* */ } +/* */ +/* */ public synchronized Class loadClass(String name, boolean resolve) +/* */ { +/* 99 */ Class c = (Class)this.cache.get(name); +/* 100 */ if (c == null) { +/* 101 */ byte[] data = null; +/* */ +/* 103 */ if (!name.startsWith("java.")) { +/* 104 */ data = loadClassData(name); +/* */ } +/* */ +/* 107 */ if (data == null) { +/* */ try { +/* 109 */ return findSystemClass(name); +/* */ } catch (Error e) { +/* 111 */ System.out.println("Could not load script " + name + " " + e); +/* 112 */ return null; +/* */ } catch (Exception e) { +/* 114 */ System.out.println("Could not load script " + name + " " + e); +/* 115 */ return null; +/* */ } +/* */ } +/* 118 */ c = defineClass(null, data, 0, data.length); +/* 119 */ this.cache.put(name, c); +/* */ } +/* 121 */ if (resolve) { +/* 122 */ resolveClass(c); +/* */ } +/* 124 */ return c; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldScriptLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldScriptManager.java b/NET/worlds/scape/WorldScriptManager.java new file mode 100644 index 0000000..e0fbeba --- /dev/null +++ b/NET/worlds/scape/WorldScriptManager.java @@ -0,0 +1,192 @@ +/* */ 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.MainTerminalCallback; +/* */ import NET.worlds.console.RenderCanvas; +/* */ import java.awt.PopupMenu; +/* */ import java.awt.event.ActionEvent; +/* */ import java.awt.event.ActionListener; +/* */ import java.io.PrintStream; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ public class WorldScriptManager +/* */ implements ActionListener, MainCallback, MainTerminalCallback +/* */ { +/* 19 */ private static WorldScriptManager instance = new WorldScriptManager(); +/* */ +/* */ +/* 22 */ private static WorldScriptLoader loader = new WorldScriptLoader(); +/* */ +/* 24 */ public static WorldScriptManager getInstance() { return instance; } +/* */ +/* */ private WorldScriptManager() +/* */ { +/* 28 */ this.currentScript = null; +/* 29 */ Main.register(this); +/* */ } +/* */ +/* */ public void terminalCallback() +/* */ { +/* 34 */ if (this.currentScript != null) { +/* 35 */ this.currentScript.worldExit(); +/* */ } +/* 37 */ this.currentScript = null; +/* */ +/* 39 */ Main.unregister(this); +/* */ } +/* */ +/* */ +/* */ private WorldScript currentScript; +/* */ private String lastRoom; +/* */ public void worldEntered(String worldName) +/* */ { +/* 47 */ if (this.currentScript != null) { +/* 48 */ this.currentScript.worldExit(); +/* */ } +/* 50 */ this.currentScript = null; +/* */ +/* 52 */ if (worldName == null) { +/* 53 */ return; +/* */ } +/* 55 */ worldName = worldName.replace(' ', '_'); +/* 56 */ worldName = worldName.replace('-', '_'); +/* 57 */ worldName = worldName.replace('.', '_'); +/* 58 */ worldName = worldName.replace('/', '_'); +/* 59 */ worldName = worldName.replace('\\', '_'); +/* */ +/* */ try +/* */ { +/* 63 */ this.currentScript = +/* 64 */ ((WorldScript)loader.loadClass("WorldScript" + worldName + ".class", true).newInstance()); +/* */ } +/* */ catch (Exception e) +/* */ { +/* 68 */ System.out.println("Exception constructing world script: " + e); +/* */ } +/* */ catch (Error e) +/* */ { +/* 72 */ System.out.println("Error constructing world script: " + e); +/* */ } +/* */ +/* 75 */ if (this.currentScript != null) +/* */ { +/* */ +/* 78 */ if (this.currentScript.getMinScriptVersion() > 15) +/* */ { +/* 80 */ System.out.println("Script requires newer client version. script is ver. " + +/* 81 */ this.currentScript.getMinScriptVersion() + +/* 82 */ " and client has ver. " + 15); +/* 83 */ this.currentScript = null; +/* */ } +/* */ else +/* */ { +/* 87 */ this.currentScript.worldEnter(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void mainCallback() +/* */ { +/* 94 */ if (this.currentScript != null) { +/* 95 */ this.currentScript.onEachFrame(); +/* */ } +/* */ } +/* */ +/* */ public void onPrerender(WObject obj, Camera cam) { +/* 100 */ if (this.currentScript != null) +/* */ { +/* 102 */ Console c = Console.getActive(); +/* 103 */ if (c == null) return; +/* 104 */ if (!(c instanceof DefaultConsole)) +/* 105 */ return; +/* 106 */ DefaultConsole dc = (DefaultConsole)c; +/* 107 */ RenderCanvas rc = dc.getRender(); +/* 108 */ if (rc == null) { return; +/* */ } +/* 110 */ Camera renderCam = rc.getCamera(); +/* 111 */ if (cam != renderCam) { return; +/* */ } +/* 113 */ Point3Temp p = obj.inCamSpace(cam); +/* */ +/* */ +/* */ +/* 117 */ boolean v = (p != null) && (p.z > 1.0F) && (p.x < p.z) && (-p.x < p.z); +/* */ +/* 119 */ this.currentScript.objectVisibilityNotification(obj, v); +/* */ } +/* */ } +/* */ +/* */ public void action(String message) +/* */ { +/* 125 */ if (this.currentScript != null) { +/* 126 */ this.currentScript.onTriggerAction(message); +/* */ } +/* */ } +/* */ +/* */ public PopupMenu shapeClicked(Shape shape) { +/* 131 */ if (this.currentScript != null) +/* */ { +/* 133 */ SuperRoot ultimateOwner = shape; +/* 134 */ while (ultimateOwner.getOwner() != null) +/* */ { +/* 136 */ ultimateOwner = ultimateOwner.getOwner(); +/* 137 */ if ((ultimateOwner instanceof PosableShape)) +/* */ { +/* 139 */ shape = (Shape)ultimateOwner; +/* 140 */ break; +/* */ } +/* */ } +/* */ +/* 144 */ Vector v = this.currentScript.onShapeClick(shape, shape.getName()); +/* 145 */ if (v != null) +/* */ { +/* 147 */ PopupMenu m = new PopupMenu(); +/* 148 */ Enumeration e = v.elements(); +/* 149 */ while (e.hasMoreElements()) +/* */ { +/* 151 */ m.add((String)e.nextElement()); +/* */ } +/* 153 */ return m; +/* */ } +/* */ } +/* */ +/* 157 */ return null; +/* */ } +/* */ +/* */ public void actionPerformed(ActionEvent e) +/* */ { +/* 162 */ if (this.currentScript != null) { +/* 163 */ this.currentScript.onMenuClick(e.getActionCommand(), e.getSource()); +/* */ } +/* */ } +/* */ +/* */ public void roomEntered(String roomName) { +/* 168 */ if (this.currentScript == null) { +/* 169 */ return; +/* */ } +/* 171 */ if (this.lastRoom != null) { +/* 172 */ this.currentScript.roomExit(this.lastRoom); +/* */ } +/* 174 */ this.currentScript.roomEnter(roomName); +/* */ +/* 176 */ this.lastRoom = new String(roomName); +/* */ } +/* */ +/* */ public void onConversation(String who, String what) +/* */ { +/* 181 */ if (this.currentScript == null) { +/* 182 */ return; +/* */ } +/* 184 */ this.currentScript.onConversation(who, what); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldScriptManager.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldScriptToolkit.java b/NET/worlds/scape/WorldScriptToolkit.java new file mode 100644 index 0000000..f7768ec --- /dev/null +++ b/NET/worlds/scape/WorldScriptToolkit.java @@ -0,0 +1,204 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ +/* */ +/* */ public abstract class WorldScriptToolkit +/* */ { +/* */ public static final int videoWallNotFound = -1; +/* */ +/* */ +/* */ public static final int videoUnitialized = 0; +/* */ +/* */ +/* */ public static final int videoStopped = 1; +/* */ +/* */ +/* */ public static final int videoPaused = 2; +/* */ +/* */ +/* */ public static final int videoPlaying = 3; +/* */ +/* */ +/* */ +/* */ public abstract int getTime(); +/* */ +/* */ +/* */ +/* */ public abstract void teleport(String paramString, boolean paramBoolean); +/* */ +/* */ +/* */ +/* */ public abstract float getPilotX(); +/* */ +/* */ +/* */ +/* */ public abstract float getPilotY(); +/* */ +/* */ +/* */ +/* */ public abstract float getPilotYaw(); +/* */ +/* */ +/* */ +/* */ public abstract void walkTo(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ +/* */ +/* */ public abstract void walkTo(float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ +/* */ public abstract void walkTo(WorldScript paramWorldScript, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ +/* */ +/* */ public abstract float getWalkFriction(); +/* */ +/* */ +/* */ +/* */ public abstract void setWalkFriction(float paramFloat); +/* */ +/* */ +/* */ +/* */ public abstract void showWebPage(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract void showWebPage(String paramString, int paramInt1, int paramInt2); +/* */ +/* */ +/* */ +/* */ public abstract void showAdBanner(String paramString, int paramInt1, int paramInt2); +/* */ +/* */ +/* */ +/* */ public abstract void showExternalWebPage(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract Object playSound(String paramString, int paramInt); +/* */ +/* */ +/* */ +/* */ public abstract void stopSound(Object paramObject); +/* */ +/* */ +/* */ +/* */ public abstract boolean serviceSound(Object paramObject); +/* */ +/* */ +/* */ +/* */ public abstract String expandURLMacros(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract int getIniInt(String paramString, int paramInt); +/* */ +/* */ +/* */ +/* */ public abstract String getIniString(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ public abstract void setIniInt(String paramString, int paramInt); +/* */ +/* */ +/* */ +/* */ public abstract void setIniString(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ public abstract int getClientVersion(); +/* */ +/* */ +/* */ +/* */ public abstract void messageBox(String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ public abstract Object yesNoDialog(String paramString1, String paramString2, String paramString3, String paramString4, WorldScript paramWorldScript); +/* */ +/* */ +/* */ +/* */ public abstract void printToChat(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract Object findObjectInRoom(String paramString); +/* */ +/* */ +/* */ +/* */ public abstract void walkObjectTo(WorldScript paramWorldScript, Object paramObject, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ +/* */ +/* */ public abstract void moveObjectTo(Object paramObject, float paramFloat1, float paramFloat2, float paramFloat3); +/* */ +/* */ +/* */ +/* */ public abstract void moveObjectTo(Object paramObject, float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4); +/* */ +/* */ +/* */ +/* */ public abstract boolean animateBot(Object paramObject, String paramString); +/* */ +/* */ +/* */ +/* */ public abstract boolean watchVisibility(Object paramObject); +/* */ +/* */ +/* */ +/* */ public abstract boolean setShapeURL(Object paramObject, String paramString); +/* */ +/* */ +/* */ +/* */ public abstract int getVideoWallStatus(Object paramObject); +/* */ +/* */ +/* */ +/* */ public abstract boolean playVideo(Object paramObject, int paramInt); +/* */ +/* */ +/* */ +/* */ public abstract boolean stopVideo(Object paramObject); +/* */ +/* */ +/* */ +/* */ public abstract boolean setVideoURL(Object paramObject, String paramString, int paramInt1, int paramInt2); +/* */ +/* */ +/* */ +/* */ public abstract boolean setWebWallURL(Object paramObject, String paramString); +/* */ +/* */ +/* */ +/* */ public abstract boolean setWebWallURL(Object paramObject, String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ public abstract void setAdCube(boolean paramBoolean1, boolean paramBoolean2, String paramString1, String paramString2); +/* */ +/* */ +/* */ +/* */ public abstract boolean isLoggedIn(); +/* */ +/* */ +/* */ +/* */ public abstract int getConcurrentDownloads(); +/* */ +/* */ +/* */ +/* */ public abstract boolean getIsVIP(); +/* */ +/* */ +/* */ +/* 195 */ private static WorldScriptToolkit instance = new WorldScriptToolkitImp(); +/* */ +/* 197 */ public static WorldScriptToolkit getInstance() { return instance; } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldScriptToolkit.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldScriptToolkitImp.java b/NET/worlds/scape/WorldScriptToolkitImp.java new file mode 100644 index 0000000..d6bfc34 --- /dev/null +++ b/NET/worlds/scape/WorldScriptToolkitImp.java @@ -0,0 +1,493 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.console.DefaultConsole; +/* */ import NET.worlds.console.NoWebControlException; +/* */ import NET.worlds.console.OkCancelDialog; +/* */ import NET.worlds.console.WebControl; +/* */ import NET.worlds.console.WebControlImp; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.core.Std; +/* */ import NET.worlds.network.CacheEntry; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.URL; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ class WorldScriptToolkitImp +/* */ extends WorldScriptToolkit +/* */ { +/* */ public int getTime() +/* */ { +/* 23 */ return Std.getSynchronizedTime(); +/* */ } +/* */ +/* */ public void teleport(String destination, boolean showDlg) +/* */ { +/* 28 */ TeleportAction.teleport(destination, null, false, showDlg); +/* */ } +/* */ +/* */ public float getPilotX() +/* */ { +/* 33 */ Pilot p = Pilot.getActive(); +/* 34 */ if (p != null) +/* 35 */ return p.getX(); +/* 36 */ return 0.0F; +/* */ } +/* */ +/* */ public float getPilotY() +/* */ { +/* 41 */ Pilot p = Pilot.getActive(); +/* 42 */ if (p != null) +/* 43 */ return p.getY(); +/* 44 */ return 0.0F; +/* */ } +/* */ +/* */ +/* */ public float getPilotYaw() +/* */ { +/* 50 */ Pilot p = Pilot.getActive(); +/* 51 */ if (p != null) +/* 52 */ return 360.0F - p.getYaw(); +/* 53 */ return 0.0F; +/* */ } +/* */ +/* */ private SmoothDriver getSmoothDriver() +/* */ { +/* 58 */ Pilot p = Pilot.getActive(); +/* 59 */ if ((p != null) && ((p instanceof HoloPilot))) +/* */ { +/* 61 */ HoloPilot hp = (HoloPilot)p; +/* 62 */ return hp.getSmoothDriver(); +/* */ } +/* 64 */ return null; +/* */ } +/* */ +/* */ public float getWalkFriction() +/* */ { +/* 69 */ SmoothDriver sd = getSmoothDriver(); +/* 70 */ if (sd != null) +/* */ { +/* 72 */ return sd.getVelocityDamping(); +/* */ } +/* 74 */ return 0.0F; +/* */ } +/* */ +/* */ public void setWalkFriction(float friction) +/* */ { +/* 79 */ SmoothDriver sd = getSmoothDriver(); +/* 80 */ if (sd != null) +/* */ { +/* 82 */ sd.setVelocityDamping(friction); +/* */ } +/* */ } +/* */ +/* */ public void walkTo(float x, float y, float yaw, float velocity) +/* */ { +/* 88 */ Pilot p = Pilot.getActive(); +/* 89 */ if ((p != null) && ((p instanceof HoloPilot))) +/* */ { +/* 91 */ HoloPilot hp = (HoloPilot)p; +/* 92 */ hp.walkTo(new Point2(x, y), yaw, velocity); +/* */ } +/* */ } +/* */ +/* */ public void walkTo(float x, float y, float yaw) +/* */ { +/* 98 */ Pilot p = Pilot.getActive(); +/* 99 */ if ((p != null) && ((p instanceof HoloPilot))) +/* */ { +/* 101 */ HoloPilot hp = (HoloPilot)p; +/* 102 */ hp.walkTo(new Point2(x, y), yaw); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public void walkTo(WorldScript script, float x, float y, float yaw, float velocity) +/* */ { +/* 110 */ Pilot p = Pilot.getActive(); +/* 111 */ if ((p != null) && ((p instanceof HoloPilot))) +/* */ { +/* 113 */ HoloPilot hp = (HoloPilot)p; +/* 114 */ hp.walkTo(new Point2(x, y), yaw, velocity); +/* 115 */ hp.addCallback(script); +/* */ } +/* */ } +/* */ +/* */ public void showWebPage(String url) +/* */ { +/* 121 */ showWebPage(url, 100, 100); +/* */ } +/* */ +/* */ public void showWebPage(String url, int percentW, int percentH) +/* */ { +/* 126 */ Console c = Console.getActive(); +/* 127 */ if ((c != null) && ((c instanceof DefaultConsole))) +/* */ { +/* 129 */ DefaultConsole dc = (DefaultConsole)c; +/* */ try { +/* 131 */ WebControl wc = new WebControl(dc.getRender(), +/* 132 */ percentW, percentH, true, false, +/* 133 */ false); +/* 134 */ wc.activate(); +/* 135 */ wc.setURL(url); +/* */ +/* */ } +/* */ catch (NoWebControlException e) +/* */ { +/* 140 */ new SendURLAction(url).doIt(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public void showExternalWebPage(String url) +/* */ { +/* 147 */ new SendURLAction(url).doIt(); +/* */ } +/* */ +/* */ public void showAdBanner(String url, int width, int height) +/* */ { +/* 152 */ Pilot p = Pilot.getActive(); +/* 153 */ if (p != null) +/* */ { +/* 155 */ World w = p.getWorld(); +/* 156 */ if (w != null) +/* */ { +/* 158 */ w.setHasAdBanner(true); +/* 159 */ w.setBannerURL(url); +/* 160 */ w.setBannerWidth(width); +/* 161 */ w.setBannerHeight(height); +/* 162 */ w.setupAdBanner(); +/* */ } +/* */ } +/* */ } +/* */ +/* */ public Object playSound(String soundFile, int loop) +/* */ { +/* 169 */ Sound owner = new Sound(URL.make(soundFile)); +/* 170 */ SoundPlayer autoSound = null; +/* 171 */ if (soundFile.toLowerCase().endsWith(".wav")) +/* */ { +/* 173 */ autoSound = new WavSoundPlayer(owner); +/* */ } +/* */ else +/* */ { +/* 177 */ autoSound = new WMPSoundPlayer(owner); +/* */ } +/* 179 */ autoSound.start(loop); +/* 180 */ return autoSound; +/* */ } +/* */ +/* */ public boolean serviceSound(Object soundPlayer) +/* */ { +/* 185 */ if (!(soundPlayer instanceof SoundPlayer)) +/* */ { +/* 187 */ System.out.println("Error - invalid handle passed to serviceSound"); +/* 188 */ return false; +/* */ } +/* */ +/* 191 */ SoundPlayer sp = (SoundPlayer)soundPlayer; +/* 192 */ return sp.getState() == 0; +/* */ } +/* */ +/* */ public void stopSound(Object soundPlayer) +/* */ { +/* 197 */ if (!(soundPlayer instanceof SoundPlayer)) +/* */ { +/* 199 */ System.out.println("Error - invalid handle passed to stopSound"); +/* 200 */ return; +/* */ } +/* */ +/* 203 */ SoundPlayer autoSound = (SoundPlayer)soundPlayer; +/* */ +/* 205 */ autoSound.stop(); +/* */ } +/* */ +/* */ public String expandURLMacros(String urlIn) +/* */ { +/* 210 */ return WebControlImp.processURL(urlIn); +/* */ } +/* */ +/* */ public int getIniInt(String entry, int defaultVal) +/* */ { +/* 215 */ return IniFile.gamma().getIniInt(entry, defaultVal); +/* */ } +/* */ +/* */ public String getIniString(String entry, String defaultVal) +/* */ { +/* 220 */ return IniFile.gamma().getIniString(entry, defaultVal); +/* */ } +/* */ +/* */ public void setIniInt(String entry, int val) +/* */ { +/* 225 */ IniFile.gamma().setIniInt(entry, val); +/* */ } +/* */ +/* */ public void setIniString(String entry, String val) +/* */ { +/* 230 */ IniFile.gamma().setIniString(entry, val); +/* */ } +/* */ +/* */ public int getClientVersion() +/* */ { +/* 235 */ return Std.getVersion(); +/* */ } +/* */ +/* */ public void messageBox(String text, String caption) +/* */ { +/* 240 */ Console c = Console.getActive(); +/* 241 */ if (c == null) { return; +/* */ } +/* 243 */ new OkCancelDialog(Console.getFrame(), null, caption, +/* 244 */ null, Console.message("OK"), text, true); +/* */ } +/* */ +/* */ +/* */ public Object yesNoDialog(String text, String caption, String yes, String no, WorldScript callback) +/* */ { +/* 250 */ Console c = Console.getActive(); +/* 251 */ if (c == null) { return null; +/* */ } +/* 253 */ return new OkCancelDialog(Console.getFrame(), callback, caption, +/* 254 */ no, yes, text); +/* */ } +/* */ +/* */ public void printToChat(String text) +/* */ { +/* 259 */ Console c = Console.getActive(); +/* 260 */ if (c == null) return; +/* 261 */ Console.println(text); +/* */ } +/* */ +/* */ public boolean watchVisibility(Object obj) +/* */ { +/* 266 */ if (obj == null) { +/* 267 */ return false; +/* */ } +/* 269 */ if (!(obj instanceof WObject)) { +/* 270 */ return false; +/* */ } +/* 272 */ WObject wobj = (WObject)obj; +/* 273 */ Room r = wobj.getRoom(); +/* */ +/* 275 */ if (r == null) { +/* 276 */ return false; +/* */ } +/* 278 */ r.addPrerenderHandler(wobj); +/* */ +/* 280 */ return true; +/* */ } +/* */ +/* */ public int getVideoWallStatus(Object video) +/* */ { +/* 285 */ if ((video == null) || (!(video instanceof VideoWall))) { +/* 286 */ return -1; +/* */ } +/* 288 */ VideoWall vw = (VideoWall)video; +/* 289 */ return vw.getState(); +/* */ } +/* */ +/* */ public boolean playVideo(Object video, int repeat) +/* */ { +/* 294 */ if ((video == null) || (!(video instanceof VideoWall))) { +/* 295 */ return false; +/* */ } +/* 297 */ VideoWall vw = (VideoWall)video; +/* 298 */ VideoSurface vs = vw.getVideoSurface(); +/* 299 */ if (vs == null) { return false; +/* */ } +/* 301 */ vs.play(repeat); +/* */ +/* 303 */ return true; +/* */ } +/* */ +/* */ public boolean stopVideo(Object video) +/* */ { +/* 308 */ if ((video == null) || (!(video instanceof VideoWall))) { +/* 309 */ return false; +/* */ } +/* 311 */ VideoWall vw = (VideoWall)video; +/* 312 */ VideoSurface vs = vw.getVideoSurface(); +/* 313 */ if (vs == null) { return false; +/* */ } +/* 315 */ vs.stop(); +/* */ +/* 317 */ return true; +/* */ } +/* */ +/* */ public boolean setVideoURL(Object video, String url, int width, int height) +/* */ { +/* 322 */ if ((video == null) || (!(video instanceof VideoWall))) { +/* 323 */ return false; +/* */ } +/* 325 */ VideoWall vw = (VideoWall)video; +/* 326 */ vw.changeURL(url, width, height); +/* */ +/* 328 */ return true; +/* */ } +/* */ +/* */ public boolean setWebWallURL(Object webWall, String url) +/* */ { +/* 333 */ if ((webWall == null) || (!(webWall instanceof WebPageWall))) { +/* 334 */ return false; +/* */ } +/* 336 */ WebPageWall wpw = (WebPageWall)webWall; +/* 337 */ WebControlImp wci = wpw.getWebControlImp(); +/* 338 */ if ((wci != null) && (url != null)) +/* */ { +/* 340 */ return wci.setURL(url); +/* */ } +/* */ +/* 343 */ return false; +/* */ } +/* */ +/* */ public boolean setWebWallURL(Object webWall, String url, String postData) +/* */ { +/* 348 */ if ((webWall == null) || (!(webWall instanceof WebPageWall))) { +/* 349 */ return false; +/* */ } +/* 351 */ WebPageWall wpw = (WebPageWall)webWall; +/* 352 */ WebControlImp wci = wpw.getWebControlImp(); +/* 353 */ if ((wci != null) && (url != null)) +/* */ { +/* 355 */ return wci.setURL(url, postData); +/* */ } +/* */ +/* 358 */ return false; +/* */ } +/* */ +/* */ public boolean animateBot(Object obj, String action) { +/* 362 */ if (!(obj instanceof PosableShape)) { +/* 363 */ return false; +/* */ } +/* 365 */ PosableShape ps = (PosableShape)obj; +/* 366 */ ps.animate(action); +/* */ +/* 368 */ return true; +/* */ } +/* */ +/* */ public boolean setShapeURL(Object obj, String url) +/* */ { +/* 373 */ if (!(obj instanceof Shape)) { +/* 374 */ return false; +/* */ } +/* 376 */ Shape s = (Shape)obj; +/* 377 */ s.setURL(URL.make(url)); +/* */ +/* 379 */ return true; +/* */ } +/* */ +/* */ public Object findObjectInRoom(String objectName) +/* */ { +/* 384 */ Room r = Pilot.getActive().getRoom(); +/* 385 */ if (r != null) +/* */ { +/* 387 */ DeepEnumeration e = new DeepEnumeration(); +/* 388 */ r.getChildren(e); +/* 389 */ while (e.hasMoreElements()) +/* */ { +/* 391 */ SuperRoot wobj = (SuperRoot)e.nextElement(); +/* 392 */ if (wobj.getName().equals(objectName)) +/* */ { +/* 394 */ return wobj; +/* */ } +/* */ } +/* */ } +/* 398 */ return null; +/* */ } +/* */ +/* */ +/* */ public void walkObjectTo(WorldScript script, Object obj, float x, float y, float yaw, float vel) +/* */ { +/* 404 */ if (!(obj instanceof WObject)) +/* 405 */ return; +/* 406 */ HandsOffDriver hod = new HandsOffDriver(); +/* 407 */ hod.setDestPos(new Point2(x, y), yaw, vel); +/* 408 */ hod.setTarget((Transform)obj); +/* 409 */ hod.addCallback(script); +/* 410 */ ((WObject)obj).addHandler(hod); +/* */ } +/* */ +/* */ +/* */ public void moveObjectTo(Object obj, float x, float y, float yaw) +/* */ { +/* 416 */ if (!(obj instanceof Transform)) +/* 417 */ return; +/* 418 */ Transform t = (Transform)obj; +/* 419 */ t.moveTo(x, y, t.getZ()).yaw(yaw); +/* */ } +/* */ +/* */ +/* */ public void moveObjectTo(Object obj, float x, float y, float z, float yaw) +/* */ { +/* 425 */ if (!(obj instanceof Transform)) +/* 426 */ return; +/* 427 */ Transform t = (Transform)obj; +/* 428 */ t.moveTo(x, y, z).yaw(yaw); +/* */ } +/* */ +/* */ +/* */ public void moveObjectTo(Object obj, float x, float y, float z, float yaw, float sc) +/* */ { +/* 434 */ if (!(obj instanceof Transform)) +/* 435 */ return; +/* 436 */ Transform t = (Transform)obj; +/* 437 */ t.moveTo(x, y, z).yaw(yaw); +/* 438 */ t.scale(sc); +/* */ } +/* */ +/* */ +/* */ public boolean isLoggedIn() +/* */ { +/* 444 */ Console c = Console.getActive(); +/* 445 */ if (c != null) +/* */ { +/* 447 */ Galaxy g = c.getGalaxy(); +/* 448 */ if (g != null) +/* */ { +/* 450 */ return g.getOnline(); +/* */ } +/* */ } +/* 453 */ return false; +/* */ } +/* */ +/* */ public int getConcurrentDownloads() +/* */ { +/* 458 */ return CacheEntry.getConcurrentDownloads(); +/* */ } +/* */ +/* */ public boolean getIsVIP() +/* */ { +/* 463 */ Console c = Console.getActive(); +/* 464 */ if (c != null) +/* */ { +/* 466 */ return c.getVIP(); +/* */ } +/* 468 */ return false; +/* */ } +/* */ +/* */ +/* */ public void setAdCube(boolean clickable, boolean usesGIF, String baseURL, String defaultURL) +/* */ { +/* 474 */ Pilot p = Pilot.getActive(); +/* 475 */ if (p != null) +/* */ { +/* 477 */ World w = p.getWorld(); +/* 478 */ if (w != null) +/* */ { +/* 480 */ w.setHasClickableAdCube(clickable); +/* 481 */ w.setAdCubeFormatIsGif(usesGIF); +/* 482 */ w.setAdCubeBaseURL(baseURL); +/* 483 */ w.setDefaultAdCubeURL(defaultURL); +/* */ } +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldScriptToolkitImp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WorldValidator.java b/NET/worlds/scape/WorldValidator.java new file mode 100644 index 0000000..fb0e6bf --- /dev/null +++ b/NET/worlds/scape/WorldValidator.java @@ -0,0 +1,119 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.core.IniFile; +/* */ import NET.worlds.network.Cache; +/* */ import NET.worlds.network.CacheFile; +/* */ import NET.worlds.network.Galaxy; +/* */ import NET.worlds.network.NetUpdate; +/* */ import NET.worlds.network.URL; +/* */ import java.io.PrintStream; +/* */ import java.io.RandomAccessFile; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ public class WorldValidator +/* */ { +/* 17 */ static Vector worldList = null; +/* */ +/* */ private static final boolean debug = true; +/* */ +/* */ public static boolean allow(String worldName) +/* */ { +/* 23 */ if (IniFile.gamma().getIniInt("FreeFreeFree", 1) == 1) { +/* 24 */ return true; +/* */ } +/* 26 */ if (NetUpdate.isInternalVersion()) { +/* 27 */ return true; +/* */ } +/* 29 */ Console c = Console.getActive(); +/* 30 */ if ((c != null) && (!c.getGalaxy().getOnline())) { +/* 31 */ return true; +/* */ } +/* 33 */ if (worldList == null) +/* */ { +/* */ try +/* */ { +/* 37 */ initializeList(); +/* */ +/* */ } +/* */ catch (Exception e) +/* */ { +/* 42 */ return true; +/* */ } +/* */ } +/* */ +/* 46 */ if (worldList == null) { +/* 47 */ return true; +/* */ } +/* 49 */ worldName = normalize(worldName); +/* */ +/* */ +/* 52 */ System.out.println("Validating " + worldName); +/* */ +/* 54 */ boolean allow = worldList.contains(worldName); +/* */ +/* */ +/* 57 */ System.out.println(allow); +/* */ +/* 59 */ return allow; +/* */ } +/* */ +/* */ public static void initializeList() throws Exception +/* */ { +/* 64 */ String worldListFile = NetUpdate.getUpgradeServerURL() + +/* 65 */ "tables/worlds.txt"; +/* 66 */ URL worldListURL = URL.make(worldListFile); +/* 67 */ CacheFile cf = Cache.getFile(worldListURL, true); +/* 68 */ cf.waitUntilLoaded(); +/* 69 */ if (!cf.error()) +/* */ { +/* */ +/* */ +/* */ +/* */ +/* 75 */ boolean foundAtLeastOneEntry = false; +/* */ +/* 77 */ worldList = new Vector(); +/* */ +/* 79 */ RandomAccessFile f = new RandomAccessFile( +/* 80 */ cf.getLocalName(), "r"); +/* 81 */ while (f.getFilePointer() < f.length()) +/* */ { +/* 83 */ String line = f.readLine(); +/* */ +/* 85 */ if (line.indexOf(".world") != -1) +/* */ { +/* 87 */ line = normalize(line); +/* 88 */ foundAtLeastOneEntry = true; +/* */ +/* 90 */ System.out.println("Adding world " + line); +/* 91 */ worldList.addElement(line); +/* */ } +/* */ } +/* */ +/* 95 */ f.close(); +/* */ +/* 97 */ if (!foundAtLeastOneEntry) { +/* 98 */ throw new Exception(); +/* */ } +/* */ } +/* */ else { +/* 102 */ throw new Exception(); +/* */ } +/* */ } +/* */ +/* */ private static String normalize(String worldName) +/* */ { +/* 108 */ String out = URL.make(worldName).getAbsolute(); +/* 109 */ if (out.startsWith("home:/")) +/* 110 */ out = "home:" + out.substring(6); +/* 111 */ return out.toLowerCase().trim(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WorldValidator.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WrRamp.java b/NET/worlds/scape/WrRamp.java new file mode 100644 index 0000000..740c85f --- /dev/null +++ b/NET/worlds/scape/WrRamp.java @@ -0,0 +1,246 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WrRamp +/* */ extends Room +/* */ { +/* */ private static final float epsilon = 0.01F; +/* */ public Portal portal1; +/* */ public Portal portal2; +/* */ private float dzByLength; +/* */ +/* */ public WrRamp(World world, String name, float length, float width, float pWidth, float pHeight, float dz, float lintelZ, float floorTileX, float floorTileY, float ceilTileX, float ceilTileY, float leftTileX, float leftTileY, float rightTileX, float rightTileY, Material floor, Material left, Material right, Material doorpost, Material lintel, Material ceiling) +/* */ { +/* 59 */ super(world, name); +/* */ +/* 61 */ if (pWidth > width) { +/* 62 */ System.out.println("WrRamp: portal too wide; reducing."); +/* 63 */ pWidth = width; +/* */ } +/* 65 */ if (length < 0.0F) { +/* 66 */ System.out.println("WrRamp: length must be positive; inverting."); +/* 67 */ length = -length; +/* */ } +/* 69 */ if (width < 0.0F) { +/* 70 */ System.out.println("WrRamp: width must be positive; inverting."); +/* 71 */ width = -width; +/* */ } +/* 73 */ if (pWidth < 0.0F) { +/* 74 */ System.out.println( +/* 75 */ "WrRamp: portal width must be positive; inverting."); +/* 76 */ pWidth = -pWidth; +/* */ } +/* 78 */ if (pHeight < 0.0F) { +/* 79 */ System.out.println( +/* 80 */ "WrRamp: portal height must be positive; inverting."); +/* 81 */ pHeight = -pHeight; +/* */ } +/* 83 */ if (lintelZ < 0.0F) { +/* 84 */ System.out.println( +/* 85 */ "WrRamp: lintel height must be positive; ignoring."); +/* 86 */ lintelZ = 0.0F; +/* */ } +/* 88 */ if (floorTileX < 10.0F) { +/* 89 */ System.out.println( +/* 90 */ "WrRamp: floor tile width must be at least 10; fixing."); +/* 91 */ floorTileX = 10.0F; +/* */ } +/* 93 */ if (floorTileY < 10.0F) { +/* 94 */ System.out.println( +/* 95 */ "WrRamp: floor tile length must be at least 10; fixing."); +/* 96 */ floorTileY = 10.0F; +/* */ } +/* 98 */ if (ceilTileX < 10.0F) { +/* 99 */ System.out.println( +/* 100 */ "WrRamp: ceiling tile width must be at least 10; fixing."); +/* 101 */ ceilTileX = 10.0F; +/* */ } +/* 103 */ if (ceilTileY < 10.0F) { +/* 104 */ System.out.println( +/* 105 */ "WrRamp: ceiling tile length must be at least 10; fixing."); +/* 106 */ ceilTileY = 10.0F; +/* */ } +/* 108 */ if (leftTileX < 10.0F) { +/* 109 */ System.out.println( +/* 110 */ "WrRamp: lWall tile width must be at least 10; fixing."); +/* 111 */ leftTileX = 10.0F; +/* */ } +/* 113 */ if (leftTileY < 10.0F) { +/* 114 */ System.out.println( +/* 115 */ "WrRamp: lWall tile length must be at least 10; fixing."); +/* 116 */ leftTileY = 10.0F; +/* */ } +/* 118 */ if (rightTileX < 10.0F) { +/* 119 */ System.out.println( +/* 120 */ "WrRamp: rWall tile width must be at least 10; fixing."); +/* 121 */ rightTileX = 10.0F; +/* */ } +/* 123 */ if (rightTileY < 10.0F) { +/* 124 */ System.out.println( +/* 125 */ "WrRamp: rWall tile length must be at least 10; fixing."); +/* 126 */ rightTileY = 10.0F; +/* */ } +/* */ +/* */ +/* 130 */ RoomEnvironment env = getEnvironment(); +/* 131 */ float postX = (width - pWidth) / 2.0F; +/* 132 */ this.dzByLength = (dz / length); +/* 133 */ float nearTop = pHeight + lintelZ; +/* 134 */ float farTop = dz + nearTop; +/* */ +/* */ +/* 137 */ this.portal1 = new Portal(width - postX, 0.0F, 0.0F, postX, 0.0F, pHeight); +/* 138 */ this.portal2 = new Portal(postX, length, dz, +/* 139 */ width - postX, length, dz + pHeight); +/* 140 */ env.add(this.portal1); +/* 141 */ env.add(this.portal2); +/* */ +/* */ +/* 144 */ float[] floorVerts = { +/* 145 */ 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, +/* 146 */ width, 0.0F, 0.0F, width / floorTileX, 0.0F, +/* 147 */ width, length, dz, width / floorTileX, length / floorTileY, +/* 148 */ 0.0F, length, dz, 0.0F, length / floorTileY }; +/* 149 */ env.add(new Polygon(floorVerts, floor)); +/* */ +/* */ +/* 152 */ if (lintelZ > 0.0F) { +/* 153 */ env.add(new Rect(width, 0.0F, pHeight, 0.0F, 0.0F, nearTop, lintel)); +/* 154 */ env.add(new Rect(0.0F, length, dz + pHeight, width, length, farTop, lintel)); +/* */ } +/* 156 */ if (width > pWidth) { +/* 157 */ env.add(new Rect(width, 0.0F, 0.0F, width - postX, 0.0F, pHeight, doorpost)); +/* 158 */ env.add(new Rect(postX, 0.0F, 0.0F, 0.0F, 0.0F, pHeight, doorpost)); +/* 159 */ env.add(new Rect(0.0F, length, dz, postX, length, dz + pHeight, doorpost)); +/* 160 */ env.add(new Rect(width - postX, length, dz, +/* 161 */ width, length, dz + pHeight, doorpost)); +/* */ } +/* */ +/* */ +/* 165 */ float[] ceilVerts = { +/* 166 */ 0.0F, 0.0F, nearTop, 0.0F, 0.0F, +/* 167 */ 0.0F, length, farTop, 0.0F, length / ceilTileY, +/* 168 */ width, length, farTop, width / ceilTileX, length / ceilTileY, +/* 169 */ width, 0.0F, nearTop, width / ceilTileX, 0.0F }; +/* 170 */ env.add(new Polygon(ceilVerts, ceiling)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 189 */ float bottom = Math.min(dz, 0.0F); +/* 190 */ float top = Math.max(nearTop, farTop); +/* 191 */ env.add(new Rect(-0.01F, 0.0F, bottom, -0.01F, length, top, left)); +/* 192 */ env.add(new Rect(width + 0.01F, length, bottom, width + 0.01F, 0.0F, top, +/* 193 */ right)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WrRamp() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float floorHeight(float x, float y, float z) +/* */ { +/* 210 */ return y * this.dzByLength; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point3 surfaceNormal(float x, float y, float z) +/* */ { +/* 218 */ Point3 A = new Point3(1.0F, 0.0F, 0.0F); +/* 219 */ Point3Temp B = Point3Temp.make(0.0F, 1.0F, this.dzByLength); +/* 220 */ A.cross(B); +/* 221 */ A.normalize(); +/* 222 */ return A; +/* */ } +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 230 */ super.saveState(s); +/* 231 */ s.saveFloat(this.dzByLength); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 237 */ super.restoreState(r); +/* 238 */ this.dzByLength = r.restoreFloat(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WrRamp.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WrRectPatch.java b/NET/worlds/scape/WrRectPatch.java new file mode 100644 index 0000000..9b6755e --- /dev/null +++ b/NET/worlds/scape/WrRectPatch.java @@ -0,0 +1,40 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WrRectPatch +/* */ extends RectPatch +/* */ { +/* 20 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 24 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 29 */ RectPatch p = new RectPatch(); +/* 30 */ r.replace(this, p); +/* */ +/* 32 */ p.restoreStateRectPatchHelper(r, classCookie); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WrRectPatch.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WrStaircase.java b/NET/worlds/scape/WrStaircase.java new file mode 100644 index 0000000..05612e6 --- /dev/null +++ b/NET/worlds/scape/WrStaircase.java @@ -0,0 +1,211 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class WrStaircase +/* */ extends Room +/* */ { +/* */ private static final float epsilon = 0.01F; +/* */ public Portal portal1; +/* */ public Portal portal2; +/* */ private float dzByLength; +/* */ +/* */ public WrStaircase(World world, String name, float length, float width, float pWidth, float pHeight, float dz, float lintelZ, int numSteps, Material riser, Material tread, Material left, Material right, Material doorpost, Material lintel, Material ceiling) +/* */ { +/* 64 */ super(world, name); +/* */ +/* 66 */ if (pWidth > width) { +/* 67 */ System.out.println("WrStaircase: portal too wide; reducing."); +/* 68 */ pWidth = width; +/* */ } +/* 70 */ if (length < 0.0F) { +/* 71 */ System.out.println( +/* 72 */ "WrStaircase: length must be positive; inverting."); +/* 73 */ length = -length; +/* */ } +/* 75 */ if (width < 0.0F) { +/* 76 */ System.out.println( +/* 77 */ "WrStaircase: width must be positive; inverting."); +/* 78 */ width = -width; +/* */ } +/* 80 */ if (pWidth < 0.0F) { +/* 81 */ System.out.println( +/* 82 */ "WrStaircase: portal width must be positive; inverting."); +/* 83 */ pWidth = -pWidth; +/* */ } +/* 85 */ if (pHeight < 0.0F) { +/* 86 */ System.out.println( +/* 87 */ "WrStaircase: portal height must be positive; inverting."); +/* 88 */ pHeight = -pHeight; +/* */ } +/* 90 */ if (lintelZ < 0.0F) { +/* 91 */ System.out.println( +/* 92 */ "WrStaircase: lintel height must be positive; ignoring."); +/* 93 */ lintelZ = 0.0F; +/* */ } +/* 95 */ if (numSteps < 2) { +/* 96 */ System.out.println( +/* 97 */ "WrStaircase: must have at least 2 steps."); +/* 98 */ numSteps = 2; +/* */ } +/* */ +/* */ +/* 102 */ RoomEnvironment env = getEnvironment(); +/* 103 */ float postX = (width - pWidth) / 2.0F; +/* 104 */ float bottom = Math.min(dz, 0.0F); +/* 105 */ float ceilingHeight = Math.max(dz, 0.0F) + pHeight + lintelZ; +/* 106 */ this.dzByLength = (dz / length); +/* */ +/* */ +/* 109 */ this.portal1 = new Portal(width - postX, 0.0F, 0.0F, postX, 0.0F, pHeight); +/* */ +/* 111 */ this.portal2 = new Portal(postX, length, dz, +/* 112 */ width - postX, length, dz + pHeight); +/* */ +/* 114 */ env.add(this.portal1); +/* 115 */ env.add(this.portal2); +/* */ +/* */ +/* 118 */ float stepWidth = length / numSteps; +/* 119 */ float stepHeight = dz / numSteps; +/* 120 */ for (int i = 1; i <= numSteps; i++) { +/* 121 */ Rect w = new Rect(0.0F, i * stepWidth, (i - 1) * stepHeight, +/* 122 */ width, i * stepWidth, i * stepHeight - 0.01F, riser); +/* 123 */ w.setTileSize(stepHeight, stepHeight); +/* */ +/* */ +/* 126 */ env.add(w); +/* */ } +/* */ +/* */ +/* 130 */ for (int i = 0; i < numSteps; i++) { +/* 131 */ Rect w = Rect.floor(0.0F, i * stepWidth, i * stepHeight, +/* 132 */ width, (i + 1) * stepWidth - 0.01F, tread); +/* 133 */ w.setTileSize(Math.abs(stepWidth), Math.abs(stepWidth)); +/* 134 */ env.add(w); +/* */ } +/* */ +/* */ +/* 138 */ if (ceilingHeight > pHeight) +/* 139 */ env.add( +/* 140 */ new Rect(width, 0.0F, pHeight, 0.0F, 0.0F, ceilingHeight - 0.01F, lintel)); +/* 141 */ if (ceilingHeight > dz + pHeight) +/* 142 */ env.add( +/* 143 */ new Rect(0.0F, length, dz + pHeight, +/* 144 */ width, length, ceilingHeight - 0.01F, lintel)); +/* 145 */ if (width > pWidth) { +/* 146 */ env.add(new Rect(width, 0.0F, 0.0F, width - postX, 0.0F, pHeight, doorpost)); +/* 147 */ env.add(new Rect(postX, 0.0F, 0.0F, 0.0F, 0.0F, pHeight, doorpost)); +/* 148 */ env.add(new Rect(0.0F, length, dz, postX, length, dz + pHeight, doorpost)); +/* 149 */ env.add(new Rect(width - postX, length, dz, width, length, dz + pHeight, +/* 150 */ doorpost)); +/* */ } +/* */ +/* */ +/* 154 */ env.add(Rect.ceiling(0.0F, 0.0F, ceilingHeight, width, length, ceiling)); +/* 155 */ env.add(new Rect(-0.01F, 0.0F, bottom, -0.01F, length, ceilingHeight, +/* 156 */ left)); +/* 157 */ env.add(new Rect(width + 0.01F, length, bottom, +/* 158 */ width + 0.01F, 0.0F, ceilingHeight, right)); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public WrStaircase() {} +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public float floorHeight(float x, float y, float z) +/* */ { +/* 175 */ return y * this.dzByLength; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Point3 surfaceNormal(float x, float y, float z) +/* */ { +/* 183 */ Point3 A = new Point3(1.0F, 0.0F, 0.0F); +/* 184 */ Point3Temp B = Point3Temp.make(0.0F, 1.0F, this.dzByLength); +/* 185 */ A.cross(B); +/* 186 */ A.normalize(); +/* 187 */ return A; +/* */ } +/* */ +/* */ +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 195 */ super.saveState(s); +/* 196 */ s.saveFloat(this.dzByLength); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException, TooNewException +/* */ { +/* 202 */ super.restoreState(r); +/* 203 */ this.dzByLength = r.restoreFloat(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WrStaircase.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/WrVisiRectPatch.java b/NET/worlds/scape/WrVisiRectPatch.java new file mode 100644 index 0000000..c2e04b1 --- /dev/null +++ b/NET/worlds/scape/WrVisiRectPatch.java @@ -0,0 +1,68 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import java.io.IOException; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class WrVisiRectPatch +/* */ extends RectPatch +/* */ { +/* 20 */ private static Object classCookie = new Object(); +/* */ +/* */ public void saveState(Saver s) throws IOException +/* */ { +/* 24 */ if (!$assertionsDisabled) throw new AssertionError(); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) throws IOException, TooNewException +/* */ { +/* 29 */ RectPatch p = new RectPatch(); +/* 30 */ r.replace(this, p); +/* */ +/* 32 */ switch (r.restoreVersion(classCookie)) { +/* */ case 0: +/* 34 */ super.restoreState(r); +/* 35 */ this.xTile = r.restoreFloat(); +/* 36 */ this.xTileOffset = r.restoreFloat(); +/* 37 */ this.yTile = r.restoreFloat(); +/* 38 */ this.yTileOffset = r.restoreFloat(); +/* 39 */ this.mat = ((Material)r.restoreMaybeNull()); +/* 40 */ this.t[0] = ((Polygon)r.restoreMaybeNull()); +/* 41 */ this.t[1] = ((Polygon)r.restoreMaybeNull()); +/* 42 */ this.t[2] = ((Polygon)r.restoreMaybeNull()); +/* 43 */ this.t[3] = ((Polygon)r.restoreMaybeNull()); +/* 44 */ break; +/* */ default: +/* 46 */ throw new TooNewException(); +/* */ } +/* */ +/* 49 */ p.xDim = this.xDim; +/* 50 */ p.yDim = this.yDim; +/* 51 */ p.z[0] = this.z[0]; +/* 52 */ p.z[1] = this.z[1]; +/* 53 */ p.z[2] = this.z[2]; +/* 54 */ p.z[3] = this.z[3]; +/* 55 */ p.xTile = this.xTile; +/* 56 */ p.xTileOffset = this.xTileOffset; +/* 57 */ p.yTile = this.yTile; +/* 58 */ p.yTileOffset = this.yTileOffset; +/* 59 */ p.mat = this.mat; +/* 60 */ p.setVisible(true); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\WrVisiRectPatch.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/YawWidget.java b/NET/worlds/scape/YawWidget.java new file mode 100644 index 0000000..d4befb5 --- /dev/null +++ b/NET/worlds/scape/YawWidget.java @@ -0,0 +1,41 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class YawWidget +/* */ extends WidgetButton +/* */ { +/* */ private static final long serialVersionUID = 1L; +/* */ +/* */ public YawWidget(ToolBar toolbar) +/* */ { +/* 22 */ super(toolbar, "yaw.gif", Console.message("Yaw")); +/* */ } +/* */ +/* */ public String drag(boolean initialDrag, float deltax, float deltay) +/* */ { +/* 27 */ if (Math.abs(deltay) > Math.abs(deltax)) +/* 28 */ deltax = 0.0F; +/* 29 */ Transform t = Transform.make(); +/* 30 */ applyWorldTransform(initialDrag, +/* 31 */ t.spin(getWorldAxis(0, 0, 1), deltax)); +/* 32 */ t.recycle(); +/* 33 */ return "Yaw"; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\YawWidget.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file diff --git a/NET/worlds/scape/sendURL.java b/NET/worlds/scape/sendURL.java new file mode 100644 index 0000000..6abc597 --- /dev/null +++ b/NET/worlds/scape/sendURL.java @@ -0,0 +1,203 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.console.Console; +/* */ import NET.worlds.network.URL; +/* */ import java.io.IOException; +/* */ import java.text.MessageFormat; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class sendURL +/* */ extends TriggeredSwitchableBehavior +/* */ implements MouseDownHandler, BumpHandler, FrameHandler +/* */ { +/* */ protected String browser; +/* */ protected String destination; +/* */ protected boolean silentURL; +/* */ protected boolean initialized; +/* */ +/* */ public sendURL() +/* */ { +/* 37 */ this.initialized = false; +/* 38 */ this.trigger = new String("none"); +/* 39 */ this.externalTriggerTag = new String(""); +/* 40 */ this.silentURL = false; +/* 41 */ this.browser = new String("NETSCAPE"); +/* 42 */ this.destination = new String("http://www.worlds.net"); +/* */ } +/* */ +/* */ public static native int init(String paramString); +/* */ +/* */ public static native int get(String paramString); +/* */ +/* */ public static native int silent_get(String paramString); +/* */ +/* */ public void ExternalTrigger(Trigger source, int seqno, int eventno) { +/* 52 */ sendURLStart(); +/* */ } +/* */ +/* */ +/* */ public void sendURLStart() +/* */ { +/* 58 */ if (this.silentURL) { +/* 59 */ silent_get(this.destination); +/* */ } else { +/* 61 */ get(this.destination); +/* */ } +/* */ } +/* */ +/* */ public boolean handle(FrameEvent e) +/* */ { +/* 67 */ if (!this.initialized) { +/* 68 */ init(this.browser); +/* 69 */ this.initialized = true; +/* */ } +/* 71 */ return true; +/* */ } +/* */ +/* */ +/* */ public boolean handle(MouseDownEvent e) +/* */ { +/* 77 */ if ((this.enabled) && +/* 78 */ (this.trigger.equals("click"))) { +/* 79 */ sendURLStart(); +/* */ } +/* */ +/* 82 */ return true; +/* */ } +/* */ +/* */ public boolean handle(BumpEventTemp e) +/* */ { +/* 87 */ if ((this.enabled) && +/* 88 */ (this.trigger.equals("bump"))) { +/* 89 */ sendURLStart(); +/* */ } +/* */ +/* 92 */ return true; +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ public Object properties(int index, int offset, int mode, Object value) +/* */ throws NoSuchPropertyException +/* */ { +/* 101 */ Object ret = null; +/* 102 */ switch (index - offset) { +/* */ case 0: +/* 104 */ if (mode == 0) { +/* 105 */ ret = StringPropertyEditor.make( +/* 106 */ new Property(this, index, "Trigger")); +/* 107 */ } else if (mode == 1) { +/* 108 */ ret = new String(this.trigger); +/* 109 */ } else if (mode == 2) { +/* 110 */ this.trigger = ((String)value).toString().trim(); +/* 111 */ if (this.trigger.equals("external")) { +/* 112 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 113 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 114 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ } +/* */ +/* 118 */ break; +/* */ case 1: +/* 120 */ if (mode == 0) { +/* 121 */ ret = StringPropertyEditor.make( +/* 122 */ new Property(this, index, "External Trigger Tag")); +/* 123 */ } else if (mode == 1) { +/* 124 */ ret = new String(this.externalTriggerTag); +/* 125 */ } else if (mode == 2) { +/* 126 */ this.externalTriggerTag = ((String)value).toString().trim(); +/* */ } +/* 128 */ break; +/* */ case 2: +/* 130 */ if (mode == 0) { +/* 131 */ ret = BooleanPropertyEditor.make( +/* 132 */ new Property(this, index, "Silent URL"), +/* 133 */ "No", "Yes"); +/* 134 */ } else if (mode == 1) { +/* 135 */ ret = new Boolean(this.silentURL); +/* 136 */ } else if (mode == 2) +/* 137 */ this.silentURL = ((Boolean)value).booleanValue(); +/* 138 */ break; +/* */ case 3: +/* 140 */ if (mode == 0) { +/* 141 */ ret = StringPropertyEditor.make( +/* 142 */ new Property(this, index, "Destination")); +/* 143 */ } else if (mode == 1) { +/* 144 */ ret = new String(this.destination); +/* 145 */ } else if (mode == 2) { +/* 146 */ this.destination = ((String)value).toString().trim(); +/* */ } +/* 148 */ break; +/* */ default: +/* 150 */ ret = super.properties(index, offset + 4, mode, value); +/* */ } +/* 152 */ return ret; +/* */ } +/* */ +/* */ public String toString() +/* */ { +/* 157 */ return +/* */ +/* 159 */ super.toString() + "[enabled " + this.enabled + ", trigger " + this.trigger + ", externalTriggerTag " + this.externalTriggerTag + "]"; +/* */ } +/* */ +/* */ public void saveState(Saver s) +/* */ throws IOException +/* */ { +/* 165 */ Object[] arguments = { new String(getName()) }; +/* 166 */ Console.println(MessageFormat.format( +/* 167 */ Console.message("sendURL-obs"), arguments)); +/* 168 */ s.saveString(this.trigger); +/* 169 */ s.saveString(this.externalTriggerTag); +/* 170 */ s.saveBoolean(this.silentURL); +/* 171 */ s.saveString(this.destination); +/* */ } +/* */ +/* */ public void restoreState(Restorer r) +/* */ throws IOException +/* */ { +/* 177 */ this.trigger = r.restoreString(); +/* 178 */ this.externalTriggerTag = r.restoreString(); +/* 179 */ this.silentURL = r.restoreBoolean(); +/* 180 */ this.destination = r.restoreString(); +/* 181 */ if (this.trigger.equals("external")) { +/* 182 */ Object[] arguments = { new String(getName()) }; +/* 183 */ Console.println(MessageFormat.format( +/* 184 */ Console.message("sendURL-obs"), arguments)); +/* 185 */ Trigger.TriggeredSwitchableBehaviorList[ +/* 186 */ Trigger.TriggeredSwitchableBehaviorListCount] = this; +/* 187 */ Trigger.TriggeredSwitchableBehaviorListCount += 1; +/* */ } +/* */ else { +/* 190 */ SendURLAction sua = new SendURLAction(); +/* 191 */ if (this.destination != null) +/* 192 */ sua.setDestination(URL.make(this.destination)); +/* 193 */ sua.setTrigger(this.trigger); +/* 194 */ r.replace(this, sua); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\sendURL.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */ \ No newline at end of file -- cgit v1.2.3