[Orxonox-commit 1784] r6502 - in code/trunk/src: libraries/core libraries/util modules/overlays/hud modules/overlays/stats modules/questsystem modules/questsystem/notifications modules/weapons/projectiles modules/weapons/weaponmodes orxonox/controllers orxonox/overlays orxonox/pickup orxonox/sound

rgrieder at orxonox.net rgrieder at orxonox.net
Thu Mar 11 11:34:20 CET 2010


Author: rgrieder
Date: 2010-03-11 11:34:20 +0100 (Thu, 11 Mar 2010)
New Revision: 6502

Modified:
   code/trunk/src/libraries/core/GUIManager.cc
   code/trunk/src/libraries/core/Game.cc
   code/trunk/src/libraries/core/GraphicsManager.cc
   code/trunk/src/libraries/util/Math.h
   code/trunk/src/modules/overlays/hud/HUDNavigation.cc
   code/trunk/src/modules/overlays/hud/HUDRadar.cc
   code/trunk/src/modules/overlays/stats/CreateLines.cc
   code/trunk/src/modules/overlays/stats/Scoreboard.cc
   code/trunk/src/modules/overlays/stats/Stats.cc
   code/trunk/src/modules/questsystem/QuestGUINode.cc
   code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc
   code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc
   code/trunk/src/modules/weapons/projectiles/Rocket.cc
   code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc
   code/trunk/src/orxonox/controllers/ArtificialController.cc
   code/trunk/src/orxonox/controllers/NewHumanController.cc
   code/trunk/src/orxonox/controllers/WaypointPatrolController.cc
   code/trunk/src/orxonox/overlays/InGameConsole.cc
   code/trunk/src/orxonox/overlays/Map.cc
   code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
   code/trunk/src/orxonox/pickup/PickupInventory.cc
   code/trunk/src/orxonox/sound/BaseSound.cc
   code/trunk/src/orxonox/sound/SoundBuffer.cc
Log:
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).

Modified: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/libraries/core/GUIManager.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -144,7 +144,7 @@
         this->luaState_->doFile("InitialiseGUI.lua");
 
         // Align CEGUI mouse with OIS mouse
-        guiSystem_->injectMousePosition(mousePosition.first, mousePosition.second);
+        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
 
         // Hide the mouse cursor unless playing in full screen mode
         if (!bFullScreen)

Modified: code/trunk/src/libraries/core/Game.cc
===================================================================
--- code/trunk/src/libraries/core/Game.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/libraries/core/Game.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -283,8 +283,8 @@
         // Add the tick time of this frame (rendering time has already been subtracted)
         uint64_t currentTime = gameClock_->getMicroseconds();
         uint64_t currentRealTime = gameClock_->getRealMicroseconds();
