Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 11:34:20 AM (14 years ago)
Author:
rgrieder
Message:

Removed a ton of msvc warnings revealed with OGRE v1.7 (they removed the warning suppressors in OgrePrerequisites.h).
All of them are conversions from one type to another that might be lossy (mostly double to float, please always use "3.7f" instead of "3.7" as constants when using floats).

Location:
code/trunk/src/orxonox
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/controllers/ArtificialController.cc

    r6417 r6502  
    6565        {
    6666            // 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);
    6969        }
    7070
    7171        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 chance
     72            this->getControllableEntity()->moveFrontBack(-0.5f); // They don't brake with full power to give the player a chance
    7373        else
    74             this->getControllableEntity()->moveFrontBack(0.8);
     74            this->getControllableEntity()->moveFrontBack(0.8f);
    7575    }
    7676
  • code/trunk/src/orxonox/controllers/NewHumanController.cc

    r6501 r6502  
    7474        RegisterObject(NewHumanController);
    7575
    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;
    8080
    8181        controlMode_ = 0;
     
    101101            centerOverlay_ = new OrxonoxOverlay(this);
    102102            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));
    105105            centerOverlay_->hide();
    106106
     
    109109                damageOverlayTop_ = new OrxonoxOverlay(this);
    110110                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));
    113113                damageOverlayTop_->hide();
    114114
    115115                damageOverlayRight_ = new OrxonoxOverlay(this);
    116116                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));
    119119                damageOverlayRight_->hide();
    120120
    121121                damageOverlayBottom_ = new OrxonoxOverlay(this);
    122122                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));
    125125                damageOverlayBottom_->hide();
    126126
    127127                damageOverlayLeft_ = new OrxonoxOverlay(this);
    128128                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));
    131131                damageOverlayLeft_->hide();
    132132            }
     
    136136                arrowsOverlay1_ = new OrxonoxOverlay(this);
    137137                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));
    141141                arrowsOverlay1_->hide();
    142142
    143143                arrowsOverlay2_ = new OrxonoxOverlay(this);
    144144                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));
    148148                arrowsOverlay2_->hide();
    149149
    150150                arrowsOverlay3_ = new OrxonoxOverlay(this);
    151151                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));
    155155                arrowsOverlay3_->hide();
    156156
    157157                arrowsOverlay4_ = new OrxonoxOverlay(this);
    158158                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));
    162162                arrowsOverlay4_->hide();
    163163            }
     
    213213                        this->showOverlays();
    214214
    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));
    216216
    217217                    if (this->controlMode_ == 0 || (this->controlMode_ == 1 && this->firemode_ == 1))
     
    299299            relativeHit.normalise();
    300300
    301             float threshold = 0.3;
     301            float threshold = 0.3f;
    302302            if (relativeHit.x > threshold) // Left
    303303            {
     
    343343        Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
    344344
    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);
    346346
    347347        rsq->setRay(mouseRay);
     
    505505            float distance = sqrt(pow(static_cast<float>(this->currentYaw_)/2*-1,2) + pow(static_cast<float>(this->currentPitch_)/2*-1,2));
    506506
    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));
    510510                this->arrowsOverlay1_->show();
    511511            }
    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));
    515515                this->arrowsOverlay2_->show();
    516516            }
    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));
    520520                this->arrowsOverlay3_->show();
    521521            }
    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));
    525525                this->arrowsOverlay4_->show();
    526526            }
  • code/trunk/src/orxonox/controllers/WaypointPatrolController.cc

    r5929 r6502  
    6868                this->moveToTargetPosition();
    6969
    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))
    7171                this->getControllableEntity()->fire(0);
    7272        }
     
    8585
    8686        Vector3 myposition = this->getControllableEntity()->getPosition();
    87         float shortestsqdistance = static_cast<unsigned int>(-1);
     87        float shortestsqdistance = (float)static_cast<unsigned int>(-1);
    8888
    8989        for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
  • code/trunk/src/orxonox/overlays/InGameConsole.cc

    r6417 r6502  
    200200        this->consoleOverlayBorder_->setBorderSize(16, 16, 0, 16);
    201201        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);
    207207        this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_);
    208208
     
    254254        // move overlay "above" the top edge of the screen
    255255        // 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);
    257257
    258258        COUT(4) << "Info: InGameConsole initialized" << std::endl;
     
    332332
    333333        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);
    335335    }
    336336
     
    369369                // enlarge oldTop a little bit so that this exponential function
    370370                // 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_;
    372372                if (oldTop - deltaScroll >= 0)
    373373                {
     
    384384                // scrolling up
    385385                // 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_;
    387387                if (oldTop - deltaScroll <= -1.3 * this->relativeHeight)
    388388                {
    389389                    // window has completely scrolled up
    390                     this->consoleOverlayContainer_->setTop(-1.3 * this->relativeHeight);
     390                    this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight);
    391391                    this->scroll_ = 0;
    392392                    this->consoleOverlay_->hide();
     
    424424        this->windowW_ = newWidth;
    425425        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);
    430430        this->consoleOverlayNoise_->setTiling(consoleOverlayNoise_->getWidth() / (50.0f * this->noiseSize_), consoleOverlayNoise_->getHeight() / (50.0f * this->noiseSize_));
    431431
     
    440440        for (int i = 0; i < LINES; i++)
    441441        {
    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);
    444444        }
    445445
     
    556556        switch (type)
    557557        {
    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;
    584584        }
    585585
  • code/trunk/src/orxonox/overlays/Map.cc

    r6417 r6502  
    179179            //m_pOverlayPanel->setPosition(10, 10);
    180180            //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);
    183183            // Give overlay a texture
    184184            m_pOverlayPanel->setMaterialName("RttMat");
     
    187187            //Add Borders
    188188            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);
    191191            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);
    200200            //overlay_->add2D(oBorder);
    201201            m_pOverlayPanel->addChild(oBorder);
     
    329329                //this->CamNodeHelper_ = this->CamNode_->createChildSceneNode();
    330330                //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) );
    333333                    this->Cam_->lookAt(this->playerShipNode_->getPosition());
    334334                //this->Cam_->setAutoTracking(true, this->playerShipNode_);
  • code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc

    r6417 r6502  
    226226            if (angle > 89.0f && angle < 91.0f)
    227227            {
    228                 tempAspect = 1.0 / this->windowAspectRatio_;
     228                tempAspect = 1.0f / this->windowAspectRatio_;
    229229                rotState_ = Vertical;
    230230            }
  • code/trunk/src/orxonox/pickup/PickupInventory.cc

    r6417 r6502  
    301301
    302302        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)));
    304304        frame->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 65)));
    305305        frame->setRiseOnClickEnabled(false);
     
    307307
    308308        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)));
    310310        text->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 20)));
    311311        text->setProperty("FrameEnabled", "False");
     
    317317
    318318        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)));
    320320        btn->setSize(CEGUI::UVector2(CEGUI::UDim(0, 59), CEGUI::UDim(0, 59)));
    321321        btn->subscribeScriptedEvent("Clicked", "PickupInventory.itemClicked");
  • code/trunk/src/orxonox/sound/BaseSound.cc

    r6417 r6502  
    178178    void BaseSound::setPitch(float pitch)
    179179    {
    180         if (pitch > 2 || pitch < 0.5)
     180        if (pitch > 2 || pitch < 0.5f)
    181181        {
    182182            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;
    185185        }
    186186        this->pitch_ = pitch;
  • code/trunk/src/orxonox/sound/SoundBuffer.cc

    r6417 r6502  
    108108        {
    109109        case SEEK_SET:
    110             stream->seek(offset);
     110            stream->seek((size_t)offset);
    111111            break;
    112112        case SEEK_CUR:
    113             stream->skip(offset);
     113            stream->skip((size_t)offset);
    114114            break;
    115115        case SEEK_END:
    116             stream->seek(stream->size() + offset);
     116            stream->seek(stream->size() + (size_t)offset);
    117117            break;
    118118        default:
Note: See TracChangeset for help on using the changeset viewer.