Changeset 6320 for code/branches/presentation2/src
- Timestamp:
- Dec 11, 2009, 2:05:00 AM (15 years ago)
- Location:
- code/branches/presentation2/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/util/Serialise.h
r6192 r6320 549 549 return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) && 550 550 checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) && 551 checkEquality(variable. y, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));551 checkEquality(variable.z, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y)); 552 552 } 553 553 … … 579 579 return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) && 580 580 checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) && 581 checkEquality(variable. y, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));581 checkEquality(variable.z, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y)); 582 582 } 583 583 -
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
r6316 r6320 62 62 , crossHairOverlay_(NULL) 63 63 , centerOverlay_(NULL) 64 , arrowsOverlay1_(NULL) 65 , arrowsOverlay2_(NULL) 66 , arrowsOverlay3_(NULL) 67 , arrowsOverlay4_(NULL) 68 , damageOverlayTop_(NULL) 69 , damageOverlayRight_(NULL) 70 , damageOverlayBottom_(NULL) 71 , damageOverlayLeft_(NULL) 72 , damageOverlayTT_(0) 64 73 { 65 74 RegisterObject(NewHumanController); … … 560 569 561 570 void NewHumanController::showOverlays() { 571 if( !GameMode::showsGraphics() ) 572 return; 562 573 this->crossHairOverlay_->show(); 563 574 this->centerOverlay_->show(); … … 572 583 573 584 void NewHumanController::hideOverlays() { 585 if( !GameMode::showsGraphics() ) 586 return; 574 587 this->crossHairOverlay_->hide(); 575 588 this->centerOverlay_->hide(); … … 586 599 587 600 void NewHumanController::hideArrows() { 601 if( !GameMode::showsGraphics() ) 602 return; 588 603 if (showArrows_) { 589 604 this->arrowsOverlay1_->hide(); -
code/branches/presentation2/src/orxonox/sound/AmbientSound.cc
r6307 r6320 58 58 { 59 59 registerVariable(volume_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::volumeChanged)); 60 // registerVariable(source_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::sourceChanged));61 60 registerVariable(ambientSource_, ObjectDirection::ToClient, new NetworkCallback<AmbientSound>(this, &AmbientSound::ambientSourceChanged)); 62 61 registerVariable(bLooping_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::loopingChanged)); 63 62 registerVariable(pitch_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::pitchChanged)); 64 registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient );63 registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::stateChanged)); 65 64 } 66 65 … … 84 83 SoundManager::getInstance().registerAmbientSound(this); 85 84 } 85 else 86 BaseSound::play(); 86 87 } 87 88 … … 97 98 SoundManager::getInstance().unregisterAmbientSound(this); 98 99 } 100 else 101 BaseSound::stop(); 99 102 } 100 103 … … 110 113 SoundManager::getInstance().pauseAmbientSound(this); 111 114 } 115 else 116 BaseSound::pause(); 112 117 } 113 118 … … 136 141 } 137 142 138 void AmbientSound::changedActivity() 143 void AmbientSound::changedActivity() 139 144 { 140 145 SUPER(AmbientSound, changedActivity); -
code/branches/presentation2/src/orxonox/sound/BaseSound.cc
r6307 r6320 221 221 alSourcePause(this->audioSource_); 222 222 } 223 224 void BaseSound::stateChanged() 225 { 226 CCOUT(0) << "changed state to " << this->state_ << endl; 227 switch( this->state_ ) 228 { 229 case Playing: 230 this->play(); 231 break; 232 case Paused: 233 this->pause(); 234 break; 235 case Stopped: 236 default: 237 this->stop(); 238 break; 239 } 240 } 223 241 } -
code/branches/presentation2/src/orxonox/sound/BaseSound.h
r6307 r6320 59 59 virtual void pause(); 60 60 61 bool isPlaying() { return this->state_ == Playing; }62 bool isPaused() { return this->state_ == Paused; }63 bool isStopped() { return this->state_ == Stopped; }61 bool isPlaying() const { return this->state_ == Playing; } 62 bool isPaused() const { return this->state_ == Paused; } 63 bool isStopped() const { return this->state_ == Stopped; } 64 64 65 65 void setPlaying(bool val) … … 84 84 void setPitch(float pitch); 85 85 inline void pitchChanged(){ this->setPitch(this->pitch_); } 86 87 void stateChanged(); 86 88 87 89 //ALuint getALAudioSource(void); -
code/branches/presentation2/src/orxonox/sound/WorldSound.cc
r6307 r6320 60 60 registerVariable(source_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::sourceChanged)); 61 61 registerVariable(bLooping_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::loopingChanged)); 62 registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient );62 registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::stateChanged)); 63 63 registerVariable(pitch_, ObjectDirection::ToClient, new NetworkCallback<BaseSound>(static_cast<BaseSound*>(this), &BaseSound::pitchChanged)); 64 64 }
Note: See TracChangeset
for help on using the changeset viewer.