Changeset 6502 for code/trunk/src/orxonox
- Timestamp:
- Mar 11, 2010, 11:34:20 AM (15 years ago)
- Location:
- code/trunk/src/orxonox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/controllers/ArtificialController.cc
r6417 r6502 65 65 { 66 66 // Multiply with 0.8 to make them a bit slower 67 this->getControllableEntity()->rotateYaw(-0.8 * sgn(coord.x) * coord.x*coord.x);68 this->getControllableEntity()->rotatePitch(0.8 * sgn(coord.y) * coord.y*coord.y);67 this->getControllableEntity()->rotateYaw(-0.8f * sgn(coord.x) * coord.x*coord.x); 68 this->getControllableEntity()->rotatePitch(0.8f * sgn(coord.y) * coord.y*coord.y); 69 69 } 70 70 71 71 if (this->target_ && distance < 200 && this->getControllableEntity()->getVelocity().squaredLength() > this->target_->getVelocity().squaredLength()) 72 this->getControllableEntity()->moveFrontBack(-0.5 ); // They don't brake with full power to give the player a chance72 this->getControllableEntity()->moveFrontBack(-0.5f); // They don't brake with full power to give the player a chance 73 73 else 74 this->getControllableEntity()->moveFrontBack(0.8 );74 this->getControllableEntity()->moveFrontBack(0.8f); 75 75 } 76 76 -
code/trunk/src/orxonox/controllers/NewHumanController.cc
r6501 r6502 74 74 RegisterObject(NewHumanController); 75 75 76 overlaySize_ = 0.08 ;77 arrowsSize_ = 0.4 ;78 79 damageOverlayTime_ = 0.6 ;76 overlaySize_ = 0.08f; 77 arrowsSize_ = 0.4f; 78 79 damageOverlayTime_ = 0.6f; 80 80 81 81 controlMode_ = 0; … … 101 101 centerOverlay_ = new OrxonoxOverlay(this); 102 102 centerOverlay_->setBackgroundMaterial("Orxonox/CenterOverlay"); 103 centerOverlay_->setSize(Vector2(overlaySize_ * 2.5 , overlaySize_ * 2.5));104 centerOverlay_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));103 centerOverlay_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f)); 104 centerOverlay_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f)); 105 105 centerOverlay_->hide(); 106 106 … … 109 109 damageOverlayTop_ = new OrxonoxOverlay(this); 110 110 damageOverlayTop_->setBackgroundMaterial("Orxonox/DamageOverlayTop"); 111 damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5 , overlaySize_ * 2.5));112 damageOverlayTop_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));111 damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f)); 112 damageOverlayTop_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f)); 113 113 damageOverlayTop_->hide(); 114 114 115 115 damageOverlayRight_ = new OrxonoxOverlay(this); 116 116 damageOverlayRight_->setBackgroundMaterial("Orxonox/DamageOverlayRight"); 117 damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5 , overlaySize_ * 2.5));118 damageOverlayRight_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));117 damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f)); 118 damageOverlayRight_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f)); 119 119 damageOverlayRight_->hide(); 120 120 121 121 damageOverlayBottom_ = new OrxonoxOverlay(this); 122 122 damageOverlayBottom_->setBackgroundMaterial("Orxonox/DamageOverlayBottom"); 123 damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5 , overlaySize_ * 2.5));124 damageOverlayBottom_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));123 damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f)); 124 damageOverlayBottom_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f)); 125 125 damageOverlayBottom_->hide(); 126 126 127 127 damageOverlayLeft_ = new OrxonoxOverlay(this); 128 128 damageOverlayLeft_->setBackgroundMaterial("Orxonox/DamageOverlayLeft"); 129 damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5 , overlaySize_ * 2.5));130 damageOverlayLeft_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));129 damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f)); 130 damageOverlayLeft_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f)); 131 131 damageOverlayLeft_->hide(); 132 132 } … … 136 136 arrowsOverlay1_ = new OrxonoxOverlay(this); 137 137 arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1"); 138 arrowsOverlay1_->setSize(Vector2(0.02727 , 0.36* arrowsSize_));139 arrowsOverlay1_->setPickPoint(Vector2(0.5 , 0.5));140 arrowsOverlay1_->setPosition(Vector2(0.5 , 0.5));138 arrowsOverlay1_->setSize(Vector2(0.02727f, 0.36f * arrowsSize_)); 139 arrowsOverlay1_->setPickPoint(Vector2(0.5f, 0.5f)); 140 arrowsOverlay1_->setPosition(Vector2(0.5f, 0.5f)); 141 141 arrowsOverlay1_->hide(); 142 142 143 143 arrowsOverlay2_ = new OrxonoxOverlay(this); 144 144 arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2"); 145 arrowsOverlay2_->setSize(Vector2(0.02727 , 0.59* arrowsSize_));146 arrowsOverlay2_->setPickPoint(Vector2(0.5 , 0.5));147 arrowsOverlay2_->setPosition(Vector2(0.5 , 0.5));145 arrowsOverlay2_->setSize(Vector2(0.02727f, 0.59f * arrowsSize_)); 146 arrowsOverlay2_->setPickPoint(Vector2(0.5f, 0.5f)); 147 arrowsOverlay2_->setPosition(Vector2(0.5f, 0.5f)); 148 148 arrowsOverlay2_->hide(); 149 149 150 150 arrowsOverlay3_ = new OrxonoxOverlay(this); 151 151 arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3"); 152 arrowsOverlay3_->setSize(Vector2(0.02727 , 0.77* arrowsSize_));153 arrowsOverlay3_->setPickPoint(Vector2(0.5 , 0.5));154 arrowsOverlay3_->setPosition(Vector2(0.5 , 0.5));152 arrowsOverlay3_->setSize(Vector2(0.02727f, 0.77f * arrowsSize_)); 153 arrowsOverlay3_->setPickPoint(Vector2(0.5f, 0.5f)); 154 arrowsOverlay3_->setPosition(Vector2(0.5f, 0.5f)); 155 155 arrowsOverlay3_->hide(); 156 156 157 157 arrowsOverlay4_ = new OrxonoxOverlay(this); 158 158 arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4"); 159 arrowsOverlay4_->setSize(Vector2(0.02727 , arrowsSize_));160 arrowsOverlay4_->setPickPoint(Vector2(0.5 , 0.5));161 arrowsOverlay4_->setPosition(Vector2(0.5 , 0.5));159 arrowsOverlay4_->setSize(Vector2(0.02727f, arrowsSize_)); 160 arrowsOverlay4_->setPickPoint(Vector2(0.5f, 0.5f)); 161 arrowsOverlay4_->setPosition(Vector2(0.5f, 0.5f)); 162 162 arrowsOverlay4_->hide(); 163 163 } … … 213 213 this->showOverlays(); 214 214 215 this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5 -overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2));215 this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5f-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5f-overlaySize_/2)); 216 216 217 217 if (this->controlMode_ == 0 || (this->controlMode_ == 1 && this->firemode_ == 1)) … … 299 299 relativeHit.normalise(); 300 300 301 float threshold = 0.3 ;301 float threshold = 0.3f; 302 302 if (relativeHit.x > threshold) // Left 303 303 { … … 343 343 Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray()); 344 344 345 Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getOgreCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5 , static_cast<float>(this->currentPitch_)/2*-1+.5);345 Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getOgreCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5f, static_cast<float>(this->currentPitch_)/2*-1+.5f); 346 346 347 347 rsq->setRay(mouseRay); … … 505 505 float distance = sqrt(pow(static_cast<float>(this->currentYaw_)/2*-1,2) + pow(static_cast<float>(this->currentPitch_)/2*-1,2)); 506 506 507 if (distance > 0.04 && distance <= 0.59 * arrowsSize_ / 2.0)508 { 509 this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0 * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));507 if (distance > 0.04f && distance <= 0.59f * arrowsSize_ / 2.0f ) 508 { 509 this->arrowsOverlay1_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f)); 510 510 this->arrowsOverlay1_->show(); 511 511 } 512 else if (distance > 0.59 * arrowsSize_ / 2.0 && distance <= 0.77 * arrowsSize_ / 2.0)513 { 514 this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0 * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));512 else if (distance > 0.59f * arrowsSize_ / 2.0f && distance <= 0.77f * arrowsSize_ / 2.0f ) 513 { 514 this->arrowsOverlay2_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f)); 515 515 this->arrowsOverlay2_->show(); 516 516 } 517 else if (distance > 0.77 * arrowsSize_ / 2.0 && distance <= arrowsSize_ / 2.0)518 { 519 this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0 * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));517 else if (distance > 0.77f * arrowsSize_ / 2.0f && distance <= arrowsSize_ / 2.0f) 518 { 519 this->arrowsOverlay3_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f)); 520 520 this->arrowsOverlay3_->show(); 521 521 } 522 else if (distance > arrowsSize_ / 2.0 )523 { 524 this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0 * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f));522 else if (distance > arrowsSize_ / 2.0f) 523 { 524 this->arrowsOverlay4_->setRotation(Degree(-90 + -1.0f * atan2(static_cast<float>(this->currentPitch_)/2*-1, static_cast<float>(this->currentYaw_)/2*-1) / (2.0f * Ogre::Math::PI) * 360.0f)); 525 525 this->arrowsOverlay4_->show(); 526 526 } -
code/trunk/src/orxonox/controllers/WaypointPatrolController.cc
r5929 r6502 68 68 this->moveToTargetPosition(); 69 69 70 if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0 ))70 if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f)) 71 71 this->getControllableEntity()->fire(0); 72 72 } … … 85 85 86 86 Vector3 myposition = this->getControllableEntity()->getPosition(); 87 float shortestsqdistance = static_cast<unsigned int>(-1);87 float shortestsqdistance = (float)static_cast<unsigned int>(-1); 88 88 89 89 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) -
code/trunk/src/orxonox/overlays/InGameConsole.cc
r6417 r6502 200 200 this->consoleOverlayBorder_->setBorderSize(16, 16, 0, 16); 201 201 this->consoleOverlayBorder_->setBorderMaterialName("ConsoleBorder"); 202 this->consoleOverlayBorder_->setLeftBorderUV(0.0 , 0.49, 0.5, 0.51);203 this->consoleOverlayBorder_->setRightBorderUV(0.5 , 0.49, 1.0, 0.5);204 this->consoleOverlayBorder_->setBottomBorderUV(0.49 , 0.5, 0.51, 1.0);205 this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0 , 0.5, 0.5, 1.0);206 this->consoleOverlayBorder_->setBottomRightBorderUV(0.5 , 0.5, 1.0, 1.0);202 this->consoleOverlayBorder_->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f); 203 this->consoleOverlayBorder_->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f); 204 this->consoleOverlayBorder_->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f); 205 this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f); 206 this->consoleOverlayBorder_->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f); 207 207 this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_); 208 208 … … 254 254 // move overlay "above" the top edge of the screen 255 255 // we take -1.3 because the border makes the panel bigger 256 this->consoleOverlayContainer_->setTop(-1.3 * this->relativeHeight);256 this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight); 257 257 258 258 COUT(4) << "Info: InGameConsole initialized" << std::endl; … … 332 332 333 333 this->consoleOverlayCursor_->setCaption(std::string(pos,' ') + cursorSymbol_); 334 this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24 );334 this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24.0f); 335 335 } 336 336 … … 369 369 // enlarge oldTop a little bit so that this exponential function 370 370 // reaches 0 before infinite time has passed... 371 float deltaScroll = (oldTop - 0.01 ) * time.getDeltaTime() * this->scrollSpeed_;371 float deltaScroll = (oldTop - 0.01f) * time.getDeltaTime() * this->scrollSpeed_; 372 372 if (oldTop - deltaScroll >= 0) 373 373 { … … 384 384 // scrolling up 385 385 // note: +0.01 for the same reason as when scrolling down 386 float deltaScroll = (1.3 * this->relativeHeight + 0.01+ oldTop) * time.getDeltaTime() * this->scrollSpeed_;386 float deltaScroll = (1.3f * this->relativeHeight + 0.01f + oldTop) * time.getDeltaTime() * this->scrollSpeed_; 387 387 if (oldTop - deltaScroll <= -1.3 * this->relativeHeight) 388 388 { 389 389 // window has completely scrolled up 390 this->consoleOverlayContainer_->setTop(-1.3 * this->relativeHeight);390 this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight); 391 391 this->scroll_ = 0; 392 392 this->consoleOverlay_->hide(); … … 424 424 this->windowW_ = newWidth; 425 425 this->windowH_ = newHeight; 426 this->consoleOverlayBorder_->setWidth( static_cast<int>(this->windowW_* this->relativeWidth));427 this->consoleOverlayBorder_->setHeight( static_cast<int>(this->windowH_ * this->relativeHeight));428 this->consoleOverlayNoise_->setWidth( static_cast<int>(this->windowW_ * this->relativeWidth) - 10);429 this->consoleOverlayNoise_->setHeight( static_cast<int>(this->windowH_ * this->relativeHeight) - 5);426 this->consoleOverlayBorder_->setWidth((float)(int)(this->windowW_* this->relativeWidth)); 427 this->consoleOverlayBorder_->setHeight((float)(int)(this->windowH_ * this->relativeHeight)); 428 this->consoleOverlayNoise_->setWidth((float)(int)(this->windowW_ * this->relativeWidth) - 10.0f); 429 this->consoleOverlayNoise_->setHeight((float)(int)(this->windowH_ * this->relativeHeight) - 5.0f); 430 430 this->consoleOverlayNoise_->setTiling(consoleOverlayNoise_->getWidth() / (50.0f * this->noiseSize_), consoleOverlayNoise_->getHeight() / (50.0f * this->noiseSize_)); 431 431 … … 440 440 for (int i = 0; i < LINES; i++) 441 441 { 442 this->consoleOverlayTextAreas_[i]->setWidth( this->desiredTextWidth_);443 this->consoleOverlayTextAreas_[i]->setTop( static_cast<int>(this->windowH_ * this->relativeHeight) - 24 - 14*i);442 this->consoleOverlayTextAreas_[i]->setWidth((float)this->desiredTextWidth_); 443 this->consoleOverlayTextAreas_[i]->setTop((float)(int)(this->windowH_ * this->relativeHeight) - 24 - 14*i); 444 444 } 445 445 … … 556 556 switch (type) 557 557 { 558 case Shell::Error: colourTop = ColourValue(0.95 , 0.25, 0.25, 1.00);559 colourBottom = ColourValue(1.00 , 0.50, 0.50, 1.00); break;560 561 case Shell::Warning: colourTop = ColourValue(0.95 , 0.50, 0.20, 1.00);562 colourBottom = ColourValue(1.00 , 0.70, 0.50, 1.00); break;563 564 case Shell::Info: colourTop = ColourValue(0.50 , 0.50, 0.95, 1.00);565 colourBottom = ColourValue(0.80 , 0.80, 1.00, 1.00); break;566 567 case Shell::Debug: colourTop = ColourValue(0.65 , 0.48, 0.44, 1.00);568 colourBottom = ColourValue(1.00 , 0.90, 0.90, 1.00); break;569 570 case Shell::Verbose: colourTop = ColourValue(0.40 , 0.20, 0.40, 1.00);571 colourBottom = ColourValue(0.80 , 0.60, 0.80, 1.00); break;572 573 case Shell::Ultra: colourTop = ColourValue(0.21 , 0.69, 0.21, 1.00);574 colourBottom = ColourValue(0.80 , 1.00, 0.80, 1.00); break;575 576 case Shell::Command: colourTop = ColourValue(0.80 , 0.80, 0.80, 1.00);577 colourBottom = ColourValue(0.90 , 0.90, 0.90, 0.90); break;578 579 case Shell::Hint: colourTop = ColourValue(0.80 , 0.80, 0.80, 1.00);580 colourBottom = ColourValue(0.90 , 0.90, 0.90, 1.00); break;581 582 default: colourTop = ColourValue(0.90 , 0.90, 0.90, 1.00);583 colourBottom = ColourValue(1.00 , 1.00, 1.00, 1.00); break;558 case Shell::Error: colourTop = ColourValue(0.95f, 0.25f, 0.25f, 1.00f); 559 colourBottom = ColourValue(1.00f, 0.50f, 0.50f, 1.00f); break; 560 561 case Shell::Warning: colourTop = ColourValue(0.95f, 0.50f, 0.20f, 1.00f); 562 colourBottom = ColourValue(1.00f, 0.70f, 0.50f, 1.00f); break; 563 564 case Shell::Info: colourTop = ColourValue(0.50f, 0.50f, 0.95f, 1.00f); 565 colourBottom = ColourValue(0.80f, 0.80f, 1.00f, 1.00f); break; 566 567 case Shell::Debug: colourTop = ColourValue(0.65f, 0.48f, 0.44f, 1.00f); 568 colourBottom = ColourValue(1.00f, 0.90f, 0.90f, 1.00f); break; 569 570 case Shell::Verbose: colourTop = ColourValue(0.40f, 0.20f, 0.40f, 1.00f); 571 colourBottom = ColourValue(0.80f, 0.60f, 0.80f, 1.00f); break; 572 573 case Shell::Ultra: colourTop = ColourValue(0.21f, 0.69f, 0.21f, 1.00f); 574 colourBottom = ColourValue(0.80f, 1.00f, 0.80f, 1.00f); break; 575 576 case Shell::Command: colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f); 577 colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 0.90f); break; 578 579 case Shell::Hint: colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f); 580 colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); break; 581 582 default: colourTop = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); 583 colourBottom = ColourValue(1.00f, 1.00f, 1.00f, 1.00f); break; 584 584 } 585 585 -
code/trunk/src/orxonox/overlays/Map.cc
r6417 r6502 179 179 //m_pOverlayPanel->setPosition(10, 10); 180 180 //m_pOverlayPanel->setDimensions(600, 400); 181 m_pOverlayPanel->setPosition(0.01 , 0.003);182 m_pOverlayPanel->setDimensions(0.5 , 0.4);181 m_pOverlayPanel->setPosition(0.01f, 0.003f); 182 m_pOverlayPanel->setDimensions(0.5f, 0.4f); 183 183 // Give overlay a texture 184 184 m_pOverlayPanel->setMaterialName("RttMat"); … … 187 187 //Add Borders 188 188 Ogre::BorderPanelOverlayElement* oBorder = static_cast<Ogre::BorderPanelOverlayElement*>(Ogre::OverlayManager::getSingletonPtr()->createOverlayElement("BorderPanel", "MapBorderPanel" + getUniqueNumberString())); 189 oBorder->setBorderSize( 0.003 , 0.003);190 oBorder->setDimensions(0.5 , 0.4);189 oBorder->setBorderSize( 0.003f, 0.003f ); 190 oBorder->setDimensions(0.5f, 0.4f); 191 191 oBorder->setBorderMaterialName("StatsBorder"); 192 oBorder->setTopBorderUV(0.49 , 0.0, 0.51, 0.5);193 oBorder->setTopLeftBorderUV(0.0 , 0.0, 0.5, 0.5);194 oBorder->setTopRightBorderUV(0.5 , 0.0, 1.0, 0.5);195 oBorder->setLeftBorderUV(0.0 , 0.49, 0.5, 0.51);196 oBorder->setRightBorderUV(0.5 , 0.49, 1.0, 0.5);197 oBorder->setBottomBorderUV(0.49 , 0.5, 0.51, 1.0);198 oBorder->setBottomLeftBorderUV(0.0 , 0.5, 0.5, 1.0);199 oBorder->setBottomRightBorderUV(0.5 , 0.5, 1.0, 1.0);192 oBorder->setTopBorderUV(0.49f, 0.0f, 0.51f, 0.5f); 193 oBorder->setTopLeftBorderUV(0.0f, 0.0f, 0.5f, 0.5f); 194 oBorder->setTopRightBorderUV(0.5f, 0.0f, 1.0f, 0.5f); 195 oBorder->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f); 196 oBorder->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f); 197 oBorder->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f); 198 oBorder->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f); 199 oBorder->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f); 200 200 //overlay_->add2D(oBorder); 201 201 m_pOverlayPanel->addChild(oBorder); … … 329 329 //this->CamNodeHelper_ = this->CamNode_->createChildSceneNode(); 330 330 //this->CamNodeHelper_->attachObject(this->Cam_); 331 this->Cam_->setPosition(0, 0, DISTANCE);332 this->Cam_->pitch( static_cast<Degree>( PITCH) );331 this->Cam_->setPosition(0, 0, (float)DISTANCE); 332 this->Cam_->pitch( static_cast<Degree>((float)PITCH) ); 333 333 this->Cam_->lookAt(this->playerShipNode_->getPosition()); 334 334 //this->Cam_->setAutoTracking(true, this->playerShipNode_); -
code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
r6417 r6502 226 226 if (angle > 89.0f && angle < 91.0f) 227 227 { 228 tempAspect = 1.0 / this->windowAspectRatio_;228 tempAspect = 1.0f / this->windowAspectRatio_; 229 229 rotState_ = Vertical; 230 230 } -
code/trunk/src/orxonox/pickup/PickupInventory.cc
r6417 r6502 301 301 302 302 CEGUI::Window* frame = winMgr->createWindow("TaharezLook/StaticImage", "orxonox/Inventory/Frame/" + id); 303 frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 5+ y * 90)));303 frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5.0f + x * 70), CEGUI::UDim(0, 5.0f + y * 90))); 304 304 frame->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 65))); 305 305 frame->setRiseOnClickEnabled(false); … … 307 307 308 308 CEGUI::Window* text = winMgr->createWindow("TaharezLook/StaticText", "orxonox/Inventory/Title/" + id); 309 text->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 70+ y * 90)));309 text->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5.0f + x * 70), CEGUI::UDim(0, 70.0f + y * 90))); 310 310 text->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 20))); 311 311 text->setProperty("FrameEnabled", "False"); … … 317 317 318 318 CEGUI::Window* btn = winMgr->createWindow("TaharezLook/Button", "orxonox/Inventory/Items/" + id); 319 btn->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 8 + x * 70), CEGUI::UDim(0, 8+ y * 90)));319 btn->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 8.0f + x * 70), CEGUI::UDim(0, 8.0f + y * 90))); 320 320 btn->setSize(CEGUI::UVector2(CEGUI::UDim(0, 59), CEGUI::UDim(0, 59))); 321 321 btn->subscribeScriptedEvent("Clicked", "PickupInventory.itemClicked"); -
code/trunk/src/orxonox/sound/BaseSound.cc
r6417 r6502 178 178 void BaseSound::setPitch(float pitch) 179 179 { 180 if (pitch > 2 || pitch < 0.5 )180 if (pitch > 2 || pitch < 0.5f) 181 181 { 182 182 COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl; 183 pitch = pitch > 2 ? 2: pitch;184 pitch = pitch < 0.5 ? 0.5: pitch;183 pitch = pitch > 2.0f ? 2.0f : pitch; 184 pitch = pitch < 0.5f ? 0.5f : pitch; 185 185 } 186 186 this->pitch_ = pitch; -
code/trunk/src/orxonox/sound/SoundBuffer.cc
r6417 r6502 108 108 { 109 109 case SEEK_SET: 110 stream->seek( offset);110 stream->seek((size_t)offset); 111 111 break; 112 112 case SEEK_CUR: 113 stream->skip( offset);113 stream->skip((size_t)offset); 114 114 break; 115 115 case SEEK_END: 116 stream->seek(stream->size() + offset);116 stream->seek(stream->size() + (size_t)offset); 117 117 break; 118 118 default:
Note: See TracChangeset
for help on using the changeset viewer.