Changeset 10765 for code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
r10624 r10765 72 72 this->starttimer_.stopTimer(); 73 73 74 this->player_ = NULL;74 this->player_ = nullptr; 75 75 this->setHUDTemplate("TetrisHUD"); 76 76 this->futureBrick_ = 0; … … 113 113 SUPER(Tetris, tick, dt); 114 114 115 if((this->activeBrick_ != NULL)&&(!this->hasEnded()))115 if((this->activeBrick_ != nullptr)&&(!this->hasEnded())) 116 116 { 117 117 if(!this->isValidBrickPosition(this->activeBrick_)) … … 290 290 void Tetris::start() 291 291 { 292 if (this->center_ != NULL) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.292 if (this->center_ != nullptr) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place. 293 293 { 294 294 // Create the first brick. … … 323 323 { 324 324 this->activeBrick_->setVelocity(Vector3::ZERO); 325 if(this->activeBrick_ != NULL)325 if(this->activeBrick_ != nullptr) 326 326 { 327 327 this->player_->stopControl(); … … 351 351 if(player && player->isHumanPlayer()) 352 352 { 353 if(this->activeBrick_ != NULL)353 if(this->activeBrick_ != nullptr) 354 354 { 355 355 this->player_->stopControl(); … … 370 370 assert(player); 371 371 372 if(this->player_ == NULL)372 if(this->player_ == nullptr) 373 373 { 374 374 this->player_ = player; … … 381 381 void Tetris::startBrick(void) 382 382 { 383 if(this->player_ == NULL)383 if(this->player_ == nullptr) 384 384 return; 385 385 386 386 unsigned int cameraIndex = 0; 387 if(this->activeBrick_ != NULL)387 if(this->activeBrick_ != nullptr) 388 388 { 389 389 // Get camera settings … … 437 437 Get the player. 438 438 @return 439 Returns a pointer to the player. If there is no player, NULLis returned.439 Returns a pointer to the player. If there is no player, nullptr is returned. 440 440 */ 441 441 PlayerInfo* Tetris::getPlayer(void) const
Note: See TracChangeset
for help on using the changeset viewer.