From 7fd42fc72916a29619e3f7615c8ad84f3a20f46f Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 27 Sep 2006 23:57:48 +0000 Subject: [PATCH] Trashed GameService, use the new manager caller. (This was changed in Java a few weeks back.) git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@80 c613c5cb-e716-0410-b11b-feb51c14d237 --- .../parlor/game/client/GameController.as | 2 +- .../parlor/game/client/GameService.as | 39 --------------- .../parlor/game/data/GameMarshaller.as | 49 ------------------- .../threerings/parlor/game/data/GameObject.as | 23 --------- 4 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 src/as/com/threerings/parlor/game/client/GameService.as delete mode 100644 src/as/com/threerings/parlor/game/data/GameMarshaller.as diff --git a/src/as/com/threerings/parlor/game/client/GameController.as b/src/as/com/threerings/parlor/game/client/GameController.as index c1f4cec7..ab7e39a3 100644 --- a/src/as/com/threerings/parlor/game/client/GameController.as +++ b/src/as/com/threerings/parlor/game/client/GameController.as @@ -232,7 +232,7 @@ public /*abstract*/ class GameController extends PlaceController protected function playerReady () :void { log.info("Reporting ready " + _gobj.which() + "."); - _gobj.gameService.playerReady(_ctx.getClient()); + _gobj.manager.invoke("playerReady"); } /** diff --git a/src/as/com/threerings/parlor/game/client/GameService.as b/src/as/com/threerings/parlor/game/client/GameService.as deleted file mode 100644 index 8458f5f7..00000000 --- a/src/as/com/threerings/parlor/game/client/GameService.as +++ /dev/null @@ -1,39 +0,0 @@ -// -// $Id: GameService.java 3600 2005-06-15 23:46:31Z ray $ -// -// Narya library - tools for developing networked games -// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License as published -// by the Free Software Foundation; either version 2.1 of the License, or -// (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -package com.threerings.parlor.game.client { - -import com.threerings.presents.client.Client; -import com.threerings.presents.client.InvocationService; - -/** - * Provides services used by game clients to request that actions be taken - * by the game manager. - */ -public interface GameService extends InvocationService -{ - /** - * Lets the game manager know that the calling player is in the game - * room and ready to play. - */ - function playerReady (client :Client) :void; -} -} diff --git a/src/as/com/threerings/parlor/game/data/GameMarshaller.as b/src/as/com/threerings/parlor/game/data/GameMarshaller.as deleted file mode 100644 index cb125bcf..00000000 --- a/src/as/com/threerings/parlor/game/data/GameMarshaller.as +++ /dev/null @@ -1,49 +0,0 @@ -// -// $Id: GameMarshaller.java 4145 2006-05-24 01:24:24Z ray $ -// -// Narya library - tools for developing networked games -// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved -// http://www.threerings.net/code/narya/ -// -// This library is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License as published -// by the Free Software Foundation; either version 2.1 of the License, or -// (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -package com.threerings.parlor.game.data { - -import com.threerings.parlor.game.client.GameService; -import com.threerings.presents.client.Client; -import com.threerings.presents.data.InvocationMarshaller; -import com.threerings.presents.dobj.InvocationResponseEvent; - -/** - * Provides the implementation of the {@link GameService} interface - * that marshalls the arguments and delivers the request to the provider - * on the server. Also provides an implementation of the response listener - * interfaces that marshall the response arguments and deliver them back - * to the requesting client. - */ -public class GameMarshaller extends InvocationMarshaller - implements GameService -{ - /** The method id used to dispatch {@link #playerReady} requests. */ - public static const PLAYER_READY :int = 1; - - // documentation inherited from interface - public function playerReady (arg1 :Client) :void - { - sendRequest(arg1, PLAYER_READY, [ ]); - } - -} -} diff --git a/src/as/com/threerings/parlor/game/data/GameObject.as b/src/as/com/threerings/parlor/game/data/GameObject.as index 5b0398d4..306d2ede 100644 --- a/src/as/com/threerings/parlor/game/data/GameObject.as +++ b/src/as/com/threerings/parlor/game/data/GameObject.as @@ -46,9 +46,6 @@ import com.threerings.crowd.data.PlaceObject; public class GameObject extends PlaceObject { // AUTO-GENERATED: FIELDS START - /** The field name of the gameService field. */ - public static const GAME_SERVICE :String = "gameService"; - /** The field name of the state field. */ public static const STATE :String = "state"; @@ -92,9 +89,6 @@ public class GameObject extends PlaceObject * game prematurely. */ public static const PLAYER_LEFT_GAME :int = 1; - /** Provides general game invocation services. */ - public var gameService :GameMarshaller; - /** The game state, one of {@link #PRE_GAME}, {@link #IN_PLAY}, * {@link #GAME_OVER}, or {@link #CANCELLED}. */ public var state :int = PRE_GAME; @@ -260,22 +254,6 @@ public class GameObject extends PlaceObject // // AUTO-GENERATED: METHODS START // /** -// * Requests that the gameService field be set to the -// * specified value. The local value will be updated immediately and an -// * event will be propagated through the system to notify all listeners -// * that the attribute did change. Proxied copies of this object (on -// * clients) will apply the value change when they received the -// * attribute changed notification. -// */ -// public function setGameService (value :GameMarshaller) :void -// { -// var ovalue :GameMarshaller = this.gameService; -// requestAttributeChange( -// GAME_SERVICE, value, ovalue); -// this.gameService = value; -// } -// -// /** // * Requests that the state field be set to the // * specified value. The local value will be updated immediately and an // * event will be propagated through the system to notify all listeners @@ -461,7 +439,6 @@ public class GameObject extends PlaceObject { super.readObject(ins); - gameService = (ins.readObject() as GameMarshaller); state = ins.readInt(); isRated = ins.readBoolean(); isPrivate = ins.readBoolean();