Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2009, 2:39:16 AM (15 years ago)
Author:
bknecht
Message:

we do now save what level you chose last time and will preselect it for you on restart ;-). Of course you can still use —level or -l to choose your level in the old way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/Game.cc

    r2927 r3036  
    122122        SetConfigValue(statisticsAvgLength_, 1000000)
    123123            .description("Sets the time in microseconds interval at which average fps, etc. gets calculated.");
     124        SetConfigValue(levelName_, "presentation_dm.oxw")
     125            .description("Sets the preselection of the level in the main menu.");
     126    }
     127
     128    void Game::setLevel(std::string levelName)
     129    {
     130        ModifyConfigValue(levelName_, set, levelName);
     131    }
     132
     133    const std::string& Game::getLevel()
     134    {
     135        std::string levelName;
     136        CommandLine::getValue("level", &levelName);
     137        if (levelName == "")
     138            return levelName_;
     139        else
     140            return levelName;
    124141    }
    125142
Note: See TracChangeset for help on using the changeset viewer.