Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/network/NetworkFrameListener.h @ 708

Last change on this file since 708 was 708, checked in by rgrieder, 16 years ago
  • added Vector2, Vector3, Matrix3, ColourValue, Quaternion and String to the misc folder as header files (each of them contains #include <string> … typedef std::string String , etc.)
  • please use String from now on by including <misc/String.h"
  • removed #include <OgreVector3.h", etc. from "CoreIncludes.h" (adjusted all source files)
  • adjusted all the source files (except network, that keeps <string> for the moment) (what a mess..)
  • moved usleep hack to misc/Sleep.h
  • relative include paths for files from other root directories (like misc, network, etc.) (but it stills writes "../Orxonox.h" when in folder orxonox/objects)
  • "OgreSceneManager.h" —> <OgreSceneManager.h>
  • included OrxonoxPrereqs in every file in folder orxonox
  • moved HUD and ParticleInterface to namespace orxonox
  • removed some using namespace Ogre/std when appropriate
  • I hope I haven't forgotten important points..
File size: 958 bytes
Line 
1//
2// C++ Interface: NetworkFrameListener
3//
4// Description:
5//
6//
7// Author:  <>, (C) 2007
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12
13#ifndef _NetworkFrameListener_H__
14#define _NetworkFrameListener_H__
15
16#include <OgreFrameListener.h>
17
18#include "Server.h"
19#include "Client.h"
20//#include <iostream>
21// #include "orxonox/Orxonox.cc"
22network::Server *server_g;
23network::Client *client_g;
24
25namespace network{
26
27
28class ServerFrameListener : public Ogre::FrameListener{
29private:
30  bool frameStarted(const Ogre::FrameEvent &evt){
31    server_g->tick(evt.timeSinceLastFrame);
32    return FrameListener::frameStarted(evt);
33  }
34};
35
36class ClientFrameListener : public Ogre::FrameListener{
37private:
38  bool frameStarted(const Ogre::FrameEvent &evt){
39    //std::cout << "framelistener" << std::endl;
40    client_g->tick(evt.timeSinceLastFrame);
41    return FrameListener::frameStarted(evt);
42  }
43};
44
45
46
47
48}
49
50#endif /* _NetworkFrameListener_H__ */
Note: See TracBrowser for help on using the repository browser.