| Last change
                  on this file since 6415 was
                  5996,
                  checked in by patrick, 20 years ago | 
        
          | 
orxonox/trunk: merged network branche into trunk with command svn merge -r 5824:HEAD 
 | 
        | File size:
            1.8 KB | 
      
      
        
  | Line |  | 
|---|
| 1 | /*! | 
|---|
| 2 | * @file orxonox.h | 
|---|
| 3 | * Orxonox core functions | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | #ifndef _ORXONOX_H | 
|---|
| 7 | #define _ORXONOX_H | 
|---|
| 8 |  | 
|---|
| 9 | #include "base_object.h" | 
|---|
| 10 |  | 
|---|
| 11 | class WorldEntity; | 
|---|
| 12 | class GameLoader; | 
|---|
| 13 | class IniParser; | 
|---|
| 14 |  | 
|---|
| 15 | //! orxonox core singleton class | 
|---|
| 16 | /** | 
|---|
| 17 | */ | 
|---|
| 18 | class Orxonox : public BaseObject { | 
|---|
| 19 |  | 
|---|
| 20 | public: | 
|---|
| 21 | virtual ~Orxonox (); | 
|---|
| 22 | /** @returns a Pointer to the only object of this Class */ | 
|---|
| 23 | inline static Orxonox* getInstance() { if (!singletonRef) singletonRef = new Orxonox();  return singletonRef; }; | 
|---|
| 24 |  | 
|---|
| 25 | int init(int argc, char** argv, const char* name, int port); | 
|---|
| 26 |  | 
|---|
| 27 | void restart(); | 
|---|
| 28 |  | 
|---|
| 29 | void start(); | 
|---|
| 30 |  | 
|---|
| 31 | private: | 
|---|
| 32 | Orxonox (); | 
|---|
| 33 |  | 
|---|
| 34 | void parseIniFile(const char* fileName); | 
|---|
| 35 |  | 
|---|
| 36 | int initResources (); | 
|---|
| 37 | int initVideo (); | 
|---|
| 38 | int initSound (); | 
|---|
| 39 | int initInput (); | 
|---|
| 40 | int initNetworking (); | 
|---|
| 41 | int initMisc (); | 
|---|
| 42 |  | 
|---|
| 43 | const char* getConfigFile (); | 
|---|
| 44 |  | 
|---|
| 45 | private: | 
|---|
| 46 | static Orxonox*   singletonRef;            //!< singleton reference to orxonox | 
|---|
| 47 |  | 
|---|
| 48 | IniParser*        iniParser;               //!< Reference to the ini-parser used in orxonox | 
|---|
| 49 | char*             configFileName;          //!< Filename of the configuration-file. | 
|---|
| 50 | GameLoader*       gameLoader;              //!< The gameLoader | 
|---|
| 51 |  | 
|---|
| 52 | unsigned int      argc;                    //!< Count of Arguments of orxonox | 
|---|
| 53 | char**            argv;                    //!< Values of th Arguments of orxonox. | 
|---|
| 54 |  | 
|---|
| 55 | const char*       serverName;              //!< Name of the Orxonox client if == NULL -> server | 
|---|
| 56 | int               port;                    //!< number of the network port of the server/client if == -1 no network | 
|---|
| 57 | }; | 
|---|
| 58 |  | 
|---|
| 59 |  | 
|---|
| 60 | //////////////////////// | 
|---|
| 61 | // Start-up functions // | 
|---|
| 62 | //////////////////////// | 
|---|
| 63 | int showHelp(int argc, char** argv); | 
|---|
| 64 | int showLicense(); | 
|---|
| 65 | int startNetworkOrxonox(int argc, char** argv); | 
|---|
| 66 | int startOrxonox(int argc, char** argv, const char* clientName, int port); | 
|---|
| 67 |  | 
|---|
| 68 | #endif /* _ORXONOX_H */ | 
|---|
| 69 |  | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.