From a90d7e655bf1b1aafc5e9678dcf4efdc2782417b Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Tue, 22 Aug 2006 20:48:47 +0000 Subject: [PATCH] Compilation fixes: these classes weren't referenced before and so weren't compiling, but I'm playing around with building .swc libraries to cut down on the build time of the client. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@46 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../client/DefaultFlexTableConfigurator.as | 4 ++-- .../threerings/parlor/client/TableDirector.as | 2 +- src/as/com/threerings/parlor/data/Table.as | 24 +++++++++++-------- .../threerings/whirled/spot/data/Cluster.as | 2 +- .../whirled/spot/data/ClusterObject.as | 2 -- .../com/threerings/whirled/util/UpdateList.as | 2 +- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as b/src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as index 86275562..38fdeeca 100644 --- a/src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as +++ b/src/as/com/threerings/parlor/client/DefaultFlexTableConfigurator.as @@ -41,7 +41,7 @@ public class DefaultFlexTableConfigurator extends TableConfigurator * Create a TableConfigurator that allows for the specified configuration * parameters. */ - public function DefaultSwingTableConfigurator ( + public function DefaultFlexTableConfigurator ( desiredPlayers :int, minPlayers :int = -1, maxPlayers :int = -1, allowPrivate :Boolean = false) { @@ -72,7 +72,7 @@ public class DefaultFlexTableConfigurator extends TableConfigurator } // documentation inherited - protected function createConfigInterface () :void + override protected function createConfigInterface () :void { super.createConfigInterface(); diff --git a/src/as/com/threerings/parlor/client/TableDirector.as b/src/as/com/threerings/parlor/client/TableDirector.as index e87e8bd7..13a76d73 100644 --- a/src/as/com/threerings/parlor/client/TableDirector.as +++ b/src/as/com/threerings/parlor/client/TableDirector.as @@ -226,7 +226,7 @@ public class TableDirector extends BasicDirector } // documentation inherited - protected function fetchServices (Client client) :void + override protected function fetchServices (client :Client) :void { // get a handle on our parlor services _pservice = (client.requireService(ParlorService) as ParlorService); diff --git a/src/as/com/threerings/parlor/data/Table.as b/src/as/com/threerings/parlor/data/Table.as index 308875be..b67c6979 100644 --- a/src/as/com/threerings/parlor/data/Table.as +++ b/src/as/com/threerings/parlor/data/Table.as @@ -21,12 +21,15 @@ package com.threerings.parlor.data { +import com.threerings.util.ArrayUtil; +import com.threerings.util.ClassUtil; import com.threerings.util.Hashable; import com.threerings.util.Name; import com.threerings.util.StringBuilder; import com.threerings.io.ObjectInputStream; import com.threerings.io.ObjectOutputStream; +import com.threerings.io.TypedArray; import com.threerings.presents.dobj.DSet; import com.threerings.presents.dobj.DSet_Entry; @@ -35,6 +38,7 @@ import com.threerings.crowd.data.BodyObject; import com.threerings.parlor.data.ParlorCodes; import com.threerings.parlor.game.data.GameConfig; +import com.threerings.parlor.game.data.PartyGameCodes; import com.threerings.parlor.game.data.PartyGameConfig; /** @@ -42,7 +46,7 @@ import com.threerings.parlor.game.data.PartyGameConfig; * the Parlor services. */ public class Table - implements Hashable, DSet_Entry, ParlorCodes + implements Hashable, DSet_Entry { /** The unique identifier for this table. */ public var tableId :int; @@ -138,7 +142,7 @@ public class Table // compress the team indexes down var newTeams :TypedArray = new TypedArray("[[I"); - var players :TypedArray = getPlayers(); + var players :Array = getPlayers(); for (var ii :int = 0; ii < teams.length; ii++) { var subTeams :Array = (teams[ii] as Array); var newSubTeams :TypedArray = TypedArray.create(int); @@ -160,12 +164,12 @@ public class Table */ public function isPartyGame () :Boolean { - return (PartyGameConfig.NOT_PARTY_GAME != getPartyGameType()); + return (PartyGameCodes.NOT_PARTY_GAME != getPartyGameType()); } /** * Get the type of party game being played at this table, or - * PartyGameConfig.NOT_PARTY_GAME. + * PartyGameCodes.NOT_PARTY_GAME. */ public function getPartyGameType () :int { @@ -173,7 +177,7 @@ public class Table return (config as PartyGameConfig).getPartyGameType(); } else { - return PartyGameConfig.NOT_PARTY_GAME; + return PartyGameCodes.NOT_PARTY_GAME; } } @@ -192,12 +196,12 @@ public class Table { // make sure the requested position is a valid one if (position >= tconfig.desiredPlayerCount || position < 0) { - return INVALID_TABLE_POSITION; + return ParlorCodes.INVALID_TABLE_POSITION; } // make sure the requested position is not already occupied if (occupants[position] != null) { - return TABLE_POSITION_OCCUPIED; + return ParlorCodes.TABLE_POSITION_OCCUPIED; } // otherwise all is well, stick 'em in @@ -224,7 +228,7 @@ public class Table * removed, false if the user was never seated at the table in the * first place. */ - public function clearOccupant (username :Name) :void + public function clearOccupant (username :Name) :Boolean { var dex :int = ArrayUtil.indexOf(occupants, username); if (dex != -1) { @@ -242,7 +246,7 @@ public class Table * removed, false if the user was never seated at the table in the * first place. */ - public function clearOccupant (bodyOid :int) :Boolean + public function clearOccupantByOid (bodyOid :int) :Boolean { var dex :int = ArrayUtil.indexOf(bodyOids, bodyOid); if (dex != -1) { @@ -319,7 +323,7 @@ public class Table public function equals (other :Object) :Boolean { return (other is Table) && - (tableId == ((Table) other).tableId); + (tableId == (other as Table).tableId); } // from Hashable diff --git a/src/as/com/threerings/whirled/spot/data/Cluster.as b/src/as/com/threerings/whirled/spot/data/Cluster.as index 795476d1..47fde87f 100644 --- a/src/as/com/threerings/whirled/spot/data/Cluster.as +++ b/src/as/com/threerings/whirled/spot/data/Cluster.as @@ -68,7 +68,7 @@ public class Cluster extends Rectangle /** * Generates a string representation of this instance. */ - public function toString () :String + override public function toString () :String { return super.toString() + ", clusterOid=" + clusterOid; } diff --git a/src/as/com/threerings/whirled/spot/data/ClusterObject.as b/src/as/com/threerings/whirled/spot/data/ClusterObject.as index b99b30fe..5d9cd14e 100644 --- a/src/as/com/threerings/whirled/spot/data/ClusterObject.as +++ b/src/as/com/threerings/whirled/spot/data/ClusterObject.as @@ -24,8 +24,6 @@ package com.threerings.whirled.spot.data { import com.threerings.presents.dobj.DObject; import com.threerings.presents.dobj.OidList; -import com.threerings.crowd.chat.data.SpeakObject; - /** * Used to dispatch chat in clusters. */ diff --git a/src/as/com/threerings/whirled/util/UpdateList.as b/src/as/com/threerings/whirled/util/UpdateList.as index 4b8ad5a6..2a962419 100644 --- a/src/as/com/threerings/whirled/util/UpdateList.as +++ b/src/as/com/threerings/whirled/util/UpdateList.as @@ -59,7 +59,7 @@ public class UpdateList } else if (gotVersion < expVersion) { // we somehow got an update that's older than updates we // already have? wick wick wack - throw new IllegalArgumentError("Invalid update version " + + throw new ArgumentError("Invalid update version " + "[want=" + expVersion + ", got=" + update + "]"); } }