Changeset 4770 in orxonox.OLD for orxonox/trunk/src/lib/graphics
- Timestamp:
- Jul 2, 2005, 1:20:56 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/graphics_engine.cc
r4769 r4770 21 21 #include "debug.h" 22 22 #include "text_engine.h" 23 24 #include "ini_parser.h" 25 #include "substring.h" 23 26 24 27 using namespace std; … … 102 105 glEnable(GL_DEPTH_TEST); 103 106 } 107 108 /** 109 * loads the GraphicsEngine's settings from a given ini-file and section 110 * @param iniParser the iniParser to load from 111 * @param section the Section in the ini-file to load from 112 * @returns nothing usefull 113 */ 114 int GraphicsEngine::loadFromIniFile(IniParser* iniParser, const char* section) 115 { 116 // searching for a usefull resolution 117 SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, section, "640x480"), 'x'); 118 this->setResolution(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16); 119 120 // looking if we are in fullscreen-mode 121 const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, section, "0"); 122 if (strchr(fullscreen, '1')) 123 this->setFullscreen(true); 124 } 125 104 126 105 127 -
orxonox/trunk/src/lib/graphics/graphics_engine.h
r4768 r4770 17 17 // Forward Declaration 18 18 class Text; 19 class IniParser; 19 20 20 21 //! class to handle graphics … … 30 31 31 32 int initVideo(); 33 int loadFromIniFile(IniParser* iniParser, const char* section); 32 34 33 35 void setWindowName(const char* windowName, const char* icon);
Note: See TracChangeset
for help on using the changeset viewer.