/*! * @file orxonox.h * Orxonox core functions */ #ifndef _ORXONOX_H #define _ORXONOX_H #include "base_object.h" class WorldEntity; class GameLoader; //! orxonox core singleton class /** */ class Orxonox : public BaseObject { ObjectListDeclaration(Orxonox); public: virtual ~Orxonox (); /** @returns a Pointer to the only object of this Class */ inline static Orxonox* getInstance() { if (!singletonRef) singletonRef = new Orxonox(); return singletonRef; }; int init(int argc, char** argv, const std::string & name, int port); void restart(); void start(); private: Orxonox (); int initResources (); int initVideo (); int initSound (); int initInput (); int initNetworking (); int initMisc (); const std::string& getConfigFile (); private: static Orxonox* singletonRef; //!< singleton reference to orxonox std::string configFileName; //!< Filename of the configuration-file. GameLoader* gameLoader; //!< The gameLoader unsigned int argc; //!< Count of Arguments of orxonox char** argv; //!< Values of th Arguments of orxonox. std::string serverName; //!< Name of the Orxonox client if == "" -> server int port; //!< number of the network port of the server/client if == -1 no network }; //////////////////////// // Start-up functions // //////////////////////// int startNetworkOrxonox(int argc, char** argv); int startOrxonox(int argc, char** argv, const std::string & clientName, int port); #endif /* _ORXONOX_H */