code
string
repo_name
string
path
string
language
string
license
string
size
int64
package kingdom.multiplay.packets.request { import flash.utils.ByteArray; import kingdom.multiplay.packets.Packet; import kingdom.multiplay.packets.PacketDef; public class RequestLoginServer extends Packet { public var _uid:String = ""; public var _gid:String = "" public function RequestLog...
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestLoginServer.as
ActionScript
oos
549
package kingdom.multiplay.packets.request { import kingdom.multiplay.packets.PacketDef; public class RequestQueueEvent extends RequestPostEvent { public function RequestQueueEvent() { super(); type = PacketDef.QUEUE_EVENT; } } }
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestQueueEvent.as
ActionScript
oos
262
package kingdom.multiplay.packets.request { import kingdom.multiplay.packets.Packet; import kingdom.multiplay.packets.PacketDef; public class RequestLoadWorld extends Packet { public function RequestLoadWorld() { super(PacketDef.LOAD_WORLD); } } }
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestLoadWorld.as
ActionScript
oos
275
package kingdom.multiplay.packets.request { import flash.utils.ByteArray; import kingdom.game.entity.EntityEvent; import kingdom.multiplay.packets.Packet; import kingdom.multiplay.packets.PacketDef; public class RequestPostEvent extends Packet { public var eventType:int; public var event:EntityE...
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestPostEvent.as
ActionScript
oos
611
package kingdom.multiplay.packets.request { import kingdom.multiplay.packets.Packet; import kingdom.multiplay.packets.PacketDef; public class RequestEnterWorld extends Packet { public function RequestEnterWorld() { super(PacketDef.ENTER_WORLD); } } }
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestEnterWorld.as
ActionScript
oos
278
package kingdom.multiplay.packets.request { import flash.utils.ByteArray; import kingdom.multiplay.packets.Packet; import kingdom.multiplay.packets.PacketDef; public class RequestChat extends Packet { public var _message:String; public function RequestChat() { super(PacketDef.CHAT); ...
zy-game
trunk/client/src/kingdom/multiplay/packets/request/RequestChat.as
ActionScript
oos
461
package kingdom.multiplay { import Engine.Connection.ConnectionBase; import flash.events.ErrorEvent; import flash.utils.ByteArray; public class Session { private var m_server:GameServer = null; private var m_connection:ConnectionBase; public function Session(server:GameServer) { m_se...
zy-game
trunk/client/src/kingdom/multiplay/Session.as
ActionScript
oos
2,626
package Engine.Anim { import flash.events.Event; public class AnimLoaderEvent extends Event { private var m_success:Boolean; private var m_contentClass:Class; private var m_contentUrl:String; public function get success():Boolean { return m_success; } public function get conte...
zy-game
trunk/client/src/Engine/Anim/AnimLoaderEvent.as
ActionScript
oos
944
package Engine.Anim { import flash.display.Loader; import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IOErrorEvent; import flash.net.URLRequest; import flash.system.LoaderContext; public class AnimLoaderHelper extends EventDispatcher { private var m_loader:Loader;...
zy-game
trunk/client/src/Engine/Anim/AnimLoaderHelper.as
ActionScript
oos
2,260
package Engine.Anim { import flash.display.Loader; import flash.events.Event; import flash.events.IOErrorEvent; import flash.net.URLLoader; import flash.net.URLRequest; public class AnimLoader { private var m_workMap:Object; private var m_dataMap:Object; public function get workMap():Objec...
zy-game
trunk/client/src/Engine/Anim/AnimLoader.as
ActionScript
oos
1,701
package Engine.Anim { import kingdom.game.entity.npc.TroopAnimSet; import flash.display.MovieClip; import flash.display.Sprite; import flash.events.IOErrorEvent; public class AnimSet extends Sprite { protected var m_moviceClip:MovieClip; public function AnimSet() { } pub...
zy-game
trunk/client/src/Engine/Anim/AnimSet.as
ActionScript
oos
1,171
package Engine { import flash.display.Sprite; public class Display extends Sprite { public function Display() { } } }
zy-game
trunk/client/src/Engine/Display.as
ActionScript
oos
144
package Engine.Connection { import flash.events.Event; import flash.events.EventDispatcher; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.net.Socket; import flash.utils.ByteArray; public class SocketConnection extends ConnectionBase { private var m_socket:Socket...
zy-game
trunk/client/src/Engine/Connection/SocketConnection.as
ActionScript
oos
1,568
package Engine.Connection { import flash.events.EventDispatcher; import flash.utils.ByteArray; public class ConnectionBase extends EventDispatcher { public static const EVENT_CONNECT:String = "Connect"; public static const EVENT_IO_ERROR:String = "IoError"; public static const EVENT_RECV:String = "R...
zy-game
trunk/client/src/Engine/Connection/ConnectionBase.as
ActionScript
oos
622
package Engine.StateMachine { import flash.display.Sprite; import flash.utils.ByteArray; public class StateMachine extends Sprite { protected var m_currentState:StateBase = null; protected var m_nextState:StateBase = null; protected var m_stateParam:ByteArray = null; public function get cu...
zy-game
trunk/client/src/Engine/StateMachine/StateMachine.as
ActionScript
oos
1,476
package Engine.StateMachine { import flash.utils.ByteArray; public class StateBase { protected var m_id:int; private var m_transitions:Vector.<StateTransition> = new Vector.<StateTransition>(); private var m_stateMachine:StateMachine = null; public function get id():int { return m_id; ...
zy-game
trunk/client/src/Engine/StateMachine/StateBase.as
ActionScript
oos
1,003
package Engine.StateMachine { public interface StateTransition { function get targetState():StateBase; function eventTest(event:StateEvent):Boolean; } }
zy-game
trunk/client/src/Engine/StateMachine/StateTransition.as
ActionScript
oos
172
package Engine.StateMachine { import flash.utils.ByteArray; public interface StateEvent { //function get payload():ByteArray; } }
zy-game
trunk/client/src/Engine/StateMachine/StateEvent.as
ActionScript
oos
144
package Engine.avatar { import Engine.Anim.AnimLoader; import Engine.Anim.AnimLoaderEvent; import Engine.Anim.AnimSet; import flash.display.DisplayObject; import flash.display.DisplayObjectContainer; import flash.display.MovieClip; import flash.display.Sprite; import flash.events.Event; import fla...
zy-game
trunk/client/src/Engine/avatar/Avatar.as
ActionScript
oos
7,653
package Engine.bt { public class BTSelectorNode extends BTNode { public function BTSelectorNode(name:String) { super(name); } } }
zy-game
trunk/client/src/Engine/bt/BTSelectorNode.as
ActionScript
oos
150
package Engine.bt { public class BTActionNode extends BTNode { public function BTActionNode(name:String) { super(name); } } }
zy-game
trunk/client/src/Engine/bt/BTActionNode.as
ActionScript
oos
146
package Engine.bt { public class BTSequenceNode extends BTNode { public function BTSequenceNode(name:String) { super(name); } } }
zy-game
trunk/client/src/Engine/bt/BTSequenceNode.as
ActionScript
oos
150
package Engine.bt { public class BTNode { private var m_parent:BTNode = null; private var m_previousSibling:BTNode = null; private var m_nextSibling:BTNode = null; private var m_children:Vector.<BTNode> = null; private var m_name:String = ""; private var m_value:String = ""; pub...
zy-game
trunk/client/src/Engine/bt/BTNode.as
ActionScript
oos
1,348
package Engine.bt { public class BTConditionNode extends BTNode { public function BTConditionNode(name:String) { super(name); } } }
zy-game
trunk/client/src/Engine/bt/BTConditionNode.as
ActionScript
oos
152
package Engine { /* Base64 - 1.1.0 Copyright (c) 2006 Steve Webster Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights t...
zy-game
trunk/client/src/Engine/Base64.as
AngelScript
oos
4,849
package Engine.entities { public class ISeeder { public function ISeeder() { } } }
zy-game
trunk/client/src/Engine/entities/ISeeder.as
ActionScript
oos
99
package Engine.entities { public interface IAnimator { function loadAnim(url:String):void; function playAnim(name:String):void; function stopAnim():void; function get curAnim():String; } }
zy-game
trunk/client/src/Engine/entities/IAnimator.as
ActionScript
oos
212
package Engine.entities { public class IPlower { public function IPlower() { } } }
zy-game
trunk/client/src/Engine/entities/IPlower.as
ActionScript
oos
99
package Engine.entities { public class IDefender { public function IDefender() { } } }
zy-game
trunk/client/src/Engine/entities/IDefender.as
ActionScript
oos
103
package Engine.entities { public class IAttacker { public function IAttacker() { } } }
zy-game
trunk/client/src/Engine/entities/IAttacker.as
ActionScript
oos
103
package Engine.entities { import flash.geom.Point; public interface IMover { function get moveTarget():Point; function get moveFinished():Boolean; function startMove(target:Point):void; function stopMove(target:Point = null):void; function updateMove():void; } }
zy-game
trunk/client/src/Engine/entities/IMover.as
ActionScript
oos
295
package Engine.entities { import flash.display.DisplayObject; import flash.display.Sprite; import kingdom.game.entity.Entity; public class EntityLayer extends Sprite { private var m_sort:Boolean = true; public function EntityLayer() { super(); } public override function addChild...
zy-game
trunk/client/src/Engine/entities/EntityLayer.as
ActionScript
oos
1,610
package { import kingdom.app.state.ASInit; import flash.display.Sprite; import flash.events.Event; import flash.events.ProgressEvent; import kingdom.app.App; [SWF(width="760", height="620", bgcolor="#000000")] public class Kingdom extends Sprite { private var m_app:App = null; public f...
zy-game
trunk/client/src/Kingdom.as
ActionScript
oos
1,097
/* * Game.cpp * * Created on: 2011-2-17 * Author: ZhongYan */ #include "stdafx.h" #include "Game.h" #include "World.h" #include "CoreServer.h" #include "GameService.h" #include "ByteArray.h" #include "packet/PacketDef.h" #include "packet/response/ResponsePostEvent.h" #include "entities/Entity...
zy-game
trunk/server/src/game/Game.cpp
C++
oos
1,966
/* * World.cpp * * Created on: 2011-3-17 * Author: Yan.Zhong */ #include "stdafx.h" #include "World.h" #include "Game.h" #include "GameService.h" #include "packet/PacketDef.h" #include "packet/response/ResponseAddCropland.h" #include "packet/response/ResponseAddPlayer.h" #include "pack...
zy-game
trunk/server/src/game/World.cpp
C++
oos
2,281
/* * Game.h * * Created on: 2011-2-17 * Author: ZhongYan */ #ifndef GAME_H_ #define GAME_H_ #include "entities/player/Player.h" namespace social{ namespace core{ class ByteArray; } } namespace social{ namespace server{ class GameService; } } namespace social{ namespace game{ ...
zy-game
trunk/server/src/game/Game.h
C++
oos
841
/* * Map.h * * Created on: 2011-3-17 * Author: Yan.Zhong */ #ifndef MAP_H_ #define MAP_H_ #include "Vector2.h" namespace social { namespace game { class Map { public: Map(); virtual ~Map(); inline int32 GetTileSizeX(){ return m_tileSizeX;}; inline int32 GetTileSizeY(){ return ...
zy-game
trunk/server/src/game/Map.h
C++
oos
1,294
/* * Map.cpp * * Created on: 2011-3-17 * Author: Yan.Zhong */ #include "stdafx.h" #include "Map.h" namespace social { namespace game { Map::Map() : m_tileSizeX(50) , m_tileSizeY(50) , m_tileWidth(46) , m_tileHeight(23) , m_pTiles(NULL) { } Map::~Map() { } void Map::InitTil...
zy-game
trunk/server/src/game/Map.cpp
C++
oos
536
/* * GameDef.h * * Created on: 2011-3-7 * Author: ZhongYan */ #ifndef GAMEDEF_H_ #define GAMEDEF_H_ #define GAME_UPDATE_PERIOD (40) #define PLAYER_MOVE_SPEED (2) #define PLAYER_PLOW_FRAME 25 enum PlayerState { PS_NONE = -1, PS_STOP = 0, PS_MOVE, PS_PLOW, PS_SEED, P...
zy-game
trunk/server/src/game/GameDef.h
C
oos
365
/* * World.h * * Created on: 2011-3-17 * Author: Yan.Zhong */ #ifndef WORLD_H_ #define WORLD_H_ #include "entities/farm/Crop.h" #include "entities/farm/Cropland.h" #include "Map.h" class ResponseLoadWorld; namespace social { namespace game { class Entity; class Player; class Cropl...
zy-game
trunk/server/src/game/World.h
C++
oos
1,121
/* * EntityEvent.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "EntityEvent.h" namespace social{ namespace game{ } }
zy-game
trunk/server/src/game/entities/EntityEvent.cpp
C++
oos
182
/* * Npc.cpp * * Created on: 2011-3-11 * Author: ZhongYan */ #include "stdafx.h" #include "Npc.h" namespace social { namespace game { Npc::Npc() { } Npc::~Npc() { } } }
zy-game
trunk/server/src/game/entities/npc/Npc.cpp
C++
oos
216
/* * Npc.h * * Created on: 2011-3-11 * Author: ZhongYan */ #ifndef NPC_H_ #define NPC_H_ namespace social { namespace game { class Npc { public: Npc(); virtual ~Npc(); }; } } #endif /* NPC_H_ */
zy-game
trunk/server/src/game/entities/npc/Npc.h
C++
oos
243
/* * MoveAI.h * * Created on: 2011-3-8 * Author: Yan.Zhong */ #ifndef MOVEAI_H_ #define MOVEAI_H_ #include "AIBase.h" #include "Vector2.h" namespace social{ namespace game{ class AIMove : public AIBase { public: AIMove(Entity* pEntity) : AIBase(pEntity) { } virtual ~AIMov...
zy-game
trunk/server/src/game/entities/ai/AIMove.h
C++
oos
645
/* * AIPath.h * * Created on: 2011-3-17 * Author: Yan.Zhong */ #ifndef AIPATH_H_ #define AIPATH_H_ #include "AIBase.h" #include "Vector2.h" namespace social { namespace game { typedef struct { int16 tile_x; int16 tile_y; int16 parent; int16 cost; bool visited; bool checked; ...
zy-game
trunk/server/src/game/entities/ai/AIPath.h
C++
oos
1,327
/* * PlowAI.cpp * * Created on: 2011-3-10 * Author: ZhongYan */ #include "stdafx.h" #include "AIPlow.h" #include "../../World.h" #include "../player/Player.h" #include "../EntityEvent.h" #include "../farm/Cropland.h" namespace social{ namespace game{ AIPlow::AIPlow(Player* pPlayer) ...
zy-game
trunk/server/src/game/entities/ai/AIPlow.cpp
C++
oos
983
/* * BaseAI.h * * Created on: 2011-2-18 * Author: Yan.Zhong */ #ifndef BASEAI_H_ #define BASEAI_H_ namespace social{ namespace game{ class Entity; class AIBase { public: AIBase(Entity* pEntity) : m_pEntity(pEntity) , m_bActive(false) { } virtual ~AIBase() { } ...
zy-game
trunk/server/src/game/entities/ai/AIBase.h
C++
oos
441
/* * PlowAI.h * * Created on: 2011-3-10 * Author: ZhongYan */ #ifndef PLOWAI_H_ #define PLOWAI_H_ #include "AIBase.h" #include "Vector2.h" namespace social{ namespace game{ class Cropland; class Player; class AIPlow: public AIBase { public: AIPlow(Player* pPlayer); virtual ~AIPlow...
zy-game
trunk/server/src/game/entities/ai/AIPlow.h
C++
oos
522
/* * AIMove.cpp * * Created on: 2011-3-8 * Author: Yan.Zhong */ #include "stdafx.h" #include "AIMove.h" #include "GameDef.h" #include "../Entity.h" #include "../EntityEvent.h" #include "CoreServer.h" namespace social{ namespace game{ void AIMove::Start(float x, float y) { m_vecPos ...
zy-game
trunk/server/src/game/entities/ai/AIMove.cpp
C++
oos
1,528
/* * AIPath.cpp * * Created on: 2011-3-17 * Author: Yan.Zhong */ #include "stdafx.h" #include "AIPath.h" namespace social { namespace game { } }
zy-game
trunk/server/src/game/entities/ai/AIPath.cpp
C++
oos
174
/* * BaseAI.cpp * * Created on: 2011-2-18 * Author: Yan.Zhong */ #include "stdafx.h" #include "AIBase.h" namespace social{ namespace game{ } }
zy-game
trunk/server/src/game/entities/ai/AIBase.cpp
C++
oos
168
/* * Entity.cpp * * Created on: 2011-3-9 * Author: ZhongYan */ #include "stdafx.h" #include "Entity.h" #include "../World.h" namespace social{ namespace game{ Entity::Entity(World& world) : m_world(world) , m_id(0) { m_id = m_world.GetNextEntityIndex(); } Entity::~Entity() { } ...
zy-game
trunk/server/src/game/entities/Entity.cpp
C++
oos
324
/* * EntityEventDef.h * * Created on: 2011-3-28 * Author: ZhongYan */ #ifndef ENTITYEVENTDEF_H_ #define ENTITYEVENTDEF_H_ const int EVENT_START_MOVE = 0x101; const int EVENT_FINISH_MOVE = 0x102; const int EVENT_START_PLOW = 0x103; const int EVENT_FINISH_PLOW = 0x104; const int EVENT_FREE_...
zy-game
trunk/server/src/game/entities/EntityEventDef.h
C
oos
409
/* * EntityEvent.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef ENTITYEVENT_H_ #define ENTITYEVENT_H_ #include "StateEvent.h" #include "Vector2.h" #include "ByteArray.h" #include "EntityEventDef.h" namespace social{ namespace game{ class EntityEvent: public social::core::Sta...
zy-game
trunk/server/src/game/entities/EntityEvent.h
C++
oos
2,548
/* * Entity.h * * Created on: 2011-3-9 * Author: ZhongYan */ #ifndef ENTITY_H_ #define ENTITY_H_ #include "Vector2.h" #include "ByteArray.h" #include "../core/statemachine/StateMachine.h" namespace social{ namespace game{ class World; class Entity : public social::core::StateMachine { ...
zy-game
trunk/server/src/game/entities/Entity.h
C++
oos
946
/* * EntityTransition.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef ENTITYTRANSITION_H_ #define ENTITYTRANSITION_H_ #include "StateTransition.h" #include "EntityEvent.h" namespace social{ namespace game{ class EntityTransition: public social::core::StateTransition { public...
zy-game
trunk/server/src/game/entities/EntityTransition.h
C++
oos
888
/* * Player.h * * Created on: 2011-2-18 * Author: Yan.Zhong */ #ifndef PLAYER_H_ #define PLAYER_H_ #include "GameDef.h" #include "StateBase.h" #include "entities/Entity.h" #include "entities/EntityEvent.h" #include "../ai/AIMove.h" #include "../ai/AIPlow.h" #include "packet/data/Pla...
zy-game
trunk/server/src/game/entities/player/Player.h
C++
oos
1,410
/* * Player.cpp * * Created on: 2011-2-18 * Author: Yan.Zhong */ #include "stdafx.h" #include "Player.h" #include "World.h" #include "CoreServer.h" #include "ByteArray.h" #include "PlayerStateDef.h" #include "packet/PacketDef.h" #include "state/PSIdle.h" #include "state/PSMove.h" #include ...
zy-game
trunk/server/src/game/entities/player/Player.cpp
C++
oos
2,458
/* * PlayerStateDef.h * * Created on: 2011-3-29 * Author: yan.zhong */ #ifndef PLAYERSTATEDEF_H_ #define PLAYERSTATEDEF_H_ const int PLAYER_STATE_IDLE = 0; const int PLAYER_STATE_PLOW = 1; const int PLAYER_STATE_FREE_MOVE = 2; const int PLAYER_STATE_PLOW_MOVE = 3; const char PLAYE...
zy-game
trunk/server/src/game/entities/player/PlayerStateDef.h
C
oos
451
/* * PSBase.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "PSBase.h" #include "Logger.h" #include "../Player.h" #include "../PlayerStateDef.h" namespace social{ namespace game{ PSBase::PSBase(Player* player, int32 id) : StateBase(player) , m_pPlaye...
zy-game
trunk/server/src/game/entities/player/state/PSBase.cpp
C++
oos
668
/* * PSBase.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef PSBASE_H_ #define PSBASE_H_ #include "StateBase.h" #include "ByteArray.h" #include "entities/EntityEvent.h" using namespace social::core; namespace social{ namespace game{ class Player; class PSBase: public Stat...
zy-game
trunk/server/src/game/entities/player/state/PSBase.h
C++
oos
682
/* * PSIdle.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "PSIdle.h" #include "../Player.h" namespace social{ namespace game{ PSIdle::PSIdle(Player* pPlayer, int32 id) : PSBase(pPlayer, id) { } PSIdle::~PSIdle() { } void PSIdle::Enter(En...
zy-game
trunk/server/src/game/entities/player/state/PSIdle.cpp
C++
oos
423
/* * PSMove.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef PSMOVE_H_ #define PSMOVE_H_ #include "PSBase.h" namespace social{ namespace game{ class AIMove; class PSMove: public PSBase { public: PSMove(Player* pPlayer, int32 id); virtual ~PSMove(); virtual void Enter(...
zy-game
trunk/server/src/game/entities/player/state/PSMove.h
C++
oos
555
/* * PSIdle.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef PSIDLE_H_ #define PSIDLE_H_ #include "PSBase.h" namespace social{ namespace game{ class PSIdle: public PSBase { public: PSIdle(Player* pPlayer, int32 id); virtual ~PSIdle(); virtual void Enter(EntityEventPtr e...
zy-game
trunk/server/src/game/entities/player/state/PSIdle.h
C++
oos
418
/* * PSPlow.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef PSPLOW_H_ #define PSPLOW_H_ #include "PSBase.h" namespace social{ namespace game{ class AIPlow; class PSPlow: public PSBase { public: PSPlow(Player* pPlayer, int32 id); virtual ~PSPlow(); virtual void Enter(...
zy-game
trunk/server/src/game/entities/player/state/PSPlow.h
C++
oos
468
/* * PSPlow.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "PSPlow.h" #include "../Player.h" #include "../../ai/AIPlow.h" namespace social{ namespace game{ PSPlow::PSPlow(Player* pPlayer, int32 id) : PSBase(pPlayer, id) { m_pAIPlow = NEW AIPlow(pPla...
zy-game
trunk/server/src/game/entities/player/state/PSPlow.cpp
C++
oos
572
/* * PSMove.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "PSMove.h" #include "Vector2.h" #include "Logger.h" #include "../Player.h" #include "../PlayerStateDef.h" #include "../../EntityEvent.h" #include "../../EntityEventDef.h" #include "../../ai/A...
zy-game
trunk/server/src/game/entities/player/state/PSMove.cpp
C++
oos
1,504
/* * Cropland.h * * Created on: 2011-3-9 * Author: ZhongYan */ #ifndef CROPLAND_H_ #define CROPLAND_H_ #include "../Entity.h" #include "packet/data/CroplandInfo.h" namespace social{ namespace game{ class Cropland: public Entity { public: Cropland(World& world, int32 ownerId); vi...
zy-game
trunk/server/src/game/entities/farm/Cropland.h
C++
oos
714
/* * Crop.cpp * * Created on: 2011-3-9 * Author: ZhongYan */ #include "stdafx.h" #include "Crop.h" namespace social{ namespace game{ namespace entity{ Crop::Crop(World& world) :Entity(world) { } Crop::~Crop() { } } } }
zy-game
trunk/server/src/game/entities/farm/Crop.cpp
C++
oos
263
/* * Crop.h * * Created on: 2011-3-9 * Author: ZhongYan */ #ifndef CROP_H_ #define CROP_H_ #include "../Entity.h" namespace social{ namespace game{ namespace entity{ class Crop: public social::game::Entity { public: Crop(World& world); virtual ~Crop(); virtual void Update() {...
zy-game
trunk/server/src/game/entities/farm/Crop.h
C++
oos
469
/* * Cropland.cpp * * Created on: 2011-3-9 * Author: ZhongYan */ #include "stdafx.h" #include "Cropland.h" namespace social{ namespace game{ Cropland::Cropland(World& world, int32 ownerId) : Entity(world) , m_ownerId(ownerId) , m_cropId(-1) , m_plowed(false) { } Cropland::~Cropland(...
zy-game
trunk/server/src/game/entities/farm/Cropland.cpp
C++
oos
338
/* * EntityTransition.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "EntityTransition.h" namespace social{ namespace game{ EntityTransition::EntityTransition(social::core::StateBase* targetState, uint32 eventType) : m_pTargetState(targetState) , m_eventTyp...
zy-game
trunk/server/src/game/entities/EntityTransition.cpp
C++
oos
398
/* * Connection.h * * Created on: 2011-2-17 * Author: Yan.Zhong */ #ifndef CONNECTION_H_ #define CONNECTION_H_ #include "ByteArray.h" #include "Logger.h" using namespace boost::asio::ip; namespace social{ namespace core{ class ByteArray; class Connection : public boost::enable_shared_...
zy-game
trunk/server/src/core/Connection.h
C++
oos
2,724
/* * Connection.h * * Created on: 2011-3-4 * Author: Yan.Zhong */ #include "stdafx.h" #include "ByteArray.h" namespace social{ namespace core{ static void WriteShortLE(char* d, uint16 value) { d[0] = value & 0xFF; d[1] = (value >> 8) & 0xFF; } static void WriteShortBE(char* d, uint...
zy-game
trunk/server/src/core/ByteArray.cpp
C++
oos
9,380
/* * Service.h * * Created on: 2011-3-2 * Author: ZhongYan */ #ifndef SERVICE_H_ #define SERVICE_H_ #include "ByteArray.h" namespace social { namespace core { class Connection; class Service : public boost::asio::io_service::service, public boost::enable_shared_from_this<Service> { typ...
zy-game
trunk/server/src/core/Service.h
C++
oos
980
/* * Server.cpp * * Created on: 2011-2-17 * Author: ZhongYan */ #include "stdafx.h" #include "Server.h"
zy-game
trunk/server/src/core/Server.cpp
C++
oos
121
/* * Connection.h * * Created on: 2011-3-4 * Author: Yan.Zhong */ #ifndef __BYTEARRAY_H__ #define __BYTEARRAY_H__ #define ENABLE_COMPRESS 0 namespace social{ namespace core{ class ByteArray { public: ByteArray(const char* data = NULL, int size = 0); ~ByteArray(void); enum Endian ...
zy-game
trunk/server/src/core/ByteArray.h
C++
oos
1,864
/* * Service.cpp * * Created on: 2011-3-2 * Author: ZhongYan */ #include "stdafx.h" #include "Service.h" #include "Connection.h" namespace social { namespace core { } }
zy-game
trunk/server/src/core/Service.cpp
C++
oos
201
/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permissio...
zy-game
trunk/server/src/core/xml/tinyxml.cpp
C++
oos
36,435
/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permiss...
zy-game
trunk/server/src/core/xml/tinyxmlparser.cpp
C++
oos
37,193
/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permiss...
zy-game
trunk/server/src/core/xml/tinyxmlerror.cpp
C++
oos
1,780
/* www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permissio...
zy-game
trunk/server/src/core/xml/tinyxml.h
C++
oos
64,339
/* www.sourceforge.net/projects/tinyxml Original file by Yves Berquin. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, in...
zy-game
trunk/server/src/core/xml/tinystr.h
C++
oos
8,783
/* * Logger.cpp * * Created on: 2011-3-12 * Author: ZhongYan */ #include "stdafx.h" #include "Logger.h" #ifdef WIN32 #include <Strsafe.h> #else #include <stdio.h> #include <stdarg.h> #endif namespace social{ namespace core{ Logger::Logger() { } Logger::~Logger() { } ...
zy-game
trunk/server/src/core/Logger.cpp
C++
oos
1,313
/* * StateMachine.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef STATEMACHINE_H_ #define STATEMACHINE_H_ #include "StateEvent.h" namespace social{ namespace core{ class StateBase; class ByteArray; class StateMachine { public: StateMachine(); virtual ~StateMachine(); ...
zy-game
trunk/server/src/core/statemachine/StateMachine.h
C++
oos
830
/* * StateMachine.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "StateMachine.h" #include "StateBase.h" #include "StateEvent.h" #include "ByteArray.h" namespace social{ namespace core{ StateMachine::StateMachine() : m_pCurrentState(NULL) , m_pPreviousSt...
zy-game
trunk/server/src/core/statemachine/StateMachine.cpp
C++
oos
1,392
/* * StateEvent.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef STATEEVENT_H_ #define STATEEVENT_H_ namespace social{ namespace core{ class ByteArray; class StateEvent { public: StateEvent(uint32 type); virtual ~StateEvent(); inline uint32 GetType(){ return m_type;};...
zy-game
trunk/server/src/core/statemachine/StateEvent.h
C++
oos
465
/* * StateBase.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "StateBase.h" namespace social{ namespace core{ } }
zy-game
trunk/server/src/core/statemachine/StateBase.cpp
C++
oos
176
/* * StateEvent.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "StateEvent.h" namespace social{ namespace core{ StateEvent::StateEvent(uint32 type) : m_type(type) { } StateEvent::~StateEvent() { } } }
zy-game
trunk/server/src/core/statemachine/StateEvent.cpp
C++
oos
277
/* * StateTransition.cpp * * Created on: 2011-3-28 * Author: Yan.Zhong */ #include "stdafx.h" #include "StateTransition.h" namespace social{ namespace core{ StateTransition::StateTransition() { } StateTransition::~StateTransition() { } } }
zy-game
trunk/server/src/core/statemachine/StateTransition.cpp
C++
oos
280
/* * StateBase.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef STATEBASE_H_ #define STATEBASE_H_ #include "StateEvent.h" #include "StateMachine.h" #include "StateTransition.h" namespace social{ namespace core{ class ByteArray; class StateBase { public: StateBase(StateMach...
zy-game
trunk/server/src/core/statemachine/StateBase.h
C++
oos
1,289
/* * StateTransition.h * * Created on: 2011-3-28 * Author: Yan.Zhong */ #ifndef STATETRANSITION_H_ #define STATETRANSITION_H_ #include "StateEvent.h" namespace social{ namespace core{ class StateBase; class StateParam; class StateTransition { public: StateTransition(); virtual ~St...
zy-game
trunk/server/src/core/statemachine/StateTransition.h
C++
oos
483
/* * Logger.h * * Created on: 2011-3-12 * Author: ZhongYan */ #ifndef LOGGER_H_ #define LOGGER_H_ namespace social{ namespace core{ class Logger { public: Logger(); virtual ~Logger(); static void Debug(const char* fmt, ...); static void Notice(const char* fmt, ...); }; } } ...
zy-game
trunk/server/src/core/Logger.h
C++
oos
347
/* * Vector2.cpp * * Created on: 2011-3-8 * Author: Yan.Zhong */ #include "stdafx.h" #include "Vector2.h"
zy-game
trunk/server/src/core/Vector2.cpp
C++
oos
127
/* * CommonConfig.h * * Created on: 2011-2-17 * Author: Yan.Zhong */ #ifndef COMMONDEF_H_ #define COMMONDEF_H_ typedef signed char int8; typedef unsigned char uint8; typedef signed short int16; typedef unsigned short uint16; typedef signed int int32; typedef unsigned int uint32; typ...
zy-game
trunk/server/src/core/CommonDef.h
C++
oos
1,340
/* * Vector2.h * * Created on: 2011-3-8 * Author: Yan.Zhong */ #ifndef VECTOR2_H_ #define VECTOR2_H_ namespace social{ namespace core{ template<class T> class TVector2 { public: TVector2() : x(0), y(0) {} TVector2(T nx, T ny) : x(nx), y(ny) {} TVector2(const TVector2<T>& other) : x(o...
zy-game
trunk/server/src/core/Vector2.h
C++
oos
2,790
/* * Connection.cpp * * Created on: 2011-2-17 * Author: Yan.Zhong */ #include "stdafx.h" #include "Connection.h" namespace social{ namespace core{ } }
zy-game
trunk/server/src/core/Connection.cpp
C++
oos
176
/* * Server.h * * Created on: 2011-2-17 * Author: ZhongYan */ #ifndef SERVER_H_ #define SERVER_H_ #include "Logger.h" namespace social{ namespace core{ template<class TConnection> class TServer { public: TServer() : m_io_service() , m_acceptor(m_io_service) { } virtual ...
zy-game
trunk/server/src/core/Server.h
C++
oos
2,569
/* * ClanClient.cpp * * Created on: 2011-3-2 * Author: ZhongYan */ #include "stdafx.h" #include "GameClient.h" #include "CoreServer.h" #include "GameService.h" #include "LoginService.h" #include "Logger.h" #include "Game.h" #include "World.h" #include "entities/EntityEvent.h" #include "p...
zy-game
trunk/server/src/server/GameClient.cpp
C++
oos
6,260
/* * LoginService.h * * Created on: 2011-3-2 * Author: ZhongYan */ #ifndef LOGINSERVICE_H_ #define LOGINSERVICE_H_ #include "Service.h" #include "ByteArray.h" class RequestLoginServer; namespace social { namespace server { class CoreServer; class GameClient; class LoginService : publ...
zy-game
trunk/server/src/server/LoginService.h
C++
oos
829