-        this->statisticsTickTimes_.back().tickLength += currentRealTime - currentTime;
-        this->periodTickTime_ += currentRealTime - currentTime;
+        this->statisticsTickTimes_.back().tickLength += (uint32_t)(currentRealTime - currentTime);
+        this->periodTickTime_ += (uint32_t)(currentRealTime - currentTime);
         if (this->periodTime_ > this->statisticsRefreshCycle_)
         {
             std::list<StatisticsTickInfo>::iterator it = this->statisticsTickTimes_.begin();
@@ -317,11 +317,11 @@
         uint64_t currentRealTime = gameClock_->getRealMicroseconds();
         while (currentRealTime < nextTime - minimumSleepTime_)
         {
-            usleep(nextTime - currentRealTime);
+            usleep((unsigned long)(nextTime - currentRealTime));
             currentRealTime = gameClock_->getRealMicroseconds();
         }
         // Integrate excess to avoid steady state error
-        excessSleepTime_ = currentRealTime - nextTime;
+        excessSleepTime_ = (int)(currentRealTime - nextTime);
         // Anti windup
         if (excessSleepTime_ > 50000) // 20ms is about the maximum time Windows would sleep for too long
             excessSleepTime_ = 50000;

Modified: code/trunk/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/trunk/src/libraries/core/GraphicsManager.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/libraries/core/GraphicsManager.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -365,7 +365,7 @@
 
         uint64_t timeAfterTick = time.getRealMicroseconds();
         // Subtract the time used for rendering from the tick time counter
-        Game::getInstance().subtractTickTime(timeAfterTick - timeBeforeTick);
+        Game::getInstance().subtractTickTime((int32_t)(timeAfterTick - timeBeforeTick));
 
         // again, just to be sure OGRE works fine
         ogreRoot_->_fireFrameEnded(evt); // note: uses the same time as _fireFrameStarted

Modified: code/trunk/src/libraries/util/Math.h
===================================================================
--- code/trunk/src/libraries/util/Math.h	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/libraries/util/Math.h	2010-03-11 10:34:20 UTC (rev 6502)
@@ -78,7 +78,7 @@
     template <typename T>
     inline T sgn(T x)
     {
-        return (x >= 0) ? 1 : -1;
+        return (x >= 0) ? (T)1 : (T)-1;
     }
 
     /**

Modified: code/trunk/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDNavigation.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/overlays/hud/HUDNavigation.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -152,7 +152,7 @@
         // set text
         int dist = static_cast<int>(getDist2Focus());
         navText_->setCaption(multi_cast<std::string>(dist));
-        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3;
+        float textLength = multi_cast<std::string>(dist).size() * navText_->getCharHeight() * 0.3f;
 
         orxonox::Camera* cam = CameraManager::getInstance().getActiveCamera();
         if (!cam)
@@ -190,20 +190,20 @@
                 if (pos.y > -pos.x)
                 {
                     // up
-                    float position = pos.x / pos.y + 1.0;
-                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 0.0);
-                    navMarker_->setUV(0.5, 0.0, 1.0, 0.5);
-                    navText_->setLeft((position - textLength) * 0.5);
+                    float position = pos.x / pos.y + 1.0f;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 0.0f);
+                    navMarker_->setUV(0.5f, 0.0f, 1.0f, 0.5f);
+                    navText_->setLeft((position - textLength) * 0.5f);
                     navText_->setTop(navMarker_->getHeight());
                 }
                 else
                 {
                     // left
-                    float position = pos.y / pos.x + 1.0;
-                    navMarker_->setPosition(0.0, (position - navMarker_->getWidth()) * 0.5);
-                    navMarker_->setUV(0.0, 0.0, 0.5, 0.5);
-                    navText_->setLeft(navMarker_->getWidth() + 0.01);
-                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                    float position = pos.y / pos.x + 1.0f;
+                    navMarker_->setPosition(0.0f, (position - navMarker_->getWidth()) * 0.5f);
+                    navMarker_->setUV(0.0f, 0.0f, 0.5f, 0.5f);
+                    navText_->setLeft(navMarker_->getWidth() + 0.01f);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5f);
                 }
             }
             else
@@ -211,20 +211,20 @@
                 if (pos.y < -pos.x)
                 {
                     // down
-                    float position = -pos.x / pos.y + 1.0;
-                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5, 1.0 - navMarker_->getHeight());
-                    navMarker_->setUV(0.0, 0.5, 0.5, 1.0);
-                    navText_->setLeft((position - textLength) * 0.5);
-                    navText_->setTop(1.0 - navMarker_->getHeight() - navText_->getCharHeight());
+                    float position = -pos.x / pos.y + 1.0f;
+                    navMarker_->setPosition((position - navMarker_->getWidth()) * 0.5f, 1.0f - navMarker_->getHeight());
+                    navMarker_->setUV(0.0f, 0.5f, 0.5f, 1.0f);
+                    navText_->setLeft((position - textLength) * 0.5f);
+                    navText_->setTop(1.0f - navMarker_->getHeight() - navText_->getCharHeight());
                 }
                 else
                 {
                     // right
-                    float position = -pos.y / pos.x + 1.0;
-                    navMarker_->setPosition(1.0 - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5);
-                    navMarker_->setUV(0.5, 0.5, 1.0, 1.0);
-                    navText_->setLeft(1.0 - navMarker_->getWidth() - textLength - 0.01);
-                    navText_->setTop((position - navText_->getCharHeight()) * 0.5);
+                    float position = -pos.y / pos.x + 1.0f;
+                    navMarker_->setPosition(1.0f - navMarker_->getWidth(), (position - navMarker_->getHeight()) * 0.5f);
+                    navMarker_->setUV(0.5f, 0.5f, 1.0f, 1.0f);
+                    navText_->setLeft(1.0f - navMarker_->getWidth() - textLength - 0.01f);
+                    navText_->setTop((position - navText_->getCharHeight()) * 0.5f);
                 }
             }
         }
@@ -242,17 +242,17 @@
             }
 
             // object is in view
-            navMarker_->setUV(0.0, 0.0, 1.0, 1.0);
-            navMarker_->setLeft((pos.x + 1.0 - navMarker_->getWidth()) * 0.5);
-            navMarker_->setTop((-pos.y + 1.0 - navMarker_->getHeight()) * 0.5);
+            navMarker_->setUV(0.0f, 0.0f, 1.0f, 1.0f);
+            navMarker_->setLeft((pos.x + 1.0f - navMarker_->getWidth()) * 0.5f);
+            navMarker_->setTop((-pos.y + 1.0f - navMarker_->getHeight()) * 0.5f);
 
 /*
             aimMarker_->show();
-            aimMarker_->setLeft((aimpos.x + 1.0 - aimMarker_->getWidth()) * 0.5);
-            aimMarker_->setTop((-aimpos.y + 1.0 - aimMarker_->getHeight()) * 0.5);
+            aimMarker_->setLeft((aimpos.x + 1.0f - aimMarker_->getWidth()) * 0.5f);
+            aimMarker_->setTop((-aimpos.y + 1.0f - aimMarker_->getHeight()) * 0.5f);
 */
-            navText_->setLeft((pos.x + 1.0 + navMarker_->getWidth()) * 0.5);
-            navText_->setTop((-pos.y + 1.0 + navMarker_->getHeight()) * 0.5);
+            navText_->setLeft((pos.x + 1.0f + navMarker_->getWidth()) * 0.5f);
+            navText_->setTop((-pos.y + 1.0f + navMarker_->getHeight()) * 0.5f);
         }
     }
 

Modified: code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -140,14 +140,14 @@
 
         // calc position on radar...
         Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
-        coord *= Ogre::Math::PI / 3.5; // small adjustment to make it fit the texture
-        panel->setPosition((1.0 + coord.x - size) * 0.5, (1.0 - coord.y - size) * 0.5);
+        coord *= Ogre::Math::PI / 3.5f; // small adjustment to make it fit the texture
+        panel->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
 
         if (bIsMarked)
         {
             this->marker_->show();
-            this->marker_->setDimensions(size * 1.5, size * 1.5);
-            this->marker_->setPosition((1.0 + coord.x - size * 1.5) * 0.5, (1.0 - coord.y - size * 1.5) * 0.5);
+            this->marker_->setDimensions(size * 1.5f, size * 1.5f);
+            this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
         }
     }
 

Modified: code/trunk/src/modules/overlays/stats/CreateLines.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/CreateLines.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/overlays/stats/CreateLines.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -37,19 +37,19 @@
     CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height)
     {
         playerNameText_ = new OverlayText(0);
-        playerNameText_->setTextSize(0.04);
-        playerNameText_->setColour(ColourValue(0, 0.75, 0.2, 1));
-        playerNameText_->setPosition(Vector2(0.1, topOffset + 0.01));
+        playerNameText_->setTextSize(0.04f);
+        playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
+        playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f));
 
         scoreText_ = new OverlayText(0);
