Last change
on this file since 9777 was
9715,
checked in by bensch, 18 years ago
|
renamed newclassid to classid and newobjectlist to objectlist
|
File size:
1.6 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 | |
---|
14 | //! orxonox core singleton class |
---|
15 | /** |
---|
16 | */ |
---|
17 | class Orxonox : public BaseObject { |
---|
18 | ObjectListDeclaration(Orxonox); |
---|
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 std::string & name, int port); |
---|
26 | |
---|
27 | void restart(); |
---|
28 | |
---|
29 | void start(); |
---|
30 | |
---|
31 | private: |
---|
32 | Orxonox (); |
---|
33 | |
---|
34 | int initResources (); |
---|
35 | int initVideo (); |
---|
36 | int initSound (); |
---|
37 | int initInput (); |
---|
38 | int initNetworking (); |
---|
39 | int initMisc (); |
---|
40 | |
---|
41 | const std::string& getConfigFile (); |
---|
42 | |
---|
43 | private: |
---|
44 | static Orxonox* singletonRef; //!< singleton reference to orxonox |
---|
45 | |
---|
46 | std::string configFileName; //!< Filename of the configuration-file. |
---|
47 | GameLoader* gameLoader; //!< The gameLoader |
---|
48 | |
---|
49 | unsigned int argc; //!< Count of Arguments of orxonox |
---|
50 | char** argv; //!< Values of th Arguments of orxonox. |
---|
51 | |
---|
52 | std::string serverName; //!< Name of the Orxonox client if == "" -> server |
---|
53 | int port; //!< number of the network port of the server/client if == -1 no network |
---|
54 | }; |
---|
55 | |
---|
56 | |
---|
57 | //////////////////////// |
---|
58 | // Start-up functions // |
---|
59 | //////////////////////// |
---|
60 | |
---|
61 | int startNetworkOrxonox(int argc, char** argv); |
---|
62 | int startOrxonox(int argc, char** argv, const std::string & clientName, int port); |
---|
63 | |
---|
64 | #endif /* _ORXONOX_H */ |
---|
65 | |
---|
Note: See
TracBrowser
for help on using the repository browser.