Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6502


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
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GUIManager.cc

    r6417 r6502  
    145145
    146146        // Align CEGUI mouse with OIS mouse
    147         guiSystem_->injectMousePosition(mousePosition.first, mousePosition.second);
     147        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
    148148
    149149        // Hide the mouse cursor unless playing in full screen mode
  • code/trunk/src/libraries/core/Game.cc

    r6422 r6502  
    284284        uint64_t currentTime = gameClock_->getMicroseconds();
    285285        uint64_t currentRealTime = gameClock_->getRealMicroseconds();
    286         this->statisticsTickTimes_.back().tickLength += currentRealTime - currentTime;
    287         this->periodTickTime_ += currentRealTime - currentTime;
     286        this->statisticsTickTimes_.back().tickLength += (uint32_t)(currentRealTime - currentTime);
     287        this->periodTickTime_ += (uint32_t)(currentRealTime - currentTime);
    288288        if (this->periodTime_ > this->statisticsRefreshCycle_)
    289289        {
     
    318318        while (currentRealTime < nextTime - minimumSleepTime_)
    319319        {
    320             usleep(nextTime - currentRealTime);
     320            usleep((unsigned long)(nextTime - currentRealTime));
    321321            currentRealTime = gameClock_->getRealMicroseconds();
    322322        }
    323323        // Integrate excess to avoid steady state error
    324         excessSleepTime_ = currentRealTime - nextTime;
     324        excessSleepTime_ = (int)(currentRealTime - nextTime);
    325325        // Anti windup
    326326        if (excessSleepTime_ > 50000) // 20ms is about the maximum time Windows would sleep for too long
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r6417 r6502  
    366366        uint64_t timeAfterTick = time.getRealMicroseconds();
    367367        // Subtract the time used for rendering from the tick time counter
    368         Game::getInstance().subtractTickTime(timeAfterTick - timeBeforeTick);
     368        Game::getInstance().subtractTickTime((int32_t)(timeAfterTick - timeBeforeTick));
    369369
    370370        // again, just to be sure OGRE works fine
  • code/trunk/src/libraries/util/Math.h

    r6417 r6502  
    7979    inline T sgn(T x)
    8080    {
    81         return (x >= 0) ? 1 : -1;
     81        return (x >= 0) ? (T)1 : (T)-1;
    8282    }
    8383
  • code/trunk/src/modules/overlays/hud/HUDNavigation.cc

    r6417 r6502  
    153153        int dist = static_cast<int>(getDist2Focus());
    154154        navText_->setCaption(multi_cast<std::string>(dist));
    155         float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3;
     155        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3f;
    156156
    157157        orxonox::Camera* cam = CameraManager::getInstance().getActiveCamera();
     
    191191                {
    192192                    // up
    193                     float position = pos.x / pos.y + 1.0;
    194                     navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 0.0);
    195                     navMarker_->setUV(0.5, 0.0, 1.0, 0.5);
    196                     navText_->setLeft((position - textLength) * 0.5);
     193                    float position = pos.x / pos.y + 1.0f;
     194                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 0.0f);
     195                    navMarker_->setUV(0.5f, 0.0f, 1.0f, 0.5f);
     196                    navText_->setLeft((position - textLength) * 0.5f);
    197197                    navText_->setTop(navMarker_->getHeight());
    198198                }
     
    200200                {
    201201                    // left
    202                     float position = pos.y / pos.x + 1.0;
    203                     navMarker_->setPosition(0.0, (position - navMarker_->getWidth()) * 0.5);
    204                     navMarker_->setUV(0.0, 0.0, 0.5, 0.5);
    205                     navText_->setLeft(navMarker_->getWidth() + 0.01);
    206                     navText_->setTop((position - navText_->getCharHeight()) * 0.5);
     202                    float position = pos.y / pos.x + 1.0f;
     203                    navMarker_->setPosition(0.0f, (position - navMarker_->getWidth()) * 0.5f);
     204                    navMarker_->setUV(0.0f, 0.0f, 0.5f, 0.5f);
     205                    navText_->setLeft(navMarker_->getWidth() + 0.01f);
     206                    navText_->setTop((position - navText_->getCharHeight()) * 0.5f);
    207207                }
    208208            }
     
    212212                {
    213213                    // down
    214                     float position = -pos.x / pos.y + 1.0;
    215                     navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 1.0 - navMarker_->getHeight());
    216                     navMarker_->setUV(0.0, 0.5, 0.5, 1.0);
    217                     navText_->setLeft((position - textLength) * 0.5);
    218                     navText_->setTop(1.0 - navMarker_->getHeight() - navText_->getCharHeight());
     214                    float position = -pos.x / pos.y + 1.0f;
     215                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 1.0f - navMarker_->getHeight());
     216                    navMarker_->setUV(0.0f, 0.5f, 0.5f, 1.0f);
     217                    navText_->setLeft((position - textLength) * 0.5f);
     218                    navText_->setTop(1.0f - navMarker_->getHeight() - navText_->getCharHeight());
    219219                }
    220220                else
    221221                {
    222222                    // right
    223                     float position = -pos.y / pos.x + 1.0;
    224                     navMarker_->setPosition(1.0 - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5);
    225                     navMarker_->setUV(0.5, 0.5, 1.0, 1.0);
    226                     navText_->setLeft(1.0 - navMarker_->getWidth() - textLength - 0.01);
    227                     navText_->setTop((position - navText_->getCharHeight()) * 0.5);
     223                    float position = -pos.y / pos.x + 1.0f;
     224                    navMarker_->setPosition(1.0f - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5f);
     225                    navMarker_->setUV(0.5f, 0.5f, 1.0f, 1.0f);
     226                    navText_->setLeft(1.0f - navMarker_->getWidth() - textLength - 0.01f);
     227                    navText_->setTop((position - navText_->getCharHeight()) * 0.5f);
    228228                }
    229229            }
     
    243243
    244244            // object is in view
    245             navMarker_->setUV(0.0, 0.0, 1.0, 1.0);
    246             navMarker_->setLeft((pos.x + 1.0 - navMarker_->getWidth()) * 0.5);
    247             navMarker_->setTop((-pos.y + 1.0 - navMarker_->getHeight()) * 0.5);
     245            navMarker_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
     246            navMarker_->setLeft((pos.x + 1.0f - navMarker_->getWidth()) * 0.5f);
     247            navMarker_->setTop((-pos.y + 1.0f - navMarker_->getHeight()) * 0.5f);
    248248
    249249/*
    250250            aimMarker_->show();
    251             aimMarker_->setLeft((aimpos.x + 1.0 - aimMarker_->getWidth()) * 0.5);
    252             aimMarker_->setTop((-aimpos.y + 1.0 - aimMarker_->getHeight()) * 0.5);
    253 */
    254             navText_->setLeft((pos.x + 1.0 + navMarker_->getWidth()) * 0.5);
    255             navText_->setTop((-pos.y + 1.0 + navMarker_->getHeight()) * 0.5);
     251            aimMarker_->setLeft((aimpos.x + 1.0f - aimMarker_->getWidth()) * 0.5f);
     252            aimMarker_->setTop((-aimpos.y + 1.0f - aimMarker_->getHeight()) * 0.5f);
     253*/
     254            navText_->setLeft((pos.x + 1.0f + navMarker_->getWidth()) * 0.5f);
     255            navText_->setTop((-pos.y + 1.0f + navMarker_->getHeight()) * 0.5f);
    256256        }
    257257    }
  • code/trunk/src/modules/overlays/hud/HUDRadar.cc

    r6417 r6502  
    141141        // calc position on radar...
    142142        Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
    143         coord *= Ogre::Math::PI / 3.5; // small adjustment to make it fit the texture
    144         panel->setPosition((1.0 + coord.x - size) * 0.5, (1.0 - coord.y - size) * 0.5);
     143        coord *= Ogre::Math::PI / 3.5f; // small adjustment to make it fit the texture
     144        panel->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
    145145
    146146        if (bIsMarked)
    147147        {
    148148            this->marker_->show();
    149             this->marker_->setDimensions(size * 1.5, size * 1.5);
    150             this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5);
     149            this->marker_->setDimensions(size * 1.5f, size * 1.5f);
     150            this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
    151151        }
    152152    }
  • 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_);
  • code/trunk/src/modules/questsystem/QuestGUINode.cc

    r6417 r6502  
    161161            const QuestDescription* description = this->item_->getDescription();
    162162            this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str());
    163             this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7, 0),CEGUI::UDim(0.7, 0)));
    164             this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1, 0),CEGUI::UDim(0.1, 0)));
     163            this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7f, 0),CEGUI::UDim(0.7f, 0)));
     164            this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1f, 0),CEGUI::UDim(0.1f, 0)));
    165165            this->details_->setText(description->getTitle());
    166166            this->details_->setAlpha(1.0);
     
    173173            CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str());
    174174            window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT)));
    175             window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, QuestGUINode::TITLE_HEIGHT)));
     175            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::TITLE_HEIGHT)));
    176176            this->details_->addChildWindow(window);
    177177
     
    203203                statusWindow->setProperty("VertFormatting", "TopAligned");
    204204                statusWindow->setText(status);
    205                 statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
    206                 statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
     205                statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
     206                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
    207207                height = setHeight(statusWindow);
    208208
     
    219219            descriptionWindowTitle->setProperty("VertFormatting", "TopAligned");
    220220            descriptionWindowTitle->setText("Description:");
    221             descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
    222             descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
     221            descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
     222            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
    223223
    224224            offset += setHeight(descriptionWindowTitle);
     
    232232            descriptionWindow->setProperty("VertFormatting", "TopAligned");
    233233            descriptionWindow->setText(description->getDescription());
    234             descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
    235             descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
     234            descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
     235            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
    236236            height = setHeight(descriptionWindow);
    237237
     
    255255                            hintsTitle->setProperty("VertFormatting", "TopAligned");
    256256                            hintsTitle->setText("Hints:");
    257                             hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
     257                            hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
    258258                            hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
    259259                            offset += setHeight(hintsTitle);;
     
    261261                        }
    262262                        QuestGUINode* node = *it;
    263                         node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
    264                         node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
     263                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT)));
     264                        node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
    265265                        window->addChildWindow(node->window_);
    266266                        offset += QuestGUINode::BUTTON_HEIGHT;
     
    337337
    338338        //! Get the formatted line count - using the formatting area obtained above.
    339         const float lines = window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned);
     339        const float lines = (float)(window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned));
    340340
    341341        //! Calculate pixel height of window, which is the number of formatted lines multiplied by the spacing of the font, plus the pixel height of the frame.
     
    357357    void QuestGUINode::updatePosition(void)
    358358    {
    359         this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::INDENT_WIDTH*this->depth_),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT*this->index_)));
    360         this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
     359        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)(QuestGUINode::INDENT_WIDTH*this->depth_)),CEGUI::UDim(0, (float)(QuestGUINode::BUTTON_HEIGHT*this->index_))));
     360        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, (float)(-QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH)),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT)));
    361361    }
    362362
  • code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc

    r6417 r6502  
    139139            {
    140140                this->removeContainer(*it);
    141                 this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
     141                this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
    142142                it = this->containers_.begin(); //TODO: Needed?
    143143            }
    144144
    145             this->tickTime_ = 0.0; //!< Reset time counter.
     145            this->tickTime_ = 0.0f; //!< Reset time counter.
    146146        }
    147147    }
     
    193193            it = this->containers_.begin();
    194194            this->removeContainer(*it);
    195             this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
     195            this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
    196196        }
    197197
     
    375375        {
    376376            (*it)->overlay->setPosition(this->getPosition());
    377             (*it)->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*counter));
     377            (*it)->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*counter));
    378378            counter++;
    379379        }
     
    407407        this->size_= this->size_+1;
    408408
    409         container->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*(this->getSize()-1)));
     409        container->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*(this->getSize()-1)));
    410410    }
    411411
  • code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc

    r5781 r6502  
    4848        }
    4949
    50         this->setScale(0.2);
     50        this->setScale(0.2f);
    5151    }
    5252
  • code/trunk/src/modules/weapons/projectiles/Rocket.cc

    r6417 r6502  
    6666            Model* model = new Model(this);
    6767            model->setMeshSource("rocket.mesh");
    68             model->scale(0.7);
     68            model->scale(0.7f);
    6969            this->attach(model);
    7070            ParticleEmitter* fire = new ParticleEmitter(this);
  • code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc

    r6417 r6502  
    4646        RegisterObject(RocketFire);
    4747
    48         this->reloadTime_ = 0.20;
     48        this->reloadTime_ = 0.20f;
    4949        this->bParallelReload_ = false;
    5050        this->damage_ = 100;
  • 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.