2016-01-12 03:41:44 +00:00
|
|
|
#include <apps/openmw/mwworld/ptr.hpp>
|
2016-08-24 08:15:34 +00:00
|
|
|
#include <boost/program_options.hpp>
|
2016-01-12 03:41:44 +00:00
|
|
|
#include "Networking.hpp"
|
|
|
|
#include "LocalPlayer.hpp"
|
2016-07-23 14:02:06 +00:00
|
|
|
#include "GUIController.hpp"
|
2016-11-15 16:42:52 +00:00
|
|
|
#include "WorldController.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class Main
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Main();
|
|
|
|
~Main();
|
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
static void optionsDesc(boost::program_options::options_description *desc);
|
|
|
|
static void configure(const boost::program_options::variables_map &variables);
|
|
|
|
static void init(std::vector<std::string> &content);
|
|
|
|
static void postInit();
|
|
|
|
static void destroy();
|
2016-01-12 03:41:44 +00:00
|
|
|
static const Main &get();
|
2016-11-15 19:54:06 +00:00
|
|
|
static void frame(float dt);
|
|
|
|
static void pressedKey(int key);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-10-25 19:44:15 +00:00
|
|
|
static bool isValidPacketScript(std::string script);
|
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
Networking *getNetworking() const;
|
|
|
|
LocalPlayer *getLocalPlayer() const;
|
2016-08-24 01:48:35 +00:00
|
|
|
GUIController *getGUIController() const;
|
2016-11-15 16:42:52 +00:00
|
|
|
WorldController *getWorldController() const;
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void updateWorld(float dt) const;
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
private:
|
2016-08-24 08:15:34 +00:00
|
|
|
static std::string addr;
|
2016-01-12 03:41:44 +00:00
|
|
|
Main (const Main&);
|
|
|
|
///< not implemented
|
|
|
|
Main& operator= (const Main&);
|
|
|
|
///< not implemented
|
|
|
|
static Main *pMain;
|
|
|
|
Networking *mNetworking;
|
|
|
|
LocalPlayer *mLocalPlayer;
|
|
|
|
|
2016-07-23 14:02:06 +00:00
|
|
|
GUIController *mGUIController;
|
2016-11-15 16:42:52 +00:00
|
|
|
WorldController *mWorldController;
|
2016-01-12 03:41:44 +00:00
|
|
|
std::string server;
|
|
|
|
unsigned short port;
|
|
|
|
};
|
|
|
|
}
|