Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 28, 2009, 7:46:37 PM (15 years ago)
Author:
rgrieder
Message:

Merged buildsystem3 containing buildsystem2 containing Adi's buildsystem branch back to the trunk.
Please update the media directory if you were not using buildsystem3 before.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/core/Core.h

    r2662 r2710  
    4444#include "util/OutputHandler.h"
    4545
     46// Only allow main to access postMainInitialisation, so we need a forward declaration
     47int main(int, char**);
     48// boost::filesystem header has quite a large tail, use forward declaration
     49namespace boost { namespace filesystem
     50{
     51    struct path_traits;
     52    template<class String, class Traits> class basic_path;
     53    typedef basic_path< std::string, path_traits> path;
     54} }
     55
    4656namespace orxonox
    4757{
     
    4959    class _CoreExport Core : public OrxonoxClass
    5060    {
     61        friend int ::main(int, char**); // sets isDevBuild_s
     62
    5163        public:
    5264            Core();
    5365            ~Core();
    5466            void setConfigValues();
    55             void debugLevelChanged();
    56             void languageChanged();
    5767
    5868            static Core& getInstance() { assert(Core::singletonRef_s); return *Core::singletonRef_s; }
     
    6272            static const std::string& getLanguage();
    6373            static void  resetLanguage();
     74
     75            static bool isDevBuild() { return Core::isDevBuild_s; }
     76
     77            static void tsetMediaPath(const std::string& path)
     78            { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); }
     79            static const boost::filesystem::path& getMediaPath();
     80            static const boost::filesystem::path& getConfigPath();
     81            static const boost::filesystem::path& getLogPath();
     82            static std::string getMediaPathString();
     83            static std::string getConfigPathString();
     84            static std::string getLogPathString();
     85            static std::string getMediaPathPOSIXString();
     86            static std::string getConfigPathPOSIXString();
     87            static std::string getLogPathPOSIXString();
    6488
    6589            // fast access global variables.
     
    79103            void resetLanguageIntern();
    80104            void initializeRandomNumberGenerator();
     105            void debugLevelChanged();
     106            void languageChanged();
     107            void mediaPathChanged();
     108            void _tsetMediaPath(const std::string& path);
     109
     110            static void postMainInitialisation();
     111            static void checkDevBuild();
     112            static void setExecutablePath();
     113            static void createDirectories();
    81114
    82115            int softDebugLevel_;                            //!< The debug level
     
    85118            int softDebugLevelShell_;                       //!< The debug level for the ingame shell
    86119            std::string language_;                          //!< The language
    87             bool bInitializeRandomNumberGenerator_;          //!< If true, srand(time(0)) is called
     120            bool bInitializeRandomNumberGenerator_;         //!< If true, srand(time(0)) is called
     121            std::string mediaPathString_;                   //!< Path to the data/media file folder as string
    88122
    89123            static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
     
    93127            static bool bIsMaster_s;
    94128
     129            static bool isDevBuild_s;                       //!< True for builds in the build directory (not installed)
     130
    95131            static Core* singletonRef_s;
    96132    };
Note: See TracChangeset for help on using the changeset viewer.