Changeset 6858 for code/branches/skybox2
- Timestamp:
- May 6, 2010, 1:11:43 PM (15 years ago)
- Location:
- code/branches/skybox2/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/skybox2/src/libraries/core/Core.cc
r6772 r6858 78 78 79 79 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); 80 SetCommandLineSwitch(noGametypeCaptions).information("Use this if you don't want to use Gametype captions.");81 80 82 81 #ifdef ORXONOX_PLATFORM_WINDOWS … … 150 149 this->setConfigValues(); 151 150 152 // no captions in gametype.153 if(CommandLineParser::getValue("noGametypeCaptions").getBool())154 {155 ModifyConfigValue(bGametypeCaptions_, tset, false);156 }157 158 151 // create persistent io console 159 152 this->ioConsole_.reset(new IOConsole()); … … 201 194 .description("If true, all random actions are different each time you start the game") 202 195 .callback(this, &Core::initRandomNumberGenerator); 203 SetConfigValue(bGametypeCaptions_, true)204 .description("Set to false if you don't want to use Gametype captions.");205 196 } 206 197 -
code/branches/skybox2/src/libraries/core/Core.h
r6772 r6858 67 67 void setConfigValues(); 68 68 69 inline bool hasGametypeCaptions(void)70 { return this->bGametypeCaptions_; }71 72 69 //! Returns the configured language. 73 70 const std::string& getLanguage() … … 111 108 std::string language_; //!< The language 112 109 bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called 113 bool bGametypeCaptions_;114 110 115 111 static Core* singletonPtr_s; -
code/branches/skybox2/src/modules/designtools/SkyboxGenerator.cc
r6806 r6858 60 60 this->setConfigValues(); 61 61 takeScreenshot_ = false; 62 this->captionsRemoved_ = false; 62 63 } 63 64 … … 76 77 if( takeScreenshot_ == true ) 77 78 { 79 if(!this->captionsRemoved_) 80 { 81 CommandExecutor::execute("setGametypeStatus false"); 82 this->captionsRemoved_ = true; 83 return; 84 } 85 78 86 ControllableEntity* ce = HumanController::getLocalControllerSingleton()->getControllableEntity(); 79 87 Camera* camera = ce->getCamera(); … … 81 89 82 90 Ogre::RenderWindow* w = GraphicsManager::getInstance().getRenderWindow(); 91 83 92 84 93 switch (iterateOverDirections_) … … 131 140 camera->getOgreCamera()->setAspectRatio(aspectRatio_); 132 141 camera->getOgreCamera()->setFOVy(fovy_); 142 iterateOverDirections_++; 143 case 8 : 133 144 iterateOverDirections_ =0; 134 145 takeScreenshot_ = false; 135 146 CommandExecutor::execute("pause"); 147 CommandExecutor::execute("setGametypeStatus true"); 148 this->captionsRemoved_ = false; 136 149 } 150 137 151 } 138 152 } -
code/branches/skybox2/src/modules/designtools/SkyboxGenerator.h
r6804 r6858 54 54 float aspectRatio_; 55 55 Ogre::Radian fovy_; 56 bool captionsRemoved_; 56 57 }; 57 58 } -
code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.cc
r6772 r6858 30 30 31 31 #include "util/Convert.h" 32 #include "core/Co re.h"32 #include "core/ConsoleCommand.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "infos/GametypeInfo.h" … … 39 39 namespace orxonox 40 40 { 41 CreateFactory(GametypeStatus); 41 CreateFactory(GametypeStatus); 42 43 /*static*/ bool GametypeStatus::noCaption_s = false; 44 SetConsoleCommand(GametypeStatus, setGametypeStatus, true); 42 45 43 46 GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator) … … 61 64 ControllableEntity* ce = this->owner_->getControllableEntity(); 62 65 63 if(!Core::getInstance().hasGametypeCaptions()) // No captions are displayed. 66 if(GametypeStatus::noCaption_s) // No captions are displayed. 67 { 68 this->setCaption(""); 64 69 return; 70 } 65 71 66 72 if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning()) … … 92 98 this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner()); 93 99 } 100 101 /** 102 @brief 103 Sets whether the gametype status is displayed. 104 @param bValue 105 If true captions are displayed, if false, not. 106 */ 107 /*static*/ void GametypeStatus::setGametypeStatus(bool bValue) 108 { 109 GametypeStatus::noCaption_s = !bValue; 110 } 111 94 112 } -
code/branches/skybox2/src/modules/overlays/hud/GametypeStatus.h
r5781 r6858 46 46 virtual void changedOwner(); 47 47 48 static void setGametypeStatus(bool bValue); //!< Toggles whether the gametype status is displayed. 49 48 50 private: 49 51 PlayerInfo* owner_; 52 static bool noCaption_s; 53 50 54 }; 51 55 }
Note: See TracChangeset
for help on using the changeset viewer.