Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 25, 2015, 7:20:21 PM (9 years ago)
Author:
landauf
Message:

moved config values and all related functions from Game and Core to GameConfig and CoreConfig respectively. this ensures that no framework features are used by Game and Core before Core itself initialized the framework.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/Core.h

    r10464 r10479  
    4747#include "util/DestructionHelper.h"
    4848#include "util/Singleton.h"
    49 #include "config/Configurable.h"
     49#include "CoreConfig.h"
    5050
    5151namespace orxonox
    5252{
    53     //! Informs about changes in the Development Mode.
    54     class DevModeListener : virtual public Listable
    55     {
    56     public:
    57         DevModeListener();
    58         virtual ~DevModeListener() {}
    59         virtual void devModeChanged(bool value) = 0;
    60     };
    61 
    6253    /**
    6354    @brief
     
    6657        You should only create this singleton once because it destroys the identifiers!
    6758    */
    68     class _CoreExport Core : public Singleton<Core>, public Configurable
     59    class _CoreExport Core : public Singleton<Core>
    6960    {
    7061        friend class Singleton<Core>;
     
    8677            void destroy();
    8778
    88             void setConfigValues();
    89 
    90             //! Returns the configured language.
    91             const std::string& getLanguage()
    92                 { return this->language_; }
    93             void resetLanguage();
    94 
    95             void updateLastLevelTimestamp();
    96             inline long long getLastLevelTimestamp() const
    97                 { return this->lastLevelTimestamp_; }
    98 
    99             void updateOgreConfigTimestamp();
    100             inline long long getOgreConfigTimestamp() const
    101                 { return this->ogreConfigTimestamp_; }
    102 
    103             //! Developers bit. If returns false, some options are not available as to not confuse the normal user.
    104             inline bool inDevMode(void) const
    105                 { return this->bDevMode_; }
     79            inline CoreConfig* getConfig() const
     80                { return this->config_; }
    10681
    10782        private:
    10883            Core(const Core&); //!< Don't use (undefined symbol)
    109 
    110             void devModeChanged();
    111             void languageChanged();
    112             void initRandomNumberGenerator();
    11384
    11485            void preUpdate(const Clock& time);
     
    135106            GUIManager*               guiManager_;                 //!< Interface to GUI
    136107            Scope<ScopeID::GRAPHICS>* graphicsScope_;
     108            bool                      bGraphicsLoaded_;
    137109
    138             bool                      bGraphicsLoaded_;
    139             std::string               language_;                   //!< The language
    140             bool                      bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
    141             bool                      bStartIOConsole_;            //!< Set to false if you don't want to use the IOConsole
    142             long long                 lastLevelTimestamp_;         ///< Timestamp when the last level was started
    143             long long                 ogreConfigTimestamp_;        ///< Timestamp wehen the ogre config level was modified
    144             bool                      bDevMode_;                   //!< Developers bit. If set to false, some options are not available as to not confuse the normal user.
     110            /// Helper object that stores the config values
     111            CoreConfig*               config_;
    145112
    146113            /// Helper object that executes the surrogate destructor destroy()
Note: See TracChangeset for help on using the changeset viewer.