The amazing refactor forteen hundred billion: eliminated "locations",

portals will by dynamically created, combined display/runtime/editable
scenes into one, enhanced support for modifying scenes and distributing
updates to the clients, various other small stuff that should not be
sweated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2274 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-02-12 07:23:32 +00:00
parent a54b3e279c
commit 2a4385ad33
67 changed files with 2073 additions and 2724 deletions
@@ -1,5 +1,5 @@
//
// $Id: ZoneDirector.java,v 1.13 2003/01/18 22:45:16 mdb Exp $
// $Id: ZoneDirector.java,v 1.14 2003/02/12 07:23:32 mdb Exp $
package com.threerings.whirled.zone.client;
@@ -14,6 +14,7 @@ import com.threerings.crowd.data.PlaceConfig;
import com.threerings.whirled.client.SceneDirector;
import com.threerings.whirled.data.SceneModel;
import com.threerings.whirled.data.SceneUpdate;
import com.threerings.whirled.util.WhirledContext;
import com.threerings.whirled.zone.Log;
@@ -158,19 +159,38 @@ public class ZoneDirector extends BasicDirector
notifyObservers(summary);
}
/**
* Called in response to a successful {@link ZoneService#moveTo}
* request when our cached scene was out of date and the server
* determined that we needed some updates.
*/
public void moveSucceededWithUpdates (
int placeId, PlaceConfig config, ZoneSummary summary,
SceneUpdate[] updates)
{
// keep track of the summary
_summary = summary;
// pass the rest off to the standard scene transition code
_scdir.moveSucceededWithUpdates(placeId, config, updates);
// and let the zone observers know what's up
notifyObservers(summary);
}
/**
* Called in response to a successful {@link ZoneService#moveTo}
* request when our cached scene was out of date and the server
* determined that we needed an updated copy.
*/
public void moveSucceededPlusUpdate (
public void moveSucceededWithScene (
int placeId, PlaceConfig config, ZoneSummary summary, SceneModel model)
{
// keep track of the summary
_summary = summary;
// pass the rest off to the standard scene transition code
_scdir.moveSucceededPlusUpdate(placeId, config, model);
_scdir.moveSucceededWithScene(placeId, config, model);
// and let the zone observers know what's up
notifyObservers(summary);
@@ -1,5 +1,5 @@
//
// $Id: ZoneService.java,v 1.6 2002/08/14 19:07:58 mdb Exp $
// $Id: ZoneService.java,v 1.7 2003/02/12 07:23:32 mdb Exp $
package com.threerings.whirled.zone.client;
@@ -8,6 +8,7 @@ import com.threerings.presents.client.InvocationService;
import com.threerings.crowd.data.PlaceConfig;
import com.threerings.whirled.data.SceneModel;
import com.threerings.whirled.data.SceneUpdate;
import com.threerings.whirled.zone.data.ZoneSummary;
@@ -17,12 +18,17 @@ import com.threerings.whirled.zone.data.ZoneSummary;
*/
public interface ZoneService extends InvocationService
{
/** Used to deliver responses to {@link #moveTo} requests. */
public static interface ZoneMoveListener extends InvocationListener
{
public void moveSucceeded (
int placeId, PlaceConfig config, ZoneSummary summary);
public void moveSucceededPlusUpdate (
public void moveSucceededWithUpdates (
int placeId, PlaceConfig config, ZoneSummary summary,
SceneUpdate[] updates);
public void moveSucceededWithScene (
int placeId, PlaceConfig config, ZoneSummary summary,
SceneModel model);
}
@@ -33,11 +39,11 @@ public interface ZoneService extends InvocationService
*
* @param zoneId the zone id to which we want to move.
* @param sceneId the scene id to which we want to move.
* @param sceneVers the version number of the scene object that we
* have in our local repository.
* @param version the version number of the scene object that we have
* in our local repository.
* @param listener the object that will receive the callback when the
* request succeeds or fails.
*/
public void moveTo (Client client, int zoneId, int sceneId,
int sceneVers, ZoneMoveListener listener);
int version, ZoneMoveListener listener);
}