Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7247 in orxonox.OLD for branches/preferences/src/lib/graphics


Ignore:
Timestamp:
Mar 24, 2006, 6:24:41 PM (19 years ago)
Author:
rennerc
Message:

removed several iniParser

Location:
branches/preferences/src/lib/graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/preferences/src/lib/graphics/graphics_engine.cc

    r7221 r7247  
    3030
    3131#include "parser/ini_parser/ini_parser.h"
     32#include "util/preferences.h"
    3233#include "substring.h"
    3334#include "text.h"
     
    154155 * @returns nothing usefull
    155156 */
    156 int GraphicsEngine::initFromIniFile(IniParser* iniParser)
     157int GraphicsEngine::initFromPreferences()
    157158{
    158159  // looking if we are in fullscreen-mode
    159   const std::string fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
     160  const std::string fullscreen = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_FULLSCREEN, "0");
     161
    160162  if (fullscreen[0] == '1' || fullscreen == "true")
    161163    this->fullscreenFlag = SDL_FULLSCREEN;
    162164
    163165  // looking if we are in fullscreen-mode
    164   const std::string textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
     166  const std::string textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "0");
    165167  if (textures[0] == '1' || textures == "true")
    166168    Texture::setTextureEnableState(true);
     
    169171
    170172  // searching for a usefull resolution
    171   SubString resolution(iniParser->getVar(CONFIG_NAME_RESOLUTION, CONFIG_SECTION_VIDEO, "640x480").c_str(), 'x'); ///FIXME
     173  SubString resolution(Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_RESOLUTION, "640x480").c_str(), 'x'); ///FIXME
    172174  //resolution.debug();
    173175  MultiType x = resolution.getString(0), y = resolution.getString(1);
  • branches/preferences/src/lib/graphics/graphics_engine.h

    r7221 r7247  
    3939
    4040    int init();
    41     int initFromIniFile(IniParser* iniParser);
     41    int initFromPreferences();
    4242
    4343    void setWindowName(const std::string& windowName, const std::string& icon);
Note: See TracChangeset for help on using the changeset viewer.