-        scoreText_->setTextSize(0.04);
-        scoreText_->setColour(ColourValue(0, 0.75, 0.2, 1));
-        scoreText_->setPosition(Vector2(0.6, topOffset + 0.01));
+        scoreText_->setTextSize(0.04f);
+        scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f));
+        scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f));
 
         deathsText_ = new OverlayText(0);
-        deathsText_->setTextSize(0.04);
-        deathsText_->setColour(ColourValue(0, 0.75, 0.2, 1));
-        deathsText_->setPosition(Vector2(0.8, topOffset + 0.01));
+        deathsText_->setTextSize(0.04f);
+        deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f));
+        deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f));
 
         background_ = new Stats(0);
         background_->setPosition(Vector2(leftOffset, topOffset));

Modified: code/trunk/src/modules/overlays/stats/Scoreboard.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/Scoreboard.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/overlays/stats/Scoreboard.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -78,11 +78,11 @@
     {
         const std::map<PlayerInfo*, Player>& playerList = this->getGametype()->getPlayers();
 
-        const float topOffset  = 0.2;
-        const float leftOffset = 0.075;
-        const float distance   = 0.01;
-        const float width      = 0.85;
-        const float height     = 0.05;
+        const float topOffset  = 0.2f;
+        const float leftOffset = 0.075f;
+        const float distance   = 0.01f;
+        const float width      = 0.85f;
+        const float height     = 0.05f;
         while (playerList.size() > this->lines_.size())
         {
             // create new lines

Modified: code/trunk/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/trunk/src/modules/overlays/stats/Stats.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/overlays/stats/Stats.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -58,16 +58,16 @@
         // create BorderPanel
         this->statsOverlayBorder_ = static_cast<Ogre::BorderPanelOverlayElement*>(ovMan->createOverlayElement("BorderPanel", "StatsBorderPanel" + getUniqueNumberString()));
         //this->statsOverlayBorder_->setMaterialName("StatsCenter");
-        this->statsOverlayBorder_->setBorderSize(0.003, 16 * 0.003);
+        this->statsOverlayBorder_->setBorderSize(0.003f, 16.0f * 0.003f);
         this->statsOverlayBorder_->setBorderMaterialName("StatsBorder");
-        this->statsOverlayBorder_->setTopBorderUV(0.49, 0.0, 0.51, 0.5);
-        this->statsOverlayBorder_->setTopLeftBorderUV(0.0, 0.0, 0.5, 0.5);
-        this->statsOverlayBorder_->setTopRightBorderUV(0.5, 0.0, 1.0, 0.5);
-        this->statsOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
-        this->statsOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
-        this->statsOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
-        this->statsOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
-        this->statsOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+        this->statsOverlayBorder_->setTopBorderUV(0.49f, 0.0f, 0.51f, 0.5f);
+        this->statsOverlayBorder_->setTopLeftBorderUV(0.0f, 0.0f, 0.5f, 0.5f);
+        this->statsOverlayBorder_->setTopRightBorderUV(0.5f, 0.0f, 1.0f, 0.5f);
+        this->statsOverlayBorder_->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f);
+        this->statsOverlayBorder_->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f);
+        this->statsOverlayBorder_->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f);
+        this->statsOverlayBorder_->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f);
+        this->statsOverlayBorder_->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f);
 
         background_->addChild(statsOverlayBorder_);
 

Modified: code/trunk/src/modules/questsystem/QuestGUINode.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestGUINode.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/questsystem/QuestGUINode.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -160,8 +160,8 @@
             stream << this->window_->getName() << "/Details";
             const QuestDescription* description = this->item_->getDescription();
             this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str());
-            this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7, 0),CEGUI::UDim(0.7, 0)));
-            this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1, 0),CEGUI::UDim(0.1, 0)));
+            this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7f, 0),CEGUI::UDim(0.7f, 0)));
+            this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1f, 0),CEGUI::UDim(0.1f, 0)));
             this->details_->setText(description->getTitle());
             this->details_->setAlpha(1.0);
             this->details_->setInheritsAlpha(false);
@@ -172,7 +172,7 @@
             stream << "/Scrollable";
             CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str());
             window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT)));
-            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, QuestGUINode::TITLE_HEIGHT)));
+            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::TITLE_HEIGHT)));
             this->details_->addChildWindow(window);
 
             int height;
@@ -202,8 +202,8 @@
                 statusWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
                 statusWindow->setProperty("VertFormatting", "TopAligned");
                 statusWindow->setText(status);
-                statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+                statusWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
+                statusWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
                 height = setHeight(statusWindow);
 
                 offset += height;
@@ -218,8 +218,8 @@
             descriptionWindowTitle->setProperty("HorzFormatting", "HorzCentred");
             descriptionWindowTitle->setProperty("VertFormatting", "TopAligned");
             descriptionWindowTitle->setText("Description:");
-            descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+            descriptionWindowTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
+            descriptionWindowTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
 
             offset += setHeight(descriptionWindowTitle);
 
@@ -231,8 +231,8 @@
             descriptionWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
             descriptionWindow->setProperty("VertFormatting", "TopAligned");
             descriptionWindow->setText(description->getDescription());
-            descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
-            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
+            descriptionWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
+            descriptionWindow->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0f, 0)));
             height = setHeight(descriptionWindow);
 
             offset += height;
@@ -254,14 +254,14 @@
                             hintsTitle->setProperty("HorzFormatting", "HorzCentred");
                             hintsTitle->setProperty("VertFormatting", "TopAligned");
                             hintsTitle->setText("Hints:");
-                            hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+                            hintsTitle->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
                             hintsTitle->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(1.0, 0)));
                             offset += setHeight(hintsTitle);;
                             title = false;
                         }
                         QuestGUINode* node = *it;
-                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
-                        node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, offset)));
+                        node->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1.0f, (float)-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT)));
+                        node->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0),CEGUI::UDim(0, (float)offset)));
                         window->addChildWindow(node->window_);
                         offset += QuestGUINode::BUTTON_HEIGHT;
                     }
