Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2009, 8:20:07 PM (15 years ago)
Author:
rgrieder
Message:

Merged core5 branch back to the trunk.
Key features include clean level unloading and an extended XML event system.

Two important notes:
Delete your keybindings.ini files! * or you will still get parser errors when loading the key bindings.
Delete build_dir/lib/modules/libgamestates.module! * or orxonox won't start.
Best thing to do is to delete the build folder ;)

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/ConfigFileManager.cc

    r5781 r5929  
    3636#include "ConsoleCommand.h"
    3737#include "ConfigValueContainer.h"
    38 #include "Core.h"
     38#include "PathConfig.h"
    3939
    4040namespace orxonox
     
    4848    bool config(const std::string& classname, const std::string& varname, const std::string& value)
    4949    {
    50         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname));
    51         if (identifier != Identifier::getLowercaseIdentifierMapEnd())
     50        std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
     51        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    5252        {
    5353            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
     
    6060    bool tconfig(const std::string& classname, const std::string& varname, const std::string& value)
    6161    {
    62         std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseIdentifierMap().find(getLowercase(classname));
    63         if (identifier != Identifier::getLowercaseIdentifierMapEnd())
     62        std::map<std::string, Identifier*>::const_iterator identifier = Identifier::getLowercaseStringIdentifierMap().find(getLowercase(classname));
     63        if (identifier != Identifier::getLowercaseStringIdentifierMapEnd())
    6464        {
    6565            std::map<std::string, ConfigValueContainer*>::const_iterator variable = (*identifier).second->getLowercaseConfigValueMap().find(getLowercase(varname));
     
    222222
    223223        // Get default file if necessary and available
    224         boost::filesystem::path filepath(Core::getConfigPath() / this->filename_);
     224        boost::filesystem::path filepath(PathConfig::getConfigPath() / this->filename_);
    225225        if (!boost::filesystem::exists(filepath))
    226226        {
    227227            // Try to get default one from the data folder
    228             boost::filesystem::path defaultFilepath(Core::getDataPath() / "defaultConfig" / this->filename_);
     228            boost::filesystem::path defaultFilepath(PathConfig::getDataPath() / "defaultConfig" / this->filename_);
    229229            if (boost::filesystem::exists(defaultFilepath))
    230230            {
     
    336336    {
    337337        std::ofstream file;
    338         file.open((Core::getConfigPathString() + filename_).c_str(), std::fstream::out);
     338        file.open((PathConfig::getConfigPathString() + filename_).c_str(), std::fstream::out);
    339339        file.setf(std::ios::fixed, std::ios::floatfield);
    340340        file.precision(6);
     
    376376        for (std::list<ConfigFileSection*>::iterator it1 = this->sections_.begin(); it1 != this->sections_.end(); )
    377377        {
    378             std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getIdentifierMap().find((*it1)->getName());
    379             if (it2 != Identifier::getIdentifierMapEnd() && (*it2).second->hasConfigValues())
     378            std::map<std::string, Identifier*>::const_iterator it2 = Identifier::getStringIdentifierMap().find((*it1)->getName());
     379            if (it2 != Identifier::getStringIdentifierMapEnd() && (*it2).second->hasConfigValues())
    380380            {
    381381                // The section exists, delete comment
     
    455455        if (this->type_ == ConfigFileType::Settings)
    456456        {
    457             for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getIdentifierMapBegin(); it != Identifier::getIdentifierMapEnd(); ++it)
     457            for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin(); it != Identifier::getStringIdentifierMapEnd(); ++it)
    458458            {
    459459                if (it->second->hasConfigValues())
Note: See TracChangeset for help on using the changeset viewer.