eng_global.hh

Go to the documentation of this file.
00001 /*
00008  * LEGAL:   COPYRIGHT (C) 2004 JIM E. BROOKS
00009  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
00010  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
00011  *****************************************************************************/
00012 
00013 #ifndef ENG_GLOBAL_HH
00014 #define ENG_GLOBAL_HH 1
00015 
00016 namespace eng {
00017 
00018 // Abbreviations:
00019 #define gEng    eng::global.mEngine
00020 #define gWorld  eng::global.mWorld
00021 
00022 #if DEBUG
00023 // Run Engine in test mode (not to be confused with test programs in tests/src).
00024 enum eTestMode
00025 {
00026     // Bits.
00027     eTestMode_NONE      = 0,
00028     eTestMode_WORLD     = (1<<0),
00029 };
00030 #endif
00031 
00035 class Global
00036 {
00037 public:
00038     Engine          mEngine;
00039     WORLD_CLASS     mWorld;
00040 #if DEBUG
00041     eTestMode       mTestMode;
00042 #endif
00043 };
00044 
00045 #if ENG_CC
00046 #define ENGINE_GLOBAL
00047 #else
00048 #define ENGINE_GLOBAL extern
00049 #endif
00050 
00051 ENGINE_GLOBAL Global global;
00052 
00053 } // namespace eng
00054 
00055 #endif // ENG_GLOBAL_HH
Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:08 2007