Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef AESOP_CLIENT_TERMINAL_H__
00036 #define AESOP_CLIENT_TERMINAL_H__
00037
00038
00039 #include "common/common.h"
00040
00041 #include "events.h"
00042
00043 #include "dialog/dialog.h"
00044 #include "geometry/geometry_3d.h"
00045 #include "gamepad/manager.h"
00046 #include "map-kdtree/map-kdtree.h"
00047 #include "viewport/viewport.h"
00048
00049
00050
00051 namespace aesop {
00052 class MapDynamics;
00053 }
00054
00055
00056
00057 namespace aesop {
00058
00060
00063
00064 class TerminalHost {
00065 public:
00066
00067
00071 virtual void requestMove(IN int playerId,
00072 IN const point3d_t& delta,
00073 IN const point3d_t& euler,
00074 OUT point3d_t& newPosition) = 0;
00075
00077 virtual void notifyInput(IN int playerId,
00078 IN const event_t& event) = 0;
00079
00080 protected:
00081
00082 virtual ~TerminalHost(void) throw();
00083 };
00084
00085
00087 class Terminal : public view::Host {
00088 public:
00089 virtual ~Terminal(void) throw();
00090
00091
00092 virtual void setKeys(IN smart_ptr<crypto::DESKey>& desKey,
00093 IN smart_ptr<gamepad::Manager>& mgr) = 0;
00094 virtual void input(IN gamepad::Gamepad * gp,
00095 IN float dt) = 0;
00096 virtual void mouseMove(IN int x, IN int y) = 0;
00097 virtual void mouseButton(IN int button, IN int state,
00098 IN int x, IN int y) = 0;
00099 virtual void keyboard(IN int key, IN int mods) = 0;
00100 virtual void showDialog(IN const char * id,
00101 IN const Datahash * dialog,
00102 IN dialog::Host * host) = 0;
00103 virtual void destroyDialog(IN const char * id) = 0;
00104 virtual void notifyMap(IN MapKdTree * mapKdTree) = 0;
00105 virtual void notifyInstance(IN smart_ptr<Instance>& instance) = 0;
00106
00107
00108 static smart_ptr<Terminal> create(IN TerminalHost * host,
00109 IN int playerId,
00110 IN smart_ptr<glut::RenderQueue>& rq);
00111 };
00112
00113
00114
00115 };
00116
00117 #endif // AESOP_CLIENT_TERMINAL_H__
00118