Changeset 10555 for code/branches/core7/src/modules
- Timestamp:
- Aug 29, 2015, 5:35:59 PM (9 years ago)
- Location:
- code/branches/core7/src/modules
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/modules/overlays/hud/HUDHealthBar.h
r9667 r10555 115 115 private: 116 116 WeakPtr<Pawn> owner_; 117 S martPtr<OverlayText> textoverlay_;117 StrongPtr<OverlayText> textoverlay_; 118 118 bool bUseBarColour_; 119 119 ColourValue textColour_; -
code/branches/core7/src/modules/pickup/PickupSpawner.cc
r9667 r10555 145 145 if(GameMode::isMaster() && this->isActive()) 146 146 { 147 WeakPtr<PickupSpawner> spawner = this; // Create a smart pointer to keep the PickupSpawner alive until we iterated through all Pawns (in case a Pawn takes the last pickup) 147 // TODO: why is this a WeakPtr when the comment says StrongPtr? 148 WeakPtr<PickupSpawner> spawner = this; // Create a strong pointer to keep the PickupSpawner alive until we iterated through all Pawns (in case a Pawn takes the last pickup) 148 149 149 150 // Remove PickupCarriers from the blocked list if they have exceeded their time. -
code/branches/core7/src/modules/pickup/items/ShrinkPickup.cc
r9667 r10555 182 182 183 183 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 184 const std::list< S martPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();184 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions(); 185 185 int size = cameraPositions.size(); 186 186 for(int index = 0; index < size; index++) … … 208 208 209 209 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 210 const std::list< S martPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();210 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions(); 211 211 int size = cameraPositions.size(); 212 212 for(int index = 0; index < size; index++) … … 263 263 264 264 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 265 const std::list< S martPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();265 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions(); 266 266 int size = cameraPositions.size(); 267 267 for(int index = 0; index < size; index++) … … 304 304 305 305 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 306 const std::list< S martPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions();306 const std::list< StrongPtr<CameraPosition> >& cameraPositions = pawn->getCameraPositions(); 307 307 int size = cameraPositions.size(); 308 308 for(int index = 0; index < size; index++) -
code/branches/core7/src/modules/tetris/Tetris.cc
r9834 r10555 104 104 } 105 105 106 for (std::list<S martPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)106 for (std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 107 107 (*it)->destroy(); 108 108 this->stones_.clear(); … … 136 136 return false; 137 137 138 for(std::list<S martPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)138 for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 139 139 { 140 140 const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone … … 192 192 193 193 // check for collisions with all stones 194 for(std::list<S martPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)194 for(std::list<StrongPtr<TetrisStone> >::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 195 195 { 196 196 //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount()); … … 469 469 { 470 470 stonesPerRow = 0; 471 for(std::list<S martPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )472 { 473 std::list<S martPtr<TetrisStone> >::iterator it_temp = it++;471 for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ) 472 { 473 std::list<StrongPtr<TetrisStone> >::iterator it_temp = it++; 474 474 correctPosition = static_cast<unsigned int>(((*it_temp)->getPosition().y - 5)/this->center_->getStoneSize()); 475 475 if(correctPosition == row) … … 491 491 void Tetris::clearRow(unsigned int row) 492 492 {// clear the full row 493 for(std::list<S martPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); )493 for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ) 494 494 { 495 495 if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row) … … 502 502 } 503 503 // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug. 504 for(std::list<S martPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it)504 for(std::list<StrongPtr<TetrisStone> >::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 505 505 { 506 506 if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row) -
code/branches/core7/src/modules/tetris/Tetris.h
r9833 r10555 94 94 95 95 WeakPtr<TetrisCenterpoint> center_; //!< The playing field. 96 std::list<S martPtr<TetrisStone> > stones_; //!< A list of all stones in play.96 std::list<StrongPtr<TetrisStone> > stones_; //!< A list of all stones in play. 97 97 WeakPtr<TetrisBrick> activeBrick_; 98 98 WeakPtr<TetrisBrick> futureBrick_;
Note: See TracChangeset
for help on using the changeset viewer.