Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 1, 2008, 7:04:09 PM (16 years ago)
Author:
landauf
Message:

merged objecthierarchy branch back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

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

    r1755 r2087  
    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.