Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/gui/src/orxonox/Orxonox.h @ 1674

Last change on this file since 1674 was 1663, checked in by rgrieder, 16 years ago

Added CommandLine class.
You can now call SetCommandLineArgument like SetConsoleCommand and hereby define a new command line argument. They are passed in main() and then they can be accessed by commandLine::getCommandLineArgument().

  • Property svn:eol-style set to native
File size: 3.1 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
25 *   Co-authors:
26 *      ...
27 *
28 */
29
30/**
31 @file  Orxonox.h
32 @brief Main Orxonox Class File
33 @author Benjamin Knecht <beni_at_orxonox.net>
34 */
35
36#ifndef _Orxonox_H__
37#define _Orxonox_H__
38
39#include "OrxonoxPrereqs.h"
40
41#include <string>
42
43#include <OgrePrerequisites.h>
44
45#include "core/OrxonoxClass.h"
46#include "audio/AudioPrereqs.h"
47#include "GraphicsEngine.h"
48#include "Settings.h"
49
50namespace orxonox
51{
52  //! Orxonox singleton class
53    class _OrxonoxExport Orxonox : public OrxonoxClass
54  {
55    public:
56      Orxonox();
57      ~Orxonox();
58
59      void start();
60      void setConfigValues();
61
62      void abortRequest();
63
64      static Orxonox& getInstance();
65
66      static void slomo(float factor) { Orxonox::setTimeFactor(factor); }
67      static float getTimeFactor()    { return Orxonox::getInstance().timefactor_; }
68      static void loadGame(const std::string& name);
69      static void exit()              { Orxonox::getInstance().abortRequest(); }
70      static void setTimeFactor(float factor = 1.0);
71
72   private:
73      // don't mess with singletons
74      Orxonox(Orxonox& instance);
75
76      bool serverLoad();
77      bool clientLoad();
78      bool standaloneLoad();
79
80      bool loadPlayground();
81      bool loadScene();
82      void startRenderLoop();
83
84    private:
85      Level*                startLevel_;       //!< current hard coded default level
86      Level*                hud_;              //!< 'level' object fo the HUD
87      //audio::AudioManager*  auMan_;            //!< audio manager
88      Ogre::Timer*          timer_;            //!< Main loop timer
89      bool                  bAbort_;           //!< aborts the render loop if true
90      float                 timefactor_;       //!< A factor to change the gamespeed
91
92      // config values
93      float                 debugRefreshTime_;
94
95      // By Orxonox managed singleton pointers
96      GraphicsEngine*       graphicsEngine_;   //!< our dearest graphics engine <3
97      InputManager*         inputManager_;
98      Radar*                radar_;            //!< represents the Radar (not the HUD part)
99      InGameConsole*        console_;
100      GUIManager*           guiManager_;
101
102      static Orxonox *singletonRef_s;
103  };
104}
105#endif /* _Orxonox_H__ */
Note: See TracBrowser for help on using the repository browser.