Use the modified nenya Miso bits.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@930 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Mike Thomas
2010-06-16 22:57:16 +00:00
parent aeecc32e38
commit b9a8ea6454
4 changed files with 12 additions and 50 deletions
+1
View File
@@ -28,6 +28,7 @@
<include name="aspirin.swc"/>
<include name="naryalib*.swc"/>
<include name="nenyalib*.swc"/>
<include name="as3isolib.swc"/>
<!-- Thane dependencies -->
<include name="thane*.abc"/>
<include name="tamarin-builtin*.abc"/>
@@ -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
@@ -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;
}
}
@@ -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);
}