Changeset 7256 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Mar 30, 2006, 11:45:31 AM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/graphics_engine.cc
r7221 r7256 29 29 #include "debug.h" 30 30 31 #include " parser/ini_parser/ini_parser.h"31 #include "util/preferences.h" 32 32 #include "substring.h" 33 33 #include "text.h" … … 150 150 /** 151 151 * loads the GraphicsEngine's settings from a given ini-file and section 152 * @param iniParser the iniParser to load from153 * @param section the Section in the ini-file to load from154 152 * @returns nothing usefull 155 153 */ 156 int GraphicsEngine::initFrom IniFile(IniParser* iniParser)154 int GraphicsEngine::initFromPreferences() 157 155 { 158 156 // looking if we are in fullscreen-mode 159 const std::string fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0"); 157 const std::string fullscreen = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_FULLSCREEN, "0"); 158 160 159 if (fullscreen[0] == '1' || fullscreen == "true") 161 160 this->fullscreenFlag = SDL_FULLSCREEN; 162 161 163 162 // looking if we are in fullscreen-mode 164 const std::string textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");163 const std::string textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "0"); 165 164 if (textures[0] == '1' || textures == "true") 166 165 Texture::setTextureEnableState(true); … … 169 168 170 169 // searching for a usefull resolution 171 SubString resolution( iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480").c_str(), 'x'); ///FIXME170 SubString resolution(Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_RESOLUTION, "640x480").c_str(), 'x'); ///FIXME 172 171 //resolution.debug(); 173 172 MultiType x = resolution.getString(0), y = resolution.getString(1); -
trunk/src/lib/graphics/graphics_engine.h
r7221 r7256 20 20 // Forward Declaration 21 21 class Text; 22 class IniParser;23 22 class WorldEntity; 24 23 class GraphicsEffect; … … 39 38 40 39 int init(); 41 int initFrom IniFile(IniParser* iniParser);40 int initFromPreferences(); 42 41 43 42 void setWindowName(const std::string& windowName, const std::string& icon);
Note: See TracChangeset
for help on using the changeset viewer.