2017-04-16 06:58:40 +00:00
|
|
|
#ifndef OPENMW_MWMP_MAIN
|
|
|
|
#define OPENMW_MWMP_MAIN
|
|
|
|
|
2016-11-17 15:16:25 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
2016-08-24 08:15:34 +00:00
|
|
|
#include <boost/program_options.hpp>
|
2017-03-04 05:11:46 +00:00
|
|
|
#include <components/files/collections.hpp>
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2016-12-16 08:59:15 +00:00
|
|
|
class GUIController;
|
2017-04-17 11:37:19 +00:00
|
|
|
class CellController;
|
2019-11-09 03:12:00 +00:00
|
|
|
class LocalSystem;
|
2016-12-16 08:59:15 +00:00
|
|
|
class LocalPlayer;
|
|
|
|
class Networking;
|
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
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);
|
2017-03-04 05:11:46 +00:00
|
|
|
static bool init(std::vector<std::string> &content, Files::Collections &collections);
|
2016-11-15 19:54:06 +00:00
|
|
|
static void postInit();
|
2019-12-04 06:39:33 +00:00
|
|
|
static bool isInitialized();
|
2016-11-15 19:54:06 +00:00
|
|
|
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);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2019-09-14 06:37:19 +00:00
|
|
|
static bool isValidPacketScript(std::string scriptId);
|
|
|
|
static bool isValidPacketGlobal(std::string globalId);
|
|
|
|
|
2017-05-28 10:26:48 +00:00
|
|
|
static std::string getResDir();
|
2016-10-25 19:44:15 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
Networking *getNetworking() const;
|
2019-11-09 03:12:00 +00:00
|
|
|
LocalSystem *getLocalSystem() const;
|
2016-01-12 03:41:44 +00:00
|
|
|
LocalPlayer *getLocalPlayer() const;
|
2016-08-24 01:48:35 +00:00
|
|
|
GUIController *getGUIController() const;
|
2017-04-05 09:00:21 +00:00
|
|
|
CellController *getCellController() 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:
|
2017-05-28 10:26:48 +00:00
|
|
|
static std::string resourceDir;
|
2018-12-30 15:23:12 +00:00
|
|
|
static std::string address;
|
|
|
|
static std::string serverPassword;
|
2016-01-12 03:41:44 +00:00
|
|
|
Main (const Main&);
|
|
|
|
///< not implemented
|
|
|
|
Main& operator= (const Main&);
|
|
|
|
///< not implemented
|
|
|
|
static Main *pMain;
|
|
|
|
Networking *mNetworking;
|
2019-11-09 03:12:00 +00:00
|
|
|
LocalSystem *mLocalSystem;
|
2016-01-12 03:41:44 +00:00
|
|
|
LocalPlayer *mLocalPlayer;
|
|
|
|
|
2016-07-23 14:02:06 +00:00
|
|
|
GUIController *mGUIController;
|
2017-04-05 09:00:21 +00:00
|
|
|
CellController *mCellController;
|
2017-04-17 11:37:19 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
std::string server;
|
|
|
|
unsigned short port;
|
|
|
|
};
|
|
|
|
}
|
2017-04-16 06:58:40 +00:00
|
|
|
|
2017-04-18 06:32:40 +00:00
|
|
|
#endif //OPENMW_MWMP_MAIN
|