Changeset 11054 for code/branches/cpp11_v3/src/modules/overlays/hud
- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/modules/overlays/hud/AnnounceMessage.cc
r9667 r11054 40 40 RegisterObject(AnnounceMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(3.0f); -
code/branches/cpp11_v3/src/modules/overlays/hud/AnnounceMessage.h
r9667 r11054 43 43 virtual ~AnnounceMessage() {} 44 44 45 virtual void changedOwner() ;45 virtual void changedOwner() override; 46 46 47 v oid announcemessage(const GametypeInfo* gtinfo, const std::string& message);47 virtual void announcemessage(const GametypeInfo* gtinfo, const std::string& message) override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/ChatOverlay.cc
r9667 r11054 58 58 ChatOverlay::~ChatOverlay() 59 59 { 60 for ( std::set<Timer*>::iterator it = this->timers_.begin(); it != this->timers_.end(); ++it)61 delete (*it);60 for (Timer* timer : this->timers_) 61 delete timer; 62 62 } 63 63 … … 92 92 this->text_->setCaption(""); 93 93 94 for ( std::list<Ogre::DisplayString>::iterator it = this->messages_.begin(); it != this->messages_.end(); ++it)94 for (const Ogre::DisplayString& message : this->messages_) 95 95 { 96 this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));96 this->text_->setCaption(this->text_->getCaption() + "\n" + message); 97 97 } 98 98 } -
code/branches/cpp11_v3/src/modules/overlays/hud/ChatOverlay.h
r9667 r11054 49 49 50 50 protected: 51 virtual void incomingChat(const std::string& message, const std::string& name) ;51 virtual void incomingChat(const std::string& message, const std::string& name) override; 52 52 53 53 std::list<Ogre::DisplayString> messages_; -
code/branches/cpp11_v3/src/modules/overlays/hud/CountDown.cc
r9943 r11054 71 71 RegisterObject(CountDown); 72 72 73 this->owner_ = 0;73 this->owner_ = nullptr; 74 74 this->hasStopped_ = false; 75 75 } -
code/branches/cpp11_v3/src/modules/overlays/hud/CountDown.h
r9943 r11054 44 44 virtual ~CountDown(); 45 45 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;47 virtual void changedOwner() ;48 virtual void tick(float dt) ;46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 47 virtual void changedOwner() override; 48 virtual void tick(float dt) override; 49 49 50 50 inline void setCounter(float value) -
code/branches/cpp11_v3/src/modules/overlays/hud/DeathMessage.cc
r9667 r11054 40 40 RegisterObject(DeathMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(2.0f); -
code/branches/cpp11_v3/src/modules/overlays/hud/DeathMessage.h
r9667 r11054 43 43 virtual ~DeathMessage() {} 44 44 45 virtual void changedOwner() ;45 virtual void changedOwner() override; 46 46 47 v oid deathmessage(const GametypeInfo* gtinfo, const std::string& message);47 virtual void deathmessage(const GametypeInfo* gtinfo, const std::string& message) override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/GametypeFadingMessage.cc
r9667 r11054 40 40 RegisterObject(GametypeFadingMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 this->setDelay(2.0f); 44 44 this->setFadeouttime(0.5f); -
code/branches/cpp11_v3/src/modules/overlays/hud/GametypeFadingMessage.h
r9667 r11054 43 43 virtual ~GametypeFadingMessage(); 44 44 45 virtual void changedOwner() ;45 virtual void changedOwner() override; 46 46 47 v oid fadingmessage(const GametypeInfo* gtinfo, const std::string& message);47 virtual void fadingmessage(const GametypeInfo* gtinfo, const std::string& message) override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/GametypeStaticMessage.cc
r9667 r11054 42 42 { 43 43 RegisterObject(GametypeStaticMessage); 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 } 46 46 -
code/branches/cpp11_v3/src/modules/overlays/hud/GametypeStaticMessage.h
r9667 r11054 46 46 virtual ~GametypeStaticMessage(); 47 47 48 virtual void changedOwner() ;48 virtual void changedOwner() override; 49 49 50 v oid staticmessage(const GametypeInfo* gtinfo, const std::string& message, const ColourValue& colour);50 virtual void staticmessage(const GametypeInfo* gtinfo, const std::string& message, const ColourValue& colour) override; 51 51 52 52 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDBar.cc
r11052 r11054 219 219 return barColours_[index]; 220 220 else 221 return 0;221 return nullptr; 222 222 } 223 223 -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDBar.h
r11052 r11054 52 52 virtual ~BarColour() { } 53 53 54 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;54 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 55 55 56 56 void setColour(const ColourValue& colour) { this->colour_ = colour; } … … 72 72 virtual ~HUDBar(); 73 73 74 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;74 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 75 75 76 76 void clearColours(); -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDBoostBar.cc
r11052 r11054 42 42 RegisterObject(HUDBoostBar); 43 43 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 this->flashInterval_ = 0.25f; 46 46 this->flashDt_ = 0.0f; -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDBoostBar.h
r9667 r11054 43 43 virtual ~HUDBoostBar(); 44 44 45 virtual void tick(float dt) ;46 virtual void changedOwner() ;45 virtual void tick(float dt) override; 46 virtual void changedOwner() override; 47 47 48 48 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDEnemyHealthBar.cc
r9667 r11054 30 30 31 31 #include "core/config/ConfigValueIncludes.h" 32 #include "core/CoreIncludes.h" 32 33 #include "worldentities/pawns/Pawn.h" 33 34 … … 41 42 42 43 this->setConfigValues(); 43 this->owner_ = 0;44 this->owner_ = nullptr; 44 45 } 45 46 … … 62 63 void HUDEnemyHealthBar::updateTarget() 63 64 { 64 Pawn* pawn = NULL;65 Pawn* pawn = nullptr; 65 66 if (this->owner_ && this->useEnemyBar_) 66 67 { … … 73 74 // Don't show the HealthBar if the pawn is invisible 74 75 if (pawn && !pawn->isVisible()) 75 pawn = NULL;76 pawn = nullptr; 76 77 } 77 78 // Set the pawn as owner of the HealthBar 78 79 this->setHealthBarOwner(pawn); 79 this->setVisible(pawn != NULL);80 this->setVisible(pawn != nullptr); 80 81 } 81 82 -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDEnemyHealthBar.h
r9667 r11054 41 41 42 42 void setConfigValues(); 43 virtual void tick(float dt) ;43 virtual void tick(float dt) override; 44 44 45 v oid changedOwner();45 virtual void changedOwner() override; 46 46 47 47 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDHealthBar.cc
r11052 r11054 43 43 RegisterObject(HUDHealthBar); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 this->bUseBarColour_ = false; 47 47 this->textOffset_ = Vector2(0.0f, 0.0f); … … 66 66 { 67 67 this->textoverlay_->destroy(); 68 this->textoverlay_ = NULL;68 this->textoverlay_ = nullptr; 69 69 } 70 70 } -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDHealthBar.h
r11052 r11054 45 45 virtual ~HUDHealthBar(); 46 46 47 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;48 virtual void tick(float dt) ;49 virtual void changedOwner() ;50 virtual void changedOverlayGroup() ;51 virtual void changedVisibility() ;52 virtual void changedName() ;47 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 48 virtual void tick(float dt) override; 49 virtual void changedOwner() override; 50 virtual void changedOverlayGroup() override; 51 virtual void changedVisibility() override; 52 virtual void changedName() override; 53 53 54 54 inline void setTextFont(const std::string& font) -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDNavigation.cc
r11023 r11054 53 53 #include "core/config/ConfigValueIncludes.h" 54 54 #include "tools/TextureGenerator.h" 55 // #include <boost/bind/bind_template.hpp>56 55 57 56 … … 69 68 RegisterClass ( HUDNavigation ); 70 69 71 HUDNavigation* HUDNavigation::localHUD_s = 0;70 HUDNavigation* HUDNavigation::localHUD_s = nullptr; 72 71 73 72 HUDNavigation::HUDNavigation(Context* context) : … … 132 131 } 133 132 this->fontName_ = font; 134 for ( std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)135 { 136 if ( it->second.text_ != NULL)137 it->second.text_->setFontName(this->fontName_);133 for (const auto& mapEntry : this->activeObjectList_) 134 { 135 if (mapEntry.second.text_ != nullptr) 136 mapEntry.second.text_->setFontName(this->fontName_); 138 137 } 139 138 } … … 152 151 } 153 152 this->textSize_ = size; 154 for ( std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it!=this->activeObjectList_.end(); ++it)155 { 156 if ( it->second.text_)157 it->second.text_->setCharHeight(size);153 for (const auto& mapEntry : this->activeObjectList_) 154 { 155 if (mapEntry.second.text_) 156 mapEntry.second.text_->setCharHeight(size); 158 157 } 159 158 } … … 183 182 184 183 Camera* cam = CameraManager::getInstance().getActiveCamera(); 185 if (cam == NULL)184 if (cam == nullptr) 186 185 return; 187 186 const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix(); 188 187 189 for (std:: list<std::pair<RadarViewable*, unsigned int> >::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt)190 listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);188 for (std::pair<RadarViewable*, unsigned int>& pair : this->sortedObjectList_) 189 pair.second = (int)((pair.first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f); 191 190 192 191 this->sortedObjectList_.sort(compareDistance); … … 209 208 bool nextHasToBeSelected = false; 210 209 211 for (std::list<std::pair<RadarViewable*, unsigned int> 210 for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt) 212 211 { 213 212 … … 469 468 if(!it->second.selected_ 470 469 || it->first->getRVVelocity().squaredLength() == 0 471 || pawn == NULL470 || pawn == nullptr 472 471 /* TODO : improve getTeam in such a way that it works 473 * || humanPawn == NULL472 * || humanPawn == nullptr 474 473 * || pawn->getTeam() == humanPawn->getTeam()*/) 475 474 { … … 525 524 float yScale = this->getActualSize().y; 526 525 527 for ( std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)528 { 529 if ( it->second.health_ != NULL)530 it->second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);531 if ( it->second.healthLevel_ != NULL)532 it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);533 if ( it->second.panel_ != NULL)534 it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);535 if ( it->second.text_ != NULL)536 it->second.text_->setCharHeight(this->textSize_ * yScale);537 if ( it->second.target_ != NULL)538 it->second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);526 for (const auto& mapEntry : this->activeObjectList_) 527 { 528 if (mapEntry.second.health_ != nullptr) 529 mapEntry.second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale); 530 if (mapEntry.second.healthLevel_ != nullptr) 531 mapEntry.second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale); 532 if (mapEntry.second.panel_ != nullptr) 533 mapEntry.second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale); 534 if (mapEntry.second.text_ != nullptr) 535 mapEntry.second.text_->setCharHeight(this->textSize_ * yScale); 536 if (mapEntry.second.target_ != nullptr) 537 mapEntry.second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale); 539 538 } 540 539 } … … 546 545 547 546 if (this->activeObjectList_.size() >= this->markerLimit_) 548 if (object == NULL)547 if (object == nullptr) 549 548 return; 550 549 … … 634 633 } 635 634 636 for (std::list<std::pair<RadarViewable*, unsigned int> 635 for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt) 637 636 { 638 637 if ((listIt->first) == viewable) … … 664 663 { 665 664 const std::set<RadarViewable*>& respawnObjects = this->getOwner()->getScene()->getRadar()->getRadarObjects(); 666 for ( std::set<RadarViewable*>::const_iterator it = respawnObjects.begin(); it != respawnObjects.end(); ++it)667 { 668 if (! (*it)->isHumanShip_)669 this->addObject( *it);665 for (RadarViewable* respawnObject : respawnObjects) 666 { 667 if (!respawnObject->isHumanShip_) 668 this->addObject(respawnObject); 670 669 } 671 670 } -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDNavigation.h
r10291 r11054 51 51 void setConfigValues(); 52 52 53 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;54 virtual void tick(float dt) ;53 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 54 virtual void tick(float dt) override; 55 55 56 56 // RadarListener interface 57 virtual void addObject(RadarViewable* object) ;58 virtual void removeObject(RadarViewable* viewable) ;59 virtual void objectChanged(RadarViewable* viewable) ;57 virtual void addObject(RadarViewable* object) override; 58 virtual void removeObject(RadarViewable* viewable) override; 59 virtual void objectChanged(RadarViewable* viewable) override; 60 60 61 virtual void changedOwner() ;62 virtual void sizeChanged() ;63 virtual void angleChanged() { }64 virtual void positionChanged() { }65 virtual void radarTick(float dt) {}61 virtual void changedOwner() override; 62 virtual void sizeChanged() override; 63 virtual void angleChanged() override { } 64 virtual void positionChanged() override { } 65 virtual void radarTick(float dt) override {} 66 66 67 inline float getRadarSensitivity() const67 virtual inline float getRadarSensitivity() const override 68 68 { return 1.0f; } 69 69 … … 141 141 142 142 std::map<RadarViewable*, ObjectInfo> activeObjectList_; 143 std::list<std::pair<RadarViewable*, unsigned int> 143 std::list<std::pair<RadarViewable*, unsigned int>> sortedObjectList_; 144 144 145 145 float healthMarkerSize_; -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDRadar.cc
r11052 r11054 68 68 this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png"; 69 69 this->shapeMaterials_[RadarViewable::Square] = "RadarSquare.png"; 70 this->owner_ = 0;70 this->owner_ = nullptr; 71 71 72 72 this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() … … 92 92 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->map3DBack_); 93 93 94 for (std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it = this->radarObjects_.begin(); 95 it != this->radarObjects_.end(); ++it) 96 { 97 Ogre::OverlayManager::getSingleton().destroyOverlayElement(it->second); 94 for (const auto& mapEntry : this->radarObjects_) 95 { 96 Ogre::OverlayManager::getSingleton().destroyOverlayElement(mapEntry.second); 98 97 } 99 98 } … … 166 165 { 167 166 const std::set<RadarViewable*>& objectSet = this->getCreator()->getScene()->getRadar()->getRadarObjects(); 168 std::set<RadarViewable*>::const_iterator it; 169 for( it=objectSet.begin(); it!=objectSet.end(); ++it ) 170 this->addObject(*it); 167 for( RadarViewable* viewable : objectSet ) 168 this->addObject(viewable); 171 169 this->radarTick(0); 172 170 } … … 184 182 185 183 // update the distances for all objects 186 std::map<RadarViewable*,Ogre::PanelOverlayElement*>::iterator it;187 188 184 189 185 if(RadarMode_) … … 202 198 } 203 199 204 for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it)200 for( const auto& mapEntry : this->radarObjects_ ) 205 201 { 206 202 // Make sure the object really is a WorldEntity 207 const WorldEntity* wePointer = it->first->getWorldEntity();203 const WorldEntity* wePointer = mapEntry.first->getWorldEntity(); 208 204 if( !wePointer ) 209 205 { … … 211 207 assert(0); 212 208 } 213 bool isFocus = ( it->first == focusObject);209 bool isFocus = (mapEntry.first == focusObject); 214 210 // set size to fit distance... 215 211 float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length(); … … 218 214 float size; 219 215 if(RadarMode_) 220 size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();216 size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale(); 221 217 else 222 size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();223 it->second->setDimensions(size, size);218 size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * mapEntry.first->getRadarObjectScale(); 219 mapEntry.second->setDimensions(size, size); 224 220 225 221 // calc position on radar... … … 235 231 int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_); 236 232 if(overXZPlain == false /*&& (it->second->getZOrder() > 100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay 237 it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);233 mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder); 238 234 if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/) 239 it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);235 mapEntry.second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder); 240 236 } 241 237 else … … 243 239 244 240 coord *= math::pi / 3.5f; // small adjustment to make it fit the texture 245 it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);241 mapEntry.second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f); 246 242 247 243 if( distance < detectionLimit_ || detectionLimit_ < 0 ) 248 it->second->show();244 mapEntry.second->show(); 249 245 else 250 it->second->hide();246 mapEntry.second->hide(); 251 247 252 248 // if this object is in focus, then set the focus marker … … 256 252 this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f); 257 253 if(RadarMode_) 258 this->marker_->_notifyZOrder( it->second->getZOrder() -1);254 this->marker_->_notifyZOrder(mapEntry.second->getZOrder() -1); 259 255 this->marker_->show(); 260 256 } -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDRadar.h
r9945 r11054 50 50 virtual ~HUDRadar(); 51 51 52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;53 virtual void changedOwner() ;52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 53 virtual void changedOwner() override; 54 54 void setConfigValues(); 55 55 … … 80 80 void set3DMaterialBack(std::string material3DBack) { this->material3DBack_ = material3DBack; } 81 81 82 float getRadarSensitivity() const{ return this->sensitivity_; }82 virtual float getRadarSensitivity() const override { return this->sensitivity_; } 83 83 // used also by RadarListener interface! 84 84 void setRadarSensitivity(float sensitivity) { this->sensitivity_ = sensitivity; } … … 89 89 90 90 // RadarListener interface 91 virtual void addObject(RadarViewable* viewable) ;92 virtual void removeObject(RadarViewable* viewable) ;93 virtual void objectChanged( RadarViewable* rv ) ;94 v oid radarTick(float dt);91 virtual void addObject(RadarViewable* viewable) override; 92 virtual void removeObject(RadarViewable* viewable) override; 93 virtual void objectChanged( RadarViewable* rv ) override; 94 virtual void radarTick(float dt) override; 95 95 bool showObject( RadarViewable* rv ); //!< Do not display an object on radar, if showObject(.) is false. 96 96 -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDSpeedBar.cc
r9667 r11054 43 43 RegisterObject(HUDSpeedBar); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 } 47 47 -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDSpeedBar.h
r9667 r11054 44 44 virtual ~HUDSpeedBar(); 45 45 46 virtual void tick(float dt) ;47 virtual void changedOwner() ;46 virtual void tick(float dt) override; 47 virtual void changedOwner() override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDTimer.cc
r9667 r11054 42 42 RegisterObject(HUDTimer); 43 43 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 } 46 46 -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDTimer.h
r9667 r11054 43 43 virtual ~HUDTimer(); 44 44 45 virtual void tick(float dt) ;45 virtual void tick(float dt) override; 46 46 47 virtual void changedOwner() ;47 virtual void changedOwner() override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDWeapon.cc
r11052 r11054 141 141 void HUDWeapon::updateWeaponModeList() 142 142 { 143 if (owner_ == NULL || weapon_ == NULL)143 if (owner_ == nullptr || weapon_ == nullptr) 144 144 { 145 145 return; -
code/branches/cpp11_v3/src/modules/overlays/hud/HUDWeaponSystem.cc
r11052 r11054 117 117 void HUDWeaponSystem::updateWeaponList() 118 118 { 119 if (owner_ == NULL)119 if (owner_ == nullptr) 120 120 { 121 121 return; -
code/branches/cpp11_v3/src/modules/overlays/hud/KillMessage.cc
r9667 r11054 40 40 RegisterObject(KillMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(2.0f); -
code/branches/cpp11_v3/src/modules/overlays/hud/KillMessage.h
r9667 r11054 43 43 virtual ~KillMessage() {} 44 44 45 virtual void changedOwner() ;45 virtual void changedOwner() override; 46 46 47 v oid killmessage(const GametypeInfo* gtinfo, const std::string& message);47 virtual void killmessage(const GametypeInfo* gtinfo, const std::string& message) override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/LastManStandingInfos.cc
r10624 r11054 43 43 RegisterObject(LastManStandingInfos); 44 44 45 this->lms_ = 0;46 this->player_ = 0;45 this->lms_ = nullptr; 46 this->player_ = nullptr; 47 47 this->bShowLives_ = false; 48 48 this->bShowPlayers_ = false; … … 91 91 else 92 92 { 93 this->player_ = 0;94 this->lms_ = 0;93 this->player_ = nullptr; 94 this->lms_ = nullptr; 95 95 } 96 96 } -
code/branches/cpp11_v3/src/modules/overlays/hud/LastManStandingInfos.h
r9667 r11054 43 43 virtual ~LastManStandingInfos(); 44 44 45 virtual void tick(float dt) ;46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;47 virtual void changedOwner() ;45 virtual void tick(float dt) override; 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 47 virtual void changedOwner() override; 48 48 49 49 inline void setShowLives(bool value) -
code/branches/cpp11_v3/src/modules/overlays/hud/LastTeamStandingInfos.cc
r10624 r11054 43 43 RegisterObject(LastTeamStandingInfos); 44 44 45 this->lts_ = 0;46 this->player_ = 0;45 this->lts_ = nullptr; 46 this->player_ = nullptr; 47 47 this->bShowLives_ = false; 48 48 this->bShowTeams_ = false; … … 91 91 else 92 92 { 93 this->player_ = 0;94 this->lts_ = 0;93 this->player_ = nullptr; 94 this->lts_ = nullptr; 95 95 } 96 96 } -
code/branches/cpp11_v3/src/modules/overlays/hud/LastTeamStandingInfos.h
r9667 r11054 43 43 virtual ~LastTeamStandingInfos(); 44 44 45 virtual void tick(float dt) ;46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;47 virtual void changedOwner() ;45 virtual void tick(float dt) override; 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 47 virtual void changedOwner() override; 48 48 49 49 inline void setShowLives(bool value) -
code/branches/cpp11_v3/src/modules/overlays/hud/PauseNotice.cc
r9667 r11054 40 40 RegisterObject(PauseNotice); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 } 44 44 -
code/branches/cpp11_v3/src/modules/overlays/hud/PauseNotice.h
r9667 r11054 42 42 PauseNotice(Context* context); 43 43 44 virtual void changedOwner() ;44 virtual void changedOwner() override; 45 45 46 46 protected: 47 virtual void changedTimeFactor(float factor_new, float factor_old) ;47 virtual void changedTimeFactor(float factor_new, float factor_old) override; 48 48 49 49 private: -
code/branches/cpp11_v3/src/modules/overlays/hud/TeamBaseMatchScore.cc
r10624 r11054 43 43 RegisterObject(TeamBaseMatchScore); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 47 47 this->bShowBases_ = false; … … 120 120 this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype()); 121 121 else 122 this->owner_ = 0;122 this->owner_ = nullptr; 123 123 } 124 124 } -
code/branches/cpp11_v3/src/modules/overlays/hud/TeamBaseMatchScore.h
r9667 r11054 43 43 virtual ~TeamBaseMatchScore(); 44 44 45 virtual void tick(float dt) ;46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) ;47 virtual void changedOwner() ;45 virtual void tick(float dt) override; 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; 47 virtual void changedOwner() override; 48 48 49 49 inline void setShowBases(bool value)
Note: See TracChangeset
for help on using the changeset viewer.