@@ -336,7 +336,7 @@
         const float frameHeight = window->getUnclippedPixelRect().getHeight() - formattedArea.getHeight();
 
         //! Get the formatted line count - using the formatting area obtained above.
-        const float lines = window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned);
+        const float lines = (float)(window->getFont()->getFormattedLineCount(window->getText(), formattedArea, CEGUI::WordWrapLeftAligned));
 
         //! 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.
         const float height = lines * window->getFont()->getLineSpacing() + frameHeight;
@@ -356,8 +356,8 @@
     */
     void QuestGUINode::updatePosition(void)
     {
-        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, QuestGUINode::INDENT_WIDTH*this->depth_),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT*this->index_)));
-        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, -QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH),CEGUI::UDim(0, QuestGUINode::BUTTON_HEIGHT)));
+        this->window_->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)(QuestGUINode::INDENT_WIDTH*this->depth_)),CEGUI::UDim(0, (float)(QuestGUINode::BUTTON_HEIGHT*this->index_))));
+        this->window_->setSize(CEGUI::UVector2(CEGUI::UDim(1, (float)(-QuestGUINode::INDENT_WIDTH*this->depth_-QuestGUINode::SCROLLBAR_WIDTH)),CEGUI::UDim(0, (float)QuestGUINode::BUTTON_HEIGHT)));
     }
 
     /**

Modified: code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc
===================================================================
--- code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/questsystem/notifications/NotificationQueue.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -138,11 +138,11 @@
             while(it != this->containers_.upper_bound(&this->timeLimit_)) //!< Iterate through all elements whose creation time is smaller than the current time minus the display time.
             {
                 this->removeContainer(*it);
-                this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
+                this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
                 it = this->containers_.begin(); //TODO: Needed?
             }
 
-            this->tickTime_ = 0.0; //!< Reset time counter.
+            this->tickTime_ = 0.0f; //!< Reset time counter.
         }
     }
 
@@ -192,7 +192,7 @@
         {
             it = this->containers_.begin();
             this->removeContainer(*it);
-            this->scroll(Vector2(0.0,-(1.1*this->getFontSize())));
+            this->scroll(Vector2(0.0f,-(1.1f*this->getFontSize())));
         }
 
         COUT(3) << "NotificationQueue updated. A new Notifications has been added." << std::endl;
@@ -374,7 +374,7 @@
         for (std::multiset<NotificationOverlayContainer*, NotificationOverlayContainerCompare>::iterator it = this->containers_.begin(); it != this->containers_.end(); it++) //!< Set the position for each overlay.
         {
             (*it)->overlay->setPosition(this->getPosition());
-            (*it)->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*counter));
+            (*it)->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*counter));
             counter++;
         }
     }
@@ -406,7 +406,7 @@
         this->addElement(container->overlay);
         this->size_= this->size_+1;
 
-        container->overlay->scroll(Vector2(0.0,(1.1*this->getFontSize())*(this->getSize()-1)));
+        container->overlay->scroll(Vector2(0.0f,(1.1f*this->getFontSize())*(this->getSize()-1)));
     }
 
     /**

Modified: code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/weapons/projectiles/BillboardProjectile.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -47,7 +47,7 @@
             this->attachOgreObject(this->billboard_.getBillboardSet());
         }
 
-        this->setScale(0.2);
+        this->setScale(0.2f);
     }
 
     BillboardProjectile::~BillboardProjectile()

Modified: code/trunk/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Rocket.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/weapons/projectiles/Rocket.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -65,7 +65,7 @@
 
             Model* model = new Model(this);
             model->setMeshSource("rocket.mesh");
-            model->scale(0.7);
+            model->scale(0.7f);
             this->attach(model);
             ParticleEmitter* fire = new ParticleEmitter(this);
             this->attach(fire);

Modified: code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/modules/weapons/weaponmodes/RocketFire.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -45,7 +45,7 @@
     {
         RegisterObject(RocketFire);
 
-        this->reloadTime_ = 0.20;
+        this->reloadTime_ = 0.20f;
         this->bParallelReload_ = false;
         this->damage_ = 100;
         this->speed_ = 500;

Modified: code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/controllers/ArtificialController.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -64,14 +64,14 @@
         if (this->target_ || distance > 10)
         {
             // Multiply with 0.8 to make them a bit slower
-            this->getControllableEntity()->rotateYaw(-0.8 * sgn(coord.x) * coord.x*coord.x);
-            this->getControllableEntity()->rotatePitch(0.8 * sgn(coord.y) * coord.y*coord.y);
+            this->getControllableEntity()->rotateYaw(-0.8f * sgn(coord.x) * coord.x*coord.x);
+            this->getControllableEntity()->rotatePitch(0.8f * sgn(coord.y) * coord.y*coord.y);
         }
 
         if (this->target_ && distance < 200 && this->getControllableEntity()->getVelocity().squaredLength() > this->target_->getVelocity().squaredLength())
-            this->getControllableEntity()->moveFrontBack(-0.5); // They don't brake with full power to give the player a chance
+            this->getControllableEntity()->moveFrontBack(-0.5f); // They don't brake with full power to give the player a chance
         else
-            this->getControllableEntity()->moveFrontBack(0.8);
+            this->getControllableEntity()->moveFrontBack(0.8f);
     }
 
     void ArtificialController::moveToTargetPosition()

Modified: code/trunk/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/NewHumanController.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/controllers/NewHumanController.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -73,10 +73,10 @@
     {
         RegisterObject(NewHumanController);
 
-        overlaySize_ = 0.08;
-        arrowsSize_ = 0.4;
+        overlaySize_ = 0.08f;
+        arrowsSize_ = 0.4f;
 
-        damageOverlayTime_ = 0.6;
+        damageOverlayTime_ = 0.6f;
 
         controlMode_ = 0;
         acceleration_ = 0;
@@ -100,34 +100,34 @@
 
             centerOverlay_ = new OrxonoxOverlay(this);
             centerOverlay_->setBackgroundMaterial("Orxonox/CenterOverlay");
-            centerOverlay_->setSize(Vector2(overlaySize_ * 2.5, overlaySize_ * 2.5));
-            centerOverlay_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));
+            centerOverlay_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
+            centerOverlay_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f));
             centerOverlay_->hide();
 
             if (showDamageOverlay_)
             {
                 damageOverlayTop_ = new OrxonoxOverlay(this);
                 damageOverlayTop_->setBackgroundMaterial("Orxonox/DamageOverlayTop");
-                damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5, overlaySize_ * 2.5));
-                damageOverlayTop_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));
+                damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
+                damageOverlayTop_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f));
                 damageOverlayTop_->hide();
 
                 damageOverlayRight_ = new OrxonoxOverlay(this);
                 damageOverlayRight_->setBackgroundMaterial("Orxonox/DamageOverlayRight");
-                damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5, overlaySize_ * 2.5));
-                damageOverlayRight_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));
+                damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
+                damageOverlayRight_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f));
                 damageOverlayRight_->hide();
 
                 damageOverlayBottom_ = new OrxonoxOverlay(this);
                 damageOverlayBottom_->setBackgroundMaterial("Orxonox/DamageOverlayBottom");
-                damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5, overlaySize_ * 2.5));
-                damageOverlayBottom_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));
+                damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
+                damageOverlayBottom_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f));
                 damageOverlayBottom_->hide();
 
                 damageOverlayLeft_ = new OrxonoxOverlay(this);
                 damageOverlayLeft_->setBackgroundMaterial("Orxonox/DamageOverlayLeft");
-                damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5, overlaySize_ * 2.5));
-                damageOverlayLeft_->setPosition(Vector2(0.5 - overlaySize_*2.5/2.0, 0.5 - overlaySize_*2.5/2.0));
+                damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
+                damageOverlayLeft_->setPosition(Vector2(0.5f - overlaySize_*2.5f/2.0f, 0.5f - overlaySize_*2.5f/2.0f));
                 damageOverlayLeft_->hide();
             }
 
@@ -135,30 +135,30 @@
             {
                 arrowsOverlay1_ = new OrxonoxOverlay(this);
                 arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1");
-                arrowsOverlay1_->setSize(Vector2(0.02727, 0.36 * arrowsSize_));
-                arrowsOverlay1_->setPickPoint(Vector2(0.5, 0.5));
-                arrowsOverlay1_->setPosition(Vector2(0.5, 0.5));
+                arrowsOverlay1_->setSize(Vector2(0.02727f, 0.36f * arrowsSize_));
+                arrowsOverlay1_->setPickPoint(Vector2(0.5f, 0.5f));
+                arrowsOverlay1_->setPosition(Vector2(0.5f, 0.5f));
                 arrowsOverlay1_->hide();
 
                 arrowsOverlay2_ = new OrxonoxOverlay(this);
                 arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2");
-                arrowsOverlay2_->setSize(Vector2(0.02727, 0.59 * arrowsSize_));
-                arrowsOverlay2_->setPickPoint(Vector2(0.5, 0.5));
-                arrowsOverlay2_->setPosition(Vector2(0.5, 0.5));
+                arrowsOverlay2_->setSize(Vector2(0.02727f, 0.59f * arrowsSize_));
+                arrowsOverlay2_->setPickPoint(Vector2(0.5f, 0.5f));
+                arrowsOverlay2_->setPosition(Vector2(0.5f, 0.5f));
                 arrowsOverlay2_->hide();
 
                 arrowsOverlay3_ = new OrxonoxOverlay(this);
                 arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3");
-                arrowsOverlay3_->setSize(Vector2(0.02727, 0.77 * arrowsSize_));
-                arrowsOverlay3_->setPickPoint(Vector2(0.5, 0.5));
-                arrowsOverlay3_->setPosition(Vector2(0.5, 0.5));
+                arrowsOverlay3_->setSize(Vector2(0.02727f, 0.77f * arrowsSize_));
+                arrowsOverlay3_->setPickPoint(Vector2(0.5f, 0.5f));
+                arrowsOverlay3_->setPosition(Vector2(0.5f, 0.5f));
                 arrowsOverlay3_->hide();
 
                 arrowsOverlay4_ = new OrxonoxOverlay(this);
                 arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4");
-                arrowsOverlay4_->setSize(Vector2(0.02727, arrowsSize_));
-                arrowsOverlay4_->setPickPoint(Vector2(0.5, 0.5));
-                arrowsOverlay4_->setPosition(Vector2(0.5, 0.5));
+                arrowsOverlay4_->setSize(Vector2(0.02727f, arrowsSize_));
+                arrowsOverlay4_->setPickPoint(Vector2(0.5f, 0.5f));
+                arrowsOverlay4_->setPosition(Vector2(0.5f, 0.5f));
                 arrowsOverlay4_->hide();
             }
         }
@@ -212,7 +212,7 @@
                     if (this->getControllableEntity() && (this->getControllableEntity()->isExactlyA(ClassByString("SpaceShip")) || this->getControllableEntity()->isExactlyA(ClassByString("Rocket"))))
                         this->showOverlays();
 
-                    this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize_/2));
+                    this->crossHairOverlay_->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5f-overlaySize_/2, static_cast<float>(this->currentPitch_)/2*-1+.5f-overlaySize_/2));
 
                     if (this->controlMode_ == 0 || (this->controlMode_ == 1 && this->firemode_ == 1))
                     {
@@ -298,7 +298,7 @@
             //y is down positive
             relativeHit.normalise();
 
-            float threshold = 0.3;
+            float threshold = 0.3f;
             if (relativeHit.x > threshold) // Left
             {
                 this->damageOverlayLeft_->show();
@@ -342,7 +342,7 @@
     {
         Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
 
-        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);
+        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);
 
         rsq->setRay(mouseRay);
         rsq->setSortByDistance(true);
@@ -504,24 +504,24 @@
 
             float distance = sqrt(pow(static_cast<float>(this->currentYaw_)/2*-1,2) + pow(static_cast<float>(this->currentPitch_)/2*-1,2));
 
-            if (distance > 0.04 && distance <= 0.59 * arrowsSize_ / 2.0 )
+            if (distance > 0.04f && distance <= 0.59f * arrowsSize_ / 2.0f )
             {
-                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));
+                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));
                 this->arrowsOverlay1_->show();
             }
-            else if (distance > 0.59 * arrowsSize_ / 2.0 && distance <= 0.77 * arrowsSize_ / 2.0 )
+            else if (distance > 0.59f * arrowsSize_ / 2.0f && distance <= 0.77f * arrowsSize_ / 2.0f )
             {
-                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));
+                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));
                 this->arrowsOverlay2_->show();
             }
-            else if (distance > 0.77 * arrowsSize_ / 2.0 && distance <= arrowsSize_ / 2.0)
+            else if (distance > 0.77f * arrowsSize_ / 2.0f && distance <= arrowsSize_ / 2.0f)
             {
-                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));
+                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));
                 this->arrowsOverlay3_->show();
             }
-            else if (distance > arrowsSize_ / 2.0)
+            else if (distance > arrowsSize_ / 2.0f)
             {
-                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));
+                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));
                 this->arrowsOverlay4_->show();
             }
         }

Modified: code/trunk/src/orxonox/controllers/WaypointPatrolController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -67,7 +67,7 @@
             if (this->bHasTargetPosition_)
                 this->moveToTargetPosition();
 
-            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
+            if (this->getControllableEntity() && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
                 this->getControllableEntity()->fire(0);
         }
         else
@@ -84,7 +84,7 @@
             return;
 
         Vector3 myposition = this->getControllableEntity()->getPosition();
-        float shortestsqdistance = static_cast<unsigned int>(-1);
+        float shortestsqdistance = (float)static_cast<unsigned int>(-1);
 
         for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
         {

Modified: code/trunk/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/trunk/src/orxonox/overlays/InGameConsole.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/overlays/InGameConsole.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -199,11 +199,11 @@
         this->consoleOverlayBorder_->setMaterialName("ConsoleCenter");
         this->consoleOverlayBorder_->setBorderSize(16, 16, 0, 16);
         this->consoleOverlayBorder_->setBorderMaterialName("ConsoleBorder");
-        this->consoleOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
-        this->consoleOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
-        this->consoleOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
-        this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
-        this->consoleOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+        this->consoleOverlayBorder_->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f);
+        this->consoleOverlayBorder_->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f);
+        this->consoleOverlayBorder_->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f);
+        this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f);
+        this->consoleOverlayBorder_->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f);
         this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_);
 
         // create a new font to match the requested size exactly
@@ -253,7 +253,7 @@
 
         // move overlay "above" the top edge of the screen
         // we take -1.3 because the border makes the panel bigger
-        this->consoleOverlayContainer_->setTop(-1.3 * this->relativeHeight);
+        this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight);
 
         COUT(4) << "Info: InGameConsole initialized" << std::endl;
     }
@@ -331,7 +331,7 @@
             pos = maxCharsPerLine_;
 
         this->consoleOverlayCursor_->setCaption(std::string(pos,' ') + cursorSymbol_);
-        this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24);
+        this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24.0f);
     }
 
     /**
@@ -368,7 +368,7 @@
                 // scrolling down
                 // enlarge oldTop a little bit so that this exponential function
                 // reaches 0 before infinite time has passed...
-                float deltaScroll = (oldTop - 0.01) * time.getDeltaTime() * this->scrollSpeed_;
+                float deltaScroll = (oldTop - 0.01f) * time.getDeltaTime() * this->scrollSpeed_;
                 if (oldTop - deltaScroll >= 0)
                 {
                     // window has completely scrolled down
@@ -383,11 +383,11 @@
             {
                 // scrolling up
                 // note: +0.01 for the same reason as when scrolling down
-                float deltaScroll = (1.3 * this->relativeHeight + 0.01 + oldTop) * time.getDeltaTime() * this->scrollSpeed_;
+                float deltaScroll = (1.3f * this->relativeHeight + 0.01f + oldTop) * time.getDeltaTime() * this->scrollSpeed_;
                 if (oldTop - deltaScroll <= -1.3 * this->relativeHeight)
                 {
                     // window has completely scrolled up
-                    this->consoleOverlayContainer_->setTop(-1.3 * this->relativeHeight);
+                    this->consoleOverlayContainer_->setTop(-1.3f * this->relativeHeight);
                     this->scroll_ = 0;
                     this->consoleOverlay_->hide();
                 }
@@ -423,10 +423,10 @@
     {
         this->windowW_ = newWidth;
         this->windowH_ = newHeight;
-        this->consoleOverlayBorder_->setWidth(static_cast<int>(this->windowW_* this->relativeWidth));
-        this->consoleOverlayBorder_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight));
-        this->consoleOverlayNoise_->setWidth(static_cast<int>(this->windowW_ * this->relativeWidth) - 10);
-        this->consoleOverlayNoise_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight) - 5);
+        this->consoleOverlayBorder_->setWidth((float)(int)(this->windowW_* this->relativeWidth));
+        this->consoleOverlayBorder_->setHeight((float)(int)(this->windowH_ * this->relativeHeight));
+        this->consoleOverlayNoise_->setWidth((float)(int)(this->windowW_ * this->relativeWidth) - 10.0f);
+        this->consoleOverlayNoise_->setHeight((float)(int)(this->windowH_ * this->relativeHeight) - 5.0f);
         this->consoleOverlayNoise_->setTiling(consoleOverlayNoise_->getWidth() / (50.0f * this->noiseSize_), consoleOverlayNoise_->getHeight() / (50.0f * this->noiseSize_));
 
         // now adjust the text lines...
@@ -439,8 +439,8 @@
 
         for (int i = 0; i < LINES; i++)
         {
-            this->consoleOverlayTextAreas_[i]->setWidth(this->desiredTextWidth_);
-            this->consoleOverlayTextAreas_[i]->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24 - 14*i);
+            this->consoleOverlayTextAreas_[i]->setWidth((float)this->desiredTextWidth_);
+            this->consoleOverlayTextAreas_[i]->setTop((float)(int)(this->windowH_ * this->relativeHeight) - 24 - 14*i);
         }
 
         this->linesChanged();
@@ -555,32 +555,32 @@
         ColourValue colourTop, colourBottom;
         switch (type)
         {
-        case Shell::Error:   colourTop = ColourValue(0.95, 0.25, 0.25, 1.00);
-                          colourBottom = ColourValue(1.00, 0.50, 0.50, 1.00); break;
+        case Shell::Error:   colourTop = ColourValue(0.95f, 0.25f, 0.25f, 1.00f);
+                          colourBottom = ColourValue(1.00f, 0.50f, 0.50f, 1.00f); break;
 
-        case Shell::Warning: colourTop = ColourValue(0.95, 0.50, 0.20, 1.00);
-                          colourBottom = ColourValue(1.00, 0.70, 0.50, 1.00); break;
+        case Shell::Warning: colourTop = ColourValue(0.95f, 0.50f, 0.20f, 1.00f);
+                          colourBottom = ColourValue(1.00f, 0.70f, 0.50f, 1.00f); break;
 
-        case Shell::Info:    colourTop = ColourValue(0.50, 0.50, 0.95, 1.00);
-                          colourBottom = ColourValue(0.80, 0.80, 1.00, 1.00); break;
+        case Shell::Info:    colourTop = ColourValue(0.50f, 0.50f, 0.95f, 1.00f);
+                          colourBottom = ColourValue(0.80f, 0.80f, 1.00f, 1.00f); break;
 
-        case Shell::Debug:   colourTop = ColourValue(0.65, 0.48, 0.44, 1.00);
-                          colourBottom = ColourValue(1.00, 0.90, 0.90, 1.00); break;
+        case Shell::Debug:   colourTop = ColourValue(0.65f, 0.48f, 0.44f, 1.00f);
+                          colourBottom = ColourValue(1.00f, 0.90f, 0.90f, 1.00f); break;
 
-        case Shell::Verbose: colourTop = ColourValue(0.40, 0.20, 0.40, 1.00);
-                          colourBottom = ColourValue(0.80, 0.60, 0.80, 1.00); break;
+        case Shell::Verbose: colourTop = ColourValue(0.40f, 0.20f, 0.40f, 1.00f);
+                          colourBottom = ColourValue(0.80f, 0.60f, 0.80f, 1.00f); break;
 
-        case Shell::Ultra:   colourTop = ColourValue(0.21, 0.69, 0.21, 1.00);
-                          colourBottom = ColourValue(0.80, 1.00, 0.80, 1.00); break;
+        case Shell::Ultra:   colourTop = ColourValue(0.21f, 0.69f, 0.21f, 1.00f);
+                          colourBottom = ColourValue(0.80f, 1.00f, 0.80f, 1.00f); break;
 
-        case Shell::Command: colourTop = ColourValue(0.80, 0.80, 0.80, 1.00);
-                          colourBottom = ColourValue(0.90, 0.90, 0.90, 0.90); break;
+        case Shell::Command: colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f);
+                          colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 0.90f); break;
 
-        case Shell::Hint:    colourTop = ColourValue(0.80, 0.80, 0.80, 1.00);
-                          colourBottom = ColourValue(0.90, 0.90, 0.90, 1.00); break;
+        case Shell::Hint:    colourTop = ColourValue(0.80f, 0.80f, 0.80f, 1.00f);
+                          colourBottom = ColourValue(0.90f, 0.90f, 0.90f, 1.00f); break;
 
-        default:             colourTop = ColourValue(0.90, 0.90, 0.90, 1.00);
-                          colourBottom = ColourValue(1.00, 1.00, 1.00, 1.00); break;
+        default:             colourTop = ColourValue(0.90f, 0.90f, 0.90f, 1.00f);
+                          colourBottom = ColourValue(1.00f, 1.00f, 1.00f, 1.00f); break;
         }
 
         this->consoleOverlayTextAreas_[index]->setColourTop   (colourTop);

Modified: code/trunk/src/orxonox/overlays/Map.cc
===================================================================
--- code/trunk/src/orxonox/overlays/Map.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/overlays/Map.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -178,25 +178,25 @@
             //m_pOverlayPanel->setMetricsMode(Ogre::GMM_PIXELS);
             //m_pOverlayPanel->setPosition(10, 10);
             //m_pOverlayPanel->setDimensions(600, 400);
-            m_pOverlayPanel->setPosition(0.01, 0.003);
-            m_pOverlayPanel->setDimensions(0.5, 0.4);
+            m_pOverlayPanel->setPosition(0.01f, 0.003f);
+            m_pOverlayPanel->setDimensions(0.5f, 0.4f);
             // Give overlay a texture
             m_pOverlayPanel->setMaterialName("RttMat");
             overlay_->add2D(m_pOverlayPanel);
 
             //Add Borders
             Ogre::BorderPanelOverlayElement* oBorder = static_cast<Ogre::BorderPanelOverlayElement*>(Ogre::OverlayManager::getSingletonPtr()->createOverlayElement("BorderPanel", "MapBorderPanel" + getUniqueNumberString()));
-            oBorder->setBorderSize( 0.003, 0.003 );
-            oBorder->setDimensions(0.5, 0.4);
+            oBorder->setBorderSize( 0.003f, 0.003f );
+            oBorder->setDimensions(0.5f, 0.4f);
             oBorder->setBorderMaterialName("StatsBorder");
-            oBorder->setTopBorderUV(0.49, 0.0, 0.51, 0.5);
-            oBorder->setTopLeftBorderUV(0.0, 0.0, 0.5, 0.5);
-            oBorder->setTopRightBorderUV(0.5, 0.0, 1.0, 0.5);
-            oBorder->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
-            oBorder->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
-            oBorder->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
-            oBorder->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
-            oBorder->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
+            oBorder->setTopBorderUV(0.49f, 0.0f, 0.51f, 0.5f);
+            oBorder->setTopLeftBorderUV(0.0f, 0.0f, 0.5f, 0.5f);
+            oBorder->setTopRightBorderUV(0.5f, 0.0f, 1.0f, 0.5f);
+            oBorder->setLeftBorderUV(0.0f, 0.49f, 0.5f, 0.51f);
+            oBorder->setRightBorderUV(0.5f, 0.49f, 1.0f, 0.5f);
+            oBorder->setBottomBorderUV(0.49f, 0.5f, 0.51f, 1.0f);
+            oBorder->setBottomLeftBorderUV(0.0f, 0.5f, 0.5f, 1.0f);
+            oBorder->setBottomRightBorderUV(0.5f, 0.5f, 1.0f, 1.0f);
             //overlay_->add2D(oBorder);
             m_pOverlayPanel->addChild(oBorder);
         }
@@ -328,8 +328,8 @@
                     this->CamNode_->attachObject(this->Cam_);
                 //this->CamNodeHelper_ = this->CamNode_->createChildSceneNode();
                 //this->CamNodeHelper_->attachObject(this->Cam_);
-                    this->Cam_->setPosition(0, 0, DISTANCE);
-                    this->Cam_->pitch( static_cast<Degree>(PITCH) );
+                    this->Cam_->setPosition(0, 0, (float)DISTANCE);
+                    this->Cam_->pitch( static_cast<Degree>((float)PITCH) );
                     this->Cam_->lookAt(this->playerShipNode_->getPosition());
                 //this->Cam_->setAutoTracking(true, this->playerShipNode_);
                 }

Modified: code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -225,7 +225,7 @@
             float tempAspect;
             if (angle > 89.0f && angle < 91.0f)
             {
-                tempAspect = 1.0 / this->windowAspectRatio_;
+                tempAspect = 1.0f / this->windowAspectRatio_;
                 rotState_ = Vertical;
             }
             else if (angle > 179 || angle < 1)

Modified: code/trunk/src/orxonox/pickup/PickupInventory.cc
===================================================================
--- code/trunk/src/orxonox/pickup/PickupInventory.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/pickup/PickupInventory.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -300,13 +300,13 @@
         if(!winMgr) { return; }
 
         CEGUI::Window* frame = winMgr->createWindow("TaharezLook/StaticImage", "orxonox/Inventory/Frame/" + id);
-        frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 5 + y * 90)));
+        frame->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5.0f + x * 70), CEGUI::UDim(0, 5.0f + y * 90)));
         frame->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 65)));
         frame->setRiseOnClickEnabled(false);
         frame->setVisible(false);
 
         CEGUI::Window* text = winMgr->createWindow("TaharezLook/StaticText", "orxonox/Inventory/Title/" + id);
-        text->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5 + x * 70), CEGUI::UDim(0, 70 + y * 90)));
+        text->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 5.0f + x * 70), CEGUI::UDim(0, 70.0f + y * 90)));
         text->setSize(CEGUI::UVector2(CEGUI::UDim(0, 65), CEGUI::UDim(0, 20)));
         text->setProperty("FrameEnabled", "False");
         text->setProperty("BackgroundEnabled", "False");
@@ -316,7 +316,7 @@
         text->setVisible(false);
 
         CEGUI::Window* btn = winMgr->createWindow("TaharezLook/Button", "orxonox/Inventory/Items/" + id);
-        btn->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 8 + x * 70), CEGUI::UDim(0, 8 + y * 90)));
+        btn->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 8.0f + x * 70), CEGUI::UDim(0, 8.0f + y * 90)));
         btn->setSize(CEGUI::UVector2(CEGUI::UDim(0, 59), CEGUI::UDim(0, 59)));
         btn->subscribeScriptedEvent("Clicked", "PickupInventory.itemClicked");
         btn->setVisible(false);

Modified: code/trunk/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/BaseSound.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/sound/BaseSound.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -177,11 +177,11 @@
 
     void BaseSound::setPitch(float pitch)
     {
-        if (pitch > 2 || pitch < 0.5)
+        if (pitch > 2 || pitch < 0.5f)
         {
             COUT(2) << "Sound warning: pitch out of range, cropping value." << std::endl;
-            pitch = pitch > 2 ? 2 : pitch;
-            pitch = pitch < 0.5 ? 0.5 : pitch;
+            pitch = pitch > 2.0f ? 2.0f : pitch;
+            pitch = pitch < 0.5f ? 0.5f : pitch;
         }
         this->pitch_ = pitch;
         if (alIsSource(this->audioSource_))

Modified: code/trunk/src/orxonox/sound/SoundBuffer.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundBuffer.cc	2010-03-11 10:32:01 UTC (rev 6501)
+++ code/trunk/src/orxonox/sound/SoundBuffer.cc	2010-03-11 10:34:20 UTC (rev 6502)
@@ -107,13 +107,13 @@
         switch (whence)
         {
         case SEEK_SET:
-            stream->seek(offset);
+            stream->seek((size_t)offset);
             break;
         case SEEK_CUR:
-            stream->skip(offset);
+            stream->skip((size_t)offset);
             break;
         case SEEK_END:
-            stream->seek(stream->size() + offset);
+            stream->seek(stream->size() + (size_t)offset);
             break;
         default:
             return -1;




More information about the Orxonox-commit mailing list