Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Globals.h

Go to the documentation of this file.
00001 /*
00002  * Globals.h
00003  *
00004  * Part of Fly! Legacy project
00005  *
00006  * Copyright 2003 Chris Wallace
00007  *
00008  * Fly! Legacy is free software; you can redistribute it and/or modify
00009  *   it under the terms of the GNU General Public License as published by
00010  *   the Free Software Foundation; either version 2 of the License, or
00011  *   (at your option) any later version.
00012  *
00013  * Fly! Legacy is distributed in the hope that it will be useful,
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *   GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  *   along with Fly! Legacy; if not, write to the Free Software
00020  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00034 #ifndef GLOBALS_H
00035 #define GLOBALS_H
00036 
00037 #include "FlyLegacy.h"
00038 #include "FrameRateTracker.h"
00039 #include "TimeManager.h"
00040 #include "Situation.h"
00041 #include "KeyMap.h"
00042 #include "CursorManager.h"
00043 #include "AudioManager.h"
00044 #include "Utility.h"
00045 #include "Ini.h"
00046 #include "LogFile.h"
00047 #include "Fui.h"
00048 
00049 
00050 typedef struct {
00051   bool  skydomeWireframe;
00052   bool  terrainWireframe;
00053   bool  aircraftWireframe;
00054   bool  terrainReliefShaded;
00055 } SGlobalSettings;
00056 
00057 
00058 typedef struct {
00059   SFont     ftasci10;
00060   SFont     ftascm10;
00061   SFont     ftdigi9;
00062   SFont     ftdigi9b;
00063   SFont     ftdigi9d;
00064   SFont     ftdigi13;
00065   SFont     ftdos12;
00066   SFont     ftmicro5;
00067   SFont     ftmno14b;
00068   SFont     ftmono12;
00069   SFont     ftnorm14;
00070   SFont     ftnorm28;
00071   SFont     ftsmal10;
00072   SFont     ftthin24;
00073   SFont     fttiny7;
00074   SFont     fttiny7w;
00075 } SDefaultFonts;
00076 
00077 
00078 //
00079 // Global variables
00080 //
00081 // All globals are contained within a master global data structure defined below
00082 //
00083 typedef struct {
00084   // Application state
00085   EAppState appState;
00086 
00087   // Screen display parameters
00088   int       screenWidth, screenHeight, screenDepth, screenRefresh;
00089 
00090   // Cockpit panel parameters
00091   bool      mouseScrollingEnabled;
00092   int       panelScrollStep, panelCreepStep;
00093 
00094   // Global settings
00096   SGlobalSettings   *settings;
00097 
00098   // SSG rendering context
00099   ssgContext        *context;
00100 
00101   // Default POD filesystems
00102   PFS               pfs;
00103 
00104   // Simulator situation
00105   CSituation        *sit;
00106 
00107   // Key mappings
00108   CKeyMap           *keymap;
00109 
00110   // Time manger
00111   CTimeManager      *timemgr;
00112 
00113   // Cursor manager
00114   CCursorManager    *cursormgr;
00115   Tag               crsrArrow;
00116 
00117   // Audio manager
00118   CAudioManager     *audiomgr;
00119 
00120   // Terrain manager
00121   CTerrainManager   *terrainmgr;
00122 
00123   // Sky manager
00124   CSkyManager       *skymgr;
00125 
00126   // Slew manager
00127   CSlewManager      *slewmgr;
00128 
00129   // Default fonts
00130   SDefaultFonts     fonts;
00131 
00132   // FUI Window manager
00133   CFuiManager       *fuimgr;
00134 
00135   // Default logs
00136   CLogFile          *logDebug;
00137   CLogFile          *logWarning;
00138 
00139   // Frame rate trackers
00140   CFrameRateTracker *simRate;
00141   CFrameRateTracker *drawRate;
00142 } SGlobals;
00143 
00144 extern SGlobals *globals;   // Declared in Main.cpp
00145 
00146 
00147 #endif // GLOBALS_H
00148 
SourceForge.net Logo Documentation generated by doxygen