Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 19, 2008, 2:24:33 PM (16 years ago)
Author:
rgrieder
Message:

Moved all showsGraphics, hasServer, etc. functions from Settings class to Core class.
This was necessary to avoid circular dependencies.

File:
1 edited

Legend:

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

    r1755 r1949  
    6060            static void resetLanguage();
    6161
    62             //static void tick(float dt);
     62            // fast access global variables.
     63            static bool showsGraphics() { return bShowsGraphics_s; }
     64            static bool hasServer()     { return bHasServer_s; }
     65            static bool isClient()      { return bIsClient_s; }
     66            static bool isStandalone()  { return bIsStandalone_s; }
     67            static bool isMaster()      { return bIsMaster_s; }
     68            static void setShowsGraphics(bool val) { bShowsGraphics_s = val; updateIsMaster(); }
     69            static void setHasServer    (bool val) { bHasServer_s     = val; updateIsMaster(); }
     70            static void setIsClient     (bool val) { bIsClient_s      = val; updateIsMaster(); }
     71            static void setIsStandalone (bool val) { bIsStandalone_s  = val; updateIsMaster(); }
     72            static void updateIsMaster  ()         { bIsMaster_s      = (bHasServer_s || bIsStandalone_s); }
    6373
    6474        private:
     
    7484            int softDebugLevelShell_;                       //!< The debug level for the ingame shell
    7585            std::string language_;                          //!< The language
     86
     87            static bool bShowsGraphics_s;                   //!< global variable that tells whether to show graphics
     88            static bool bHasServer_s;                       //!< global variable that tells whether this is a server
     89            static bool bIsClient_s;
     90            static bool bIsStandalone_s;
     91            static bool bIsMaster_s;
    7692    };
    7793}
Note: See TracChangeset for help on using the changeset viewer.