Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2005, 7:21:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ability to disable textures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/graphics_engine.cc

    r4770 r4777  
    112112 * @returns nothing usefull
    113113 */
    114 int GraphicsEngine::loadFromIniFile(IniParser* iniParser, const char* section)
     114int GraphicsEngine::loadFromIniFile(IniParser* iniParser)
    115115{
    116116  // searching for a usefull resolution
    117   SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, section, "640x480"), 'x');
     117  SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480"), 'x');
    118118  this->setResolution(atoi(resolution.getString(0)), atoi(resolution.getString(1)), 16);
    119119
    120120  // looking if we are in fullscreen-mode
    121   const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, section, "0");
     121  const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
    122122  if (strchr(fullscreen, '1'))
    123123    this->setFullscreen(true);
     124
     125  // looking if we are in fullscreen-mode
     126  const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
     127  if (strchr(textures, '1'))
     128    this->texturesEnabled = true;
     129  else
     130    this->texturesEnabled = false;
     131
    124132}
    125133
Note: See TracChangeset for help on using the changeset viewer.