Sion Tower (demo técnica) 0.1
|
00001 /* 00002 * This file is part of SionTower. 00003 * 00004 * 00005 * David Saltares Marquez (C) 2011 00006 * <david.saltares@gmail.com> 00007 * 00008 * 00009 * SionTower examples are free software: you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License ad 00011 * published by the Free Software Foundation, either version 3 of the 00012 * License, or (at your option) ant later version. 00013 * 00014 * SionTower examples are distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with SionTower examples. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 00023 00024 00025 #ifndef SIONTOWER_TRUNK_SRC_INCLUDE_GAME_H_ 00026 #define SIONTOWER_TRUNK_SRC_INCLUDE_GAME_H_ 00027 00028 #include <OGRE/Ogre.h> 00029 #include <OIS/OIS.h> 00030 00031 class StateManager; 00032 class SongManager; 00033 class SoundFXManager; 00034 class CollisionManager; 00035 class LevelManager; 00036 00038 00049 class Game { 00050 public: 00057 Game(); 00058 00064 ~Game(); 00065 00069 void start(); 00070 00074 static Ogre::SceneManager* getSceneManager(); 00075 00079 static Ogre::RenderWindow* getRenderWindow(); 00080 00084 static Ogre::Viewport* getViewPort(); 00085 00089 static Ogre::Log* getGameLog(); 00090 00094 static Ogre::Camera* getCamera(); 00095 00096 private: 00097 // Objetos Ogre 00098 Ogre::Root* _root; 00099 Ogre::LogManager* _logManager; 00100 00101 00102 // Sencilla recuperación (método estático) 00103 static Ogre::RenderWindow* _window; 00104 static Ogre::Camera* _camera; 00105 static Ogre::Viewport* _viewport; 00106 static Ogre::SceneManager* _sceneManager; 00107 static Ogre::Log* _log; 00108 00109 00110 // Gestor entrada OIS 00111 OIS::InputManager* _inputManager; 00112 00113 // Gestor Estados 00114 StateManager* _stateManager; 00115 00116 // Nombre aplicación 00117 Ogre::String _windowName; 00118 00119 // Ficheros de plugins, logging y configuración 00120 Ogre::String _pluginsCfg; 00121 Ogre::String _ogreLog; 00122 Ogre::String _ogreCfg; 00123 00124 // Subsistema de audio 00125 SongManager* _songManager; 00126 SoundFXManager* _soundFXManager; 00127 00128 // Colisiones 00129 CollisionManager* _collisionManager; 00130 00131 // Niveles 00132 LevelManager* _levelManager; 00133 00134 // Métodos auxiliares 00135 bool initialiseOgre(); 00136 bool initialiseOIS(); 00137 bool initialiseSDL(); 00138 00139 // Configuración 00140 void configureSceneManager(); 00141 void createCamera(); 00142 }; 00143 00144 #endif // SIONTOWER_TRUNK_SRC_INCLUDE_GAME_H_