From b9a8ea64547536a23e9d746177bb918157cbdaf9 Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Wed, 16 Jun 2010 22:57:16 +0000 Subject: [PATCH] Use the modified nenya Miso bits. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@930 c613c5cb-e716-0410-b11b-feb51c14d237 --- etc/libs-incl.xml | 1 + .../stage/client/StageSceneController.as | 3 +- .../stage/client/StageScenePanel.as | 55 +++---------------- .../stage/data/StageMisoSceneModel.as | 3 +- 4 files changed, 12 insertions(+), 50 deletions(-) diff --git a/etc/libs-incl.xml b/etc/libs-incl.xml index 2acd2027..d97a1e97 100644 --- a/etc/libs-incl.xml +++ b/etc/libs-incl.xml @@ -28,6 +28,7 @@ + diff --git a/src/as/com/threerings/stage/client/StageSceneController.as b/src/as/com/threerings/stage/client/StageSceneController.as index 74af7c8e..e1547a93 100644 --- a/src/as/com/threerings/stage/client/StageSceneController.as +++ b/src/as/com/threerings/stage/client/StageSceneController.as @@ -22,6 +22,7 @@ package com.threerings.stage.client { import com.threerings.crowd.client.PlaceView; import com.threerings.crowd.util.CrowdContext; +import com.threerings.miso.util.MisoSceneMetrics; import com.threerings.stage.data.StageLocation; import com.threerings.stage.util.StageContext; import com.threerings.util.Log; @@ -52,7 +53,7 @@ public class StageSceneController extends SpotSceneController override protected function createPlaceView (ctx :CrowdContext) :PlaceView { - return new StageScenePanel(StageContext(ctx), this); + return new StageScenePanel(StageContext(ctx), this, new MisoSceneMetrics()); } override protected function sceneUpdated (update :SceneUpdate) :void diff --git a/src/as/com/threerings/stage/client/StageScenePanel.as b/src/as/com/threerings/stage/client/StageScenePanel.as index 40e87b90..f3653724 100644 --- a/src/as/com/threerings/stage/client/StageScenePanel.as +++ b/src/as/com/threerings/stage/client/StageScenePanel.as @@ -20,66 +20,25 @@ package com.threerings.stage.client { -import flash.events.Event; -import flash.events.EventDispatcher; - -import com.threerings.crowd.client.PlaceView; -import com.threerings.crowd.data.PlaceObject; -import com.threerings.whirled.data.SceneUpdate; -import com.threerings.stage.util.StageContext; import com.threerings.util.Controller; +import com.threerings.whirled.data.SceneUpdate; +import com.threerings.miso.client.MisoScenePanel; +import com.threerings.miso.util.MisoSceneMetrics; +import com.threerings.stage.util.StageContext; /** * Eventually responsible for rendering a stage scene - but for now it's a stub. */ -public class StageScenePanel - implements PlaceView +public class StageScenePanel extends MisoScenePanel { - public function StageScenePanel (ctx :StageContext, ctrl :Controller) + public function StageScenePanel (ctx :StageContext, ctrl :Controller, metrics :MisoSceneMetrics) { - _dispatcher = new EventDispatcher(this); - } - - public function willEnterPlace (plobj :PlaceObject) :void - { - } - - public function didLeavePlace (plobj :PlaceObject) :void - { - } - - public function addEventListener (type :String, listener :Function, useCapture :Boolean = false, - priority:int = 0, useWeakReference :Boolean = false) :void - { - _dispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference); - } - - public function dispatchEvent (event :Event) :Boolean - { - return _dispatcher.dispatchEvent(event); - } - - public function hasEventListener (type :String) :Boolean - { - return _dispatcher.hasEventListener(type); - } - - public function removeEventListener (type :String, listener :Function, - useCapture :Boolean = false) :void - { - _dispatcher.removeEventListener(type, listener, useCapture); - } - - public function willTrigger (type :String) :Boolean - { - return _dispatcher.willTrigger(type); + super(ctx, metrics); } public function sceneUpdated (update :SceneUpdate) :void { // TODO } - - protected var _dispatcher :EventDispatcher; } } diff --git a/src/as/com/threerings/stage/data/StageMisoSceneModel.as b/src/as/com/threerings/stage/data/StageMisoSceneModel.as index c738f5a3..ab075bfd 100644 --- a/src/as/com/threerings/stage/data/StageMisoSceneModel.as +++ b/src/as/com/threerings/stage/data/StageMisoSceneModel.as @@ -27,6 +27,7 @@ import com.threerings.whirled.data.SceneModel; import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; import com.threerings.miso.data.SparseMisoSceneModel_Section; +import com.threerings.util.Integer; import com.threerings.stage.data.StageMisoSceneModel; /** @@ -75,7 +76,7 @@ public class StageMisoSceneModel extends SparseMisoSceneModel /** * Returns the section key for the specified tile coordinate. */ - public function getSectionKey (x :int, y :int) :int + public function getSectionKey (x :int, y :int) :Integer { return key(x, y); }