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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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_);
Note: See TracChangeset for help on using the changeset viewer.