Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/orxonox.h @ 6368

Last change on this file since 6368 was 6351, checked in by patrick, 19 years ago

network: the network initialisation is much better, working for dedicated server mode

File size: 1.9 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
11class GameLoader;
12class IniParser;
13
14//! orxonox core singleton class
15/**
16*/
17class Orxonox : public BaseObject {
18
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  void start();
27
28
29 private:
30  Orxonox ();
31
32  int initResources (int argc, char** argv);
33  int initVideo (int argc, char** argv);
34  int initSound (int argc, char** argv);
35  int initInput (int argc, char** argv);
36  int initNetworking (int argc, char** argv);
37  int initMisc (int argc, char** argv);
38
39  void parseIniFile(const char* fileName);
40  const char* getConfigFile ();
41
42
43 private:
44  static Orxonox*   singletonRef;            //!< singleton reference to orxonox
45
46  IniParser*        iniParser;               //!< Reference to the ini-parser used in orxonox
47  char*             configFileName;          //!< Filename of the configuration-file.
48  GameLoader*       gameLoader;              //!< The gameLoader
49
50  unsigned int      argc;                    //!< Count of Arguments of orxonox
51  char**            argv;                    //!< Values of th Arguments of orxonox.
52
53  const char*       serverName;              //!< Name of the Orxonox client if == NULL -> server
54  int               dedicatedServer;         //!< is 1 if the server is a dedicated server, 0 else
55  int               port;                    //!< number of the network port of the server/client if == -1 no network
56};
57
58
59////////////////////////
60// Start-up functions //
61////////////////////////
62int showHelp(int argc, char** argv);
63int showLicense();
64int startOrxonox(int argc, char** argv, const char* clientName, int port);
65
66#endif /* _ORXONOX_H */
67
Note: See TracBrowser for help on using the repository browser.