source:
orxonox.OLD/trunk/src/orxonox.h
@
10307
Last change on this file since 10307 was 9869, checked in by bensch, 18 years ago | |
---|---|
File size: 1.6 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; |
[1850] | 13 | |
[4768] | 14 | //! orxonox core singleton class |
[2190] | 15 | /** |
16 | */ | |
[4817] | 17 | class Orxonox : public BaseObject { |
[9869] | 18 | ObjectListDeclaration(Orxonox); |
[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 | ||
[7256] | 25 | int init(int argc, char** argv, const std::string & name, int port); |
[4445] | 26 | |
[5207] | 27 | void restart(); |
28 | ||
[4445] | 29 | void start(); |
30 | ||
[1850] | 31 | private: |
[4447] | 32 | Orxonox (); |
33 | ||
[5074] | 34 | int initResources (); |
[4445] | 35 | int initVideo (); |
36 | int initSound (); | |
37 | int initInput (); | |
38 | int initNetworking (); | |
[5074] | 39 | int initMisc (); |
[4445] | 40 | |
[7221] | 41 | const std::string& getConfigFile (); |
[4446] | 42 | |
[4445] | 43 | private: |
[4447] | 44 | static Orxonox* singletonRef; //!< singleton reference to orxonox |
[3543] | 45 | |
[7221] | 46 | std::string configFileName; //!< Filename of the configuration-file. |
[4447] | 47 | GameLoader* gameLoader; //!< The gameLoader |
[4766] | 48 | |
[4447] | 49 | unsigned int argc; //!< Count of Arguments of orxonox |
50 | char** argv; //!< Values of th Arguments of orxonox. | |
[5996] | 51 | |
[7256] | 52 | std::string serverName; //!< Name of the Orxonox client if == "" -> server |
[5996] | 53 | int port; //!< number of the network port of the server/client if == -1 no network |
[1803] | 54 | }; |
55 | ||
[4447] | 56 | |
[5024] | 57 | //////////////////////// |
58 | // Start-up functions // | |
59 | //////////////////////// | |
[7256] | 60 | |
[5996] | 61 | int startNetworkOrxonox(int argc, char** argv); |
[7256] | 62 | int startOrxonox(int argc, char** argv, const std::string & clientName, int port); |
[3648] | 63 | |
[3224] | 64 | #endif /* _ORXONOX_H */ |
[1850] | 65 |
Note: See TracBrowser
for help on using the repository browser.