Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 11:34:20 AM (15 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/modules/overlays/stats
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/overlays/stats/CreateLines.cc

    r6417 r6502  
    3838    {
    3939        playerNameText_ = new OverlayText(0);
    40         playerNameText_->setTextSize(0.04);
    41         playerNameText_->setColour(ColourValue(0, 0.75, 0.2, 1));
    42         playerNameText_->setPosition(Vector2(0.1, topOffset + 0.01));
     40        playerNameText_->setTextSize(0.04f);
     41        playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
     42        playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f));
    4343
    4444        scoreText_ = new OverlayText(0);
    45         scoreText_->setTextSize(0.04);
    46         scoreText_->setColour(ColourValue(0, 0.75, 0.2, 1));
    47         scoreText_->setPosition(Vector2(0.6, topOffset + 0.01));
     45        scoreText_->setTextSize(0.04f);
     46        scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
     47        scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f));
    4848
    4949        deathsText_ = new OverlayText(0);
    50         deathsText_->setTextSize(0.04);
    51         deathsText_->setColour(ColourValue(0, 0.75, 0.2, 1));
    52         deathsText_->setPosition(Vector2(0.8, topOffset + 0.01));
     50        deathsText_->setTextSize(0.04f);
     51        deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f));
     52        deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f));
    5353
    5454        background_ = new Stats(0);
  • code/trunk/src/modules/overlays/stats/Scoreboard.cc

    r5980 r6502  
    7979        const std::map<PlayerInfo*, Player>& playerList = this->getGametype()->getPlayers();
    8080
    81         const float topOffset  = 0.2;
    82         const float leftOffset = 0.075;
    83         const float distance   = 0.01;
    84         const float width      = 0.85;
    85         const float height     = 0.05;
     81        const float topOffset  = 0.2f;
     82        const float leftOffset = 0.075f;
     83        const float distance   = 0.01f;
     84        const float width      = 0.85f;
     85        const float height     = 0.05f;
    8686        while (playerList.size() > this->lines_.size())
    8787        {
  • code/trunk/src/modules/overlays/stats/Stats.cc

    r5781 r6502  
    5959        this->statsOverlayBorder_ = static_cast<Ogre::BorderPanelOverlayElement*>(ovMan->createOverlayElement("BorderPanel", "StatsBorderPanel" + getUniqueNumberString()));
    6060        //this->statsOverlayBorder_->setMaterialName("StatsCenter");
    61         this->statsOverlayBorder_->setBorderSize(0.003, 16 * 0.003);
     61        this->statsOverlayBorder_->setBorderSize(0.003f, 16.0f * 0.003f);
    6262        this->statsOverlayBorder_->setBorderMaterialName("StatsBorder");
    63         this->statsOverlayBorder_->setTopBorderUV(0.49, 0.0, 0.51, 0.5);
    64         this->statsOverlayBorder_->setTopLeftBorderUV(0.0, 0.0, 0.5, 0.5);
    65         this->statsOverlayBorder_->setTopRightBorderUV(0.5, 0.0, 1.0, 0.5);
    66         this->statsOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
    67         this->statsOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
    68         this->statsOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
    69         this->statsOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
    70         this->statsOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
     63        this->statsOverlayBorder_->setTopBorderUV(0.49f, 0.0f, 0.51f, 0.5f);
     64        this->statsOverlayBorder_->setTopLeftBorderUV(0.0f, 0.0f, 0.5f, 0.5f);
     65        this->statsOverlayBorder_->setTopRightBorderUV(0.5f, 0.0f, 1.0f, 0.5f);
     66        this->statsOverlayBorder_->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f);
     67        this->statsOverlayBorder_->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f);
     68        this->statsOverlayBorder_->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f);
     69        this->statsOverlayBorder_->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f);
     70        this->statsOverlayBorder_->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f);
    7171
    7272        background_->addChild(statsOverlayBorder_);
Note: See TracChangeset for help on using the changeset viewer.