source:
orxonox.OLD/trunk/src/orxonox.h
@
7229
Last change on this file since 7229 was 7221, checked in by bensch, 19 years ago | |
---|---|
File size: 1.8 KB |
Rev | Line | |
---|---|---|
[4766] | 1 | /*! |
[5018] | 2 | * @file orxonox.h |
3 | * Orxonox core functions | |
[4766] | 4 | */ |
[1856] | 5 | |
[3224] | 6 | #ifndef _ORXONOX_H |
7 | #define _ORXONOX_H | |
[1803] | 8 | |
[4817] | 9 | #include "base_object.h" |
[2190] | 10 | |
11 | class WorldEntity; | |
[2636] | 12 | class GameLoader; |
[4766] | 13 | class IniParser; |
[1850] | 14 | |
[4768] | 15 | //! orxonox core singleton class |
[2190] | 16 | /** |
17 | */ | |
[4817] | 18 | class Orxonox : public BaseObject { |
[1803] | 19 | |
[4445] | 20 | public: |
21 | virtual ~Orxonox (); | |
[4836] | 22 | /** @returns a Pointer to the only object of this Class */ |
[4766] | 23 | inline static Orxonox* getInstance() { if (!singletonRef) singletonRef = new Orxonox(); return singletonRef; }; |
24 | ||
[5996] | 25 | int init(int argc, char** argv, const char* name, int port); |
[4445] | 26 | |
[5207] | 27 | void restart(); |
28 | ||
[4445] | 29 | void start(); |
30 | ||
[1850] | 31 | private: |
[4447] | 32 | Orxonox (); |
33 | ||
[7221] | 34 | void parseIniFile(const std::string& fileName); |
[4766] | 35 | |
[5074] | 36 | int initResources (); |
[4445] | 37 | int initVideo (); |
38 | int initSound (); | |
39 | int initInput (); | |
40 | int initNetworking (); | |
[5074] | 41 | int initMisc (); |
[4445] | 42 | |
[7221] | 43 | const std::string& getConfigFile (); |
[4446] | 44 | |
[4445] | 45 | private: |
[4447] | 46 | static Orxonox* singletonRef; //!< singleton reference to orxonox |
[3543] | 47 | |
[4766] | 48 | IniParser* iniParser; //!< Reference to the ini-parser used in orxonox |
[7221] | 49 | std::string configFileName; //!< Filename of the configuration-file. |
[4447] | 50 | GameLoader* gameLoader; //!< The gameLoader |
[4766] | 51 | |
[4447] | 52 | unsigned int argc; //!< Count of Arguments of orxonox |
53 | char** argv; //!< Values of th Arguments of orxonox. | |
[5996] | 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 | |
[1803] | 57 | }; |
58 | ||
[4447] | 59 | |
[5024] | 60 | //////////////////////// |
61 | // Start-up functions // | |
62 | //////////////////////// | |
[5996] | 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); | |
[3648] | 67 | |
[3224] | 68 | #endif /* _ORXONOX_H */ |
[1850] | 69 |
Note: See TracBrowser
for help on using the repository browser.