Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6622 for code/branches


Ignore:
Timestamp:
Mar 27, 2010, 5:39:26 PM (15 years ago)
Author:
rgrieder
Message:

Made IOConsole optional: use "—noIOConsole" or set config value Core::bStartIOConsole_ to false and it will not start.
Default behaviour is still "using the IOConsole".

Location:
code/branches/gamestate/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/src/libraries/core/Core.cc

    r6537 r6622  
    7878
    7979    SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
     80    SetCommandLineSwitch(noIOConsole).information("Use this if you don't want to use the IOConsole (for instance for Lua debugging)");
    8081#ifdef ORXONOX_PLATFORM_WINDOWS
    8182    SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)");
     
    8889        , consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands)
    8990        , bGraphicsLoaded_(false)
     91        , bStartIOConsole_(true)
    9092    {
    9193        // Set the hard coded fixed paths
     
    149151
    150152        // create persistent io console
    151         this->ioConsole_.reset(new IOConsole());
     153        if (CommandLineParser::getValue("noIOConsole").getBool())
     154        {
     155            ModifyConfigValue(bStartIOConsole_, tset, false);
     156        }
     157        if (this->bStartIOConsole_)
     158            this->ioConsole_.reset(new IOConsole());
    152159
    153160        // creates the class hierarchy for all classes with factories
     
    193200            .description("If true, all random actions are different each time you start the game")
    194201            .callback(this, &Core::initRandomNumberGenerator);
     202        SetConfigValue(bStartIOConsole_, true)
     203            .description("Set to false if you don't want to use the IOConsole (for Lua debugging for instance)");
    195204    }
    196205
     
    327336        }
    328337        // Process console events and status line
    329         this->ioConsole_->preUpdate(time);
     338        if (this->ioConsole_ != NULL)
     339            this->ioConsole_->preUpdate(time);
    330340        // Process thread commands
    331341        this->tclThreadManager_->preUpdate(time);
  • code/branches/gamestate/src/libraries/core/Core.h

    r6442 r6622  
    9797            scoped_ptr<TclBind>           tclBind_;
    9898            scoped_ptr<TclThreadManager>  tclThreadManager_;
    99             scoped_ptr<Scope<ScopeID::Root> >     rootScope_;
     99            scoped_ptr<Scope<ScopeID::Root> > rootScope_;
    100100            // graphical
    101101            scoped_ptr<GraphicsManager>   graphicsManager_;     //!< Interface to OGRE
     
    108108            std::string                   language_;                   //!< The language
    109109            bool                          bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
     110            bool                          bStartIOConsole_;            //!< Set to false if you don't want to use the IOConsole
    110111
    111112            static Core*                  singletonPtr_s;
Note: See TracChangeset for help on using the changeset viewer.