Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3192


Ignore:
Timestamp:
Jun 18, 2009, 10:00:15 AM (15 years ago)
Author:
rgrieder
Message:

Replaced <OgrePrerequisites.h> with "util/OgreForwardRefs.h": I haven't yet realised that OgrePrerequisites.h includes about every single std header by including the OgreMemoryManager.h file.
And while at it, I took care of some type conversions (partially revealed by the missing OgrePrerequisites.h that disabled warnings)

Location:
code/branches/pch/src
Files:
1 added
52 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/core/Clock.cc

    r1755 r3192  
    5757        tickTime_ = storedTime_ + timersTime;
    5858        tickDt_ = timersTime - lastTimersTime_;
    59         tickDtFloat_ = (float)tickDt_ / 1000000.0f;
     59        tickDtFloat_ = static_cast<float>(tickDt_ / 1000000.0f);
    6060
    6161        if (timersTime > 0x7FFFFFF0)
  • code/branches/pch/src/core/Clock.h

    r2896 r3192  
    3939
    4040#include "CorePrereqs.h"
    41 #include <OgrePrerequisites.h>
     41#include "util/OgreForwardRefs.h"
    4242
    4343namespace orxonox
     
    5353        unsigned long long getMicroseconds()   const { return tickTime_; }
    5454        unsigned long long getMilliseconds()   const { return tickTime_ / 1000; }
    55         int                getSeconds()        const { return tickTime_ / 1000000; }
    56         float              getSecondsPrecise() const { return (float)tickTime_ / 1000000.0f; }
     55        unsigned long      getSeconds()        const { return static_cast<long> (tickTime_ / 1000000); }
     56        float              getSecondsPrecise() const { return static_cast<float>(tickTime_ / 1000000.0f); }
    5757
    5858        float              getDeltaTime()      const { return tickDtFloat_; }
    59         int                getDeltaTimeMicroseconds() const { return tickDt_; }
     59        long               getDeltaTimeMicroseconds() const { return tickDt_; }
    6060
    6161        unsigned long long getRealMicroseconds() const;
     
    6767        unsigned long long storedTime_;
    6868        unsigned long long tickTime_;
    69         int                tickDt_;
     69        long               tickDt_;
    7070        float              tickDtFloat_;
    7171        unsigned long      lastTimersTime_;
  • code/branches/pch/src/core/ConsoleCommandCompilation.cc

    r3154 r3192  
    170170                COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << "'" << std::endl;
    171171            }
    172             return expr.getResult();
     172            return static_cast<float>(expr.getResult());
    173173        }
    174174        else
  • code/branches/pch/src/core/Core.cc

    r3166 r3192  
    367367        if (!bInitialized && this->bInitializeRandomNumberGenerator_)
    368368        {
    369             srand(time(0));
     369            srand(static_cast<unsigned int>(time(0)));
    370370            rand();
    371371            bInitialized = true;
  • code/branches/pch/src/core/Game.cc

    r3154 r3192  
    190190
    191191                if ((*it)->getCountTickTime())
    192                     this->addTickTime(this->gameClock_->getRealMicroseconds() - timeBeforeTick);
     192                    this->addTickTime(static_cast<uint32_t>(this->gameClock_->getRealMicroseconds() - timeBeforeTick));
    193193            }
    194194
     
    212212
    213213                uint32_t framesPerPeriod = this->statisticsTickTimes_.size();
    214                 this->avgFPS_ = (float)framesPerPeriod / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0;
    215                 this->avgTickTime_ = (float)this->periodTickTime_ / framesPerPeriod / 1000.0;
     214                this->avgFPS_ = static_cast<float>(framesPerPeriod) / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0f;
     215                this->avgTickTime_ = static_cast<float>(this->periodTickTime_) / framesPerPeriod / 1000.0f;
    216216
    217217                this->periodTime_ -= this->statisticsRefreshCycle_;
  • code/branches/pch/src/core/input/InputManager.cc

    r3187 r3192  
    11661166        else
    11671167        {
    1168             float fValue = value - joyStickCalibrations_[iJoyStick].middleValue[axis];
     1168            float fValue = static_cast<float>(value - joyStickCalibrations_[iJoyStick].middleValue[axis]);
    11691169            if (fValue > 0.0f)
    11701170                fValue *= joyStickCalibrations_[iJoyStick].positiveCoeff[axis];
  • code/branches/pch/src/core/input/KeyBinder.cc

    r3148 r3192  
    317317                    {
    318318                        mouseAxes_[2*i + 0].absVal_
    319                             = -mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
     319                            = -mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
    320320                        mouseAxes_[2*i + 1].absVal_ = 0.0f;
    321321                    }
     
    324324                        mouseAxes_[2*i + 0].absVal_ = 0.0f;
    325325                        mouseAxes_[2*i + 1].absVal_
    326                             =  mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
     326                            =  mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
    327327                    }
    328328                    else
  • code/branches/pch/src/orxonox/CameraManager.h

    r3131 r3192  
    4040#include <cassert>
    4141#include <list>
    42 #include <OgrePrerequisites.h>
     42#include "util/OgreForwardRefs.h"
    4343
    4444namespace orxonox
  • code/branches/pch/src/orxonox/OrxonoxPrereqs.h

    r3156 r3192  
    287287namespace Ogre
    288288{
    289     // some got forgotten in OgrePrerequisites
    290     class BorderPanelOverlayElement;
    291     class PanelOverlayElement;
    292     class TextAreaOverlayElement;
    293 
    294289    // OGRE Wiki adapted code
    295290    class DynamicLines;
  • code/branches/pch/src/orxonox/gamestates/GSMainMenu.h

    r3173 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
    3535#include "core/GameState.h"
    3636
  • code/branches/pch/src/orxonox/gui/GUIManager.cc

    r3153 r3192  
    395395    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    396396    {
    397         guiSystem_->injectMouseMove(rel.x, rel.y);
     397        guiSystem_->injectMouseMove(static_cast<float>(rel.x), static_cast<float>(rel.y));
    398398    }
    399399    void GUIManager::mouseScrolled(int abs, int rel)
    400400    {
    401         guiSystem_->injectMouseWheelChange(rel);
     401        guiSystem_->injectMouseWheelChange(static_cast<float>(rel));
    402402    }
    403403
  • code/branches/pch/src/orxonox/gui/GUIManager.h

    r3156 r3192  
    4141#include <map>
    4242#include <string>
    43 #include <OgrePrerequisites.h>
    4443#include <CEGUIForwardRefs.h>
    4544
     45#include "util/OgreForwardRefs.h"
    4646#include "core/input/InputInterfaces.h"
    4747
  • code/branches/pch/src/orxonox/interfaces/RadarViewable.cc

    r3182 r3192  
    126126//Vector3 v = this->getRVWorldPosition();
    127127            //this->line_->setPoint(1, Vector3(0,v.y,0) );
    128             this->line_->setPoint(1, Vector3( 0, (int) -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ,0 ));
     128            this->line_->setPoint(1, Vector3( 0, static_cast<float>(static_cast<int>( -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ) ) ,0 ));
    129129            this->line_->update();
    130130            if( Map::getSingletonPtr()->playerShipNode_ )
  • code/branches/pch/src/orxonox/interfaces/RadarViewable.h

    r3182 r3192  
    3434#include <string>
    3535#include <cassert>
    36 #include <OgrePrerequisites.h>
    3736
    3837#include "util/Math.h"
     38#include "util/OgreForwardRefs.h"
    3939#include "core/OrxonoxClass.h"
    4040
  • code/branches/pch/src/orxonox/objects/Scene.cc

    r3175 r3192  
    102102
    103103        XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
    104         XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2, 0.2, 0.2, 1));
     104        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
    105105        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
    106106
  • code/branches/pch/src/orxonox/objects/Scene.h

    r3177 r3192  
    3636#include <set>
    3737#include <string>
    38 #include <OgrePrerequisites.h>
    3938
    4039#include "util/Math.h"
     40#include "util/OgreForwardRefs.h"
    4141#include "core/BaseObject.h"
    4242#include "network/synchronisable/Synchronisable.h"
  • code/branches/pch/src/orxonox/objects/collisionshapes/CollisionShape.cc

    r3176 r3192  
    126126    bool CollisionShape::hasTransform() const
    127127    {
    128         return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001) ||
    129                 !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1)));
     128        return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001f) ||
     129                !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1f)));
    130130    }
    131131
  • code/branches/pch/src/orxonox/objects/controllers/AIController.cc

    r3176 r3192  
    108108            this->moveToTargetPosition();
    109109
    110         if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
     110        if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
    111111            this->getControllableEntity()->fire(0);
    112112
  • code/branches/pch/src/orxonox/objects/controllers/PongAI.cc

    r3176 r3192  
    3939    CreateUnloadableFactory(PongAI);
    4040
    41     const static float MAX_REACTION_TIME = 0.4;
     41    const static float MAX_REACTION_TIME = 0.4f;
    4242
    4343    PongAI::PongAI(BaseObject* creator) : Controller(creator)
     
    4949        this->ballEndPosition_ = 0;
    5050        this->randomOffset_ = 0;
    51         this->relHysteresisOffset_ = 0.02;
    52         this->strength_ = 0.5;
     51        this->relHysteresisOffset_ = 0.02f;
     52        this->strength_ = 0.5f;
    5353        this->movement_ = 0;
    5454        this->oldMove_ = 0;
     
    171171
    172172        // The position shouln't be larger than 0.5 (50% of the bat-length from the middle is the end)
    173         position *= 0.48;
     173        position *= 0.48f;
    174174
    175175        // Both sides are equally probable
     
    190190
    191191        // Calculate bounces
    192         for (float limit = 0.35; limit < this->strength_ || this->strength_ > 0.99; limit += 0.4)
     192        for (float limit = 0.35f; limit < this->strength_ || this->strength_ > 0.99f; limit += 0.4f)
    193193        {
    194194            // Calculate a random prediction error, based on the vertical speed of the ball and the strength of the AI
  • code/branches/pch/src/orxonox/objects/gametypes/Gametype.cc

    r3186 r3192  
    287287        if (this->spawnpoints_.size() > 0)
    288288        {
    289             unsigned int randomspawn = (unsigned int)rnd(this->spawnpoints_.size());
     289            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
    290290            unsigned int index = 0;
    291291            for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
  • code/branches/pch/src/orxonox/objects/gametypes/TeamDeathmatch.cc

    r3186 r3192  
    5454        static ColourValue colours[] =
    5555        {
    56             ColourValue(1.0, 0.3, 0.3),
    57             ColourValue(0.3, 0.3, 1.0),
    58             ColourValue(0.3, 1.0, 0.3),
    59             ColourValue(1.0, 1.0, 0.0)
     56            ColourValue(1.0f, 0.3f, 0.3f),
     57            ColourValue(0.3f, 0.3f, 1.0f),
     58            ColourValue(0.3f, 1.0f, 0.3f),
     59            ColourValue(1.0f, 1.0f, 0.0f)
    6060        };
    6161        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
     
    139139        if (teamSpawnPoints.size() > 0)
    140140        {
    141             unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
     141            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
    142142            unsigned int index = 0;
    143143            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
  • code/branches/pch/src/orxonox/objects/infos/HumanPlayer.cc

    r3179 r3192  
    143143    float HumanPlayer::getPing() const
    144144    {
    145         return ClientInformation::findClient(this->getClientID())->getRTT();
     145        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT());
    146146    }
    147147
    148148    float HumanPlayer::getPacketLossRatio() const
    149149    {
    150         return ClientInformation::findClient(this->getClientID())->getPacketLoss();
     150        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss());
    151151    }
    152152
  • code/branches/pch/src/orxonox/objects/weaponsystem/MuzzleFlash.cc

    r3185 r3192  
    4040    {
    4141        RegisterObject(MuzzleFlash);
    42         this->setScale(0.1);
     42        this->setScale(0.1f);
    4343       
    4444        this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
  • code/branches/pch/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc

    r3188 r3192  
    4444        {
    4545            assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
    46             this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1);
     46            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1);
    4747            this->attachOgreObject(this->billboard_.getBillboardSet());
    4848        }
  • code/branches/pch/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc

    r3185 r3192  
    4242        this->textureIndex_ = 1;
    4343        this->maxTextureIndex_ = 8;
    44         this->textureTimer_.setTimer(0.01, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
     44        this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
    4545       
    4646        registerVariables();
  • code/branches/pch/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r3186 r3192  
    7979            this->time_ += dt;
    8080            if (this->bQuadratic_)
    81                 this->setScale(this->amplitude_ * square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
     81                this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
    8282            else
    83                 this->setScale(this->amplitude_ * sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));
     83                this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
    8484        }
    8585    }
  • code/branches/pch/src/orxonox/objects/worldentities/Camera.h

    r3186 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
    3535#include "interfaces/Tickable.h"
    3636#include "objects/worldentities/StaticEntity.h"
  • code/branches/pch/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r3188 r3192  
    151151            Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
    152152            change.normalise();
    153             change *= rnd(0.4, 0.8);
     153            change *= rnd(0.4f, 0.8f);
    154154            Vector3 velocity = this->getVelocity();
    155155            velocity.normalise();
    156156            velocity += change;
    157157            velocity.normalise();
    158             velocity *= length * rnd(0.8, 1.0);
     158            velocity *= length * rnd(0.8f, 1.0f);
    159159
    160160            this->setVelocity(velocity);
  • code/branches/pch/src/orxonox/objects/worldentities/MobileEntity.cc

    r3186 r3192  
    9292                this->angularVelocity_.z += angularAcceleration_.z * dt;
    9393                // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method.
    94                 float mult = dt * 0.5;
     94                float mult = dt * 0.5f;
    9595                // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions!
    9696                Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult);
  • code/branches/pch/src/orxonox/objects/worldentities/Planet.cc

    r3186 r3192  
    9191        float scaleFactor = this->getScale();
    9292
    93         this->distList.push_back(10.0*scaleFactor);
    94         this->distList.push_back(19.0*scaleFactor);
    95         this->distList.push_back(27.0*scaleFactor);
    96         this->distList.push_back(34.0*scaleFactor);
    97         this->distList.push_back(40.0*scaleFactor);
    98         this->distList.push_back(45.0*scaleFactor);
    99         this->distList.push_back(49.0*scaleFactor);
    100         this->distList.push_back(52.0*scaleFactor);
    101         this->distList.push_back(54.0*scaleFactor);
    102         this->distList.push_back(55.0*scaleFactor);
     93        this->distList.push_back(10.0f*scaleFactor);
     94        this->distList.push_back(19.0f*scaleFactor);
     95        this->distList.push_back(27.0f*scaleFactor);
     96        this->distList.push_back(34.0f*scaleFactor);
     97        this->distList.push_back(40.0f*scaleFactor);
     98        this->distList.push_back(45.0f*scaleFactor);
     99        this->distList.push_back(49.0f*scaleFactor);
     100        this->distList.push_back(52.0f*scaleFactor);
     101        this->distList.push_back(54.0f*scaleFactor);
     102        this->distList.push_back(55.0f*scaleFactor);
    103103
    104         float reductionValue = 0.2;
     104        float reductionValue = 0.2f;
    105105
    106106        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
  • code/branches/pch/src/orxonox/objects/worldentities/PongBall.cc

    r3186 r3192  
    5050        this->batID_[0] = OBJECTID_UNKNOWN;
    5151        this->batID_[1] = OBJECTID_UNKNOWN;
    52         this->relMercyOffset_ = 0.05;
     52        this->relMercyOffset_ = 0.05f;
    5353
    5454        this->registerVariables();
     
    103103                    if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    104104                    {
    105                         distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     105                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    106106                        if (fabs(distance) <= 1)
    107107                        {
     
    123123                    if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    124124                    {
    125                         distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     125                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    126126                        if (fabs(distance) <= 1)
    127127                        {
     
    173173              if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
    174174              {
    175                 distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     175                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    176176                if (fabs(distance) <= 1)
    177177                {
     
    184184              if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
    185185              {
    186                 distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
     186                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
    187187                if (fabs(distance) <= 1)
    188188                {
  • code/branches/pch/src/orxonox/objects/worldentities/WorldEntity.h

    r3188 r3192  
    3434
    3535#ifdef ORXONOX_RELEASE
    36 #include <OgreSceneNode.h>
    37 #else
    38 #include <OgrePrerequisites.h>
     36#  include <OgreSceneNode.h>
    3937#endif
    4038#include <LinearMath/btMotionState.h>
    4139
    4240#include "util/Math.h"
     41#include "util/OgreForwardRefs.h"
    4342#include "core/BaseObject.h"
    4443#include "network/synchronisable/Synchronisable.h"
  • code/branches/pch/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r3188 r3192  
    5959        {
    6060            this->greetingFlare_ = new BillboardSet();
    61             this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
     61            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1);
    6262            if (this->greetingFlare_->getBillboardSet())
    6363                this->attachOgreObject(this->greetingFlare_->getBillboardSet());
  • code/branches/pch/src/orxonox/overlays/OrxonoxOverlay.cc

    r3110 r3192  
    215215            if (angle < 0.0)
    216216                angle = -angle;
    217             angle -= 180.0 * (int)(angle / 180.0);
     217            angle -= 180.0f * (int)(angle / 180.0);
    218218
    219219            // take the reverse if angle is about 90 degrees
    220220            float tempAspect;
    221             if (angle > 89.0 && angle < 91.0)
     221            if (angle > 89.0f && angle < 91.0f)
    222222            {
    223223                tempAspect = 1.0 / this->windowAspectRatio_;
     
    231231            else
    232232            {
    233                 tempAspect = 1.0;
     233                tempAspect = 1.0f;
    234234                rotState_ = Inbetween;
    235235            }
     
    238238            // magnitude of the width is about the magnitude of the height.
    239239            // Correctly we would have to take the square root of width*height
    240             this->sizeCorrection_.x = 2.0 / (tempAspect + 1.0);
     240            this->sizeCorrection_.x = 2.0f / (tempAspect + 1.0f);
    241241            this->sizeCorrection_.y = tempAspect * this->sizeCorrection_.x;
    242242        }
  • code/branches/pch/src/orxonox/overlays/OrxonoxOverlay.h

    r3177 r3192  
    3838
    3939#include <string>
    40 #include <OgrePrerequisites.h>
    4140
    4241#include "util/Math.h"
     42#include "util/OgreForwardRefs.h"
    4343#include "core/BaseObject.h"
    4444#include "interfaces/WindowEventListener.h"
  • code/branches/pch/src/orxonox/overlays/OverlayGroup.h

    r3144 r3192  
    3838
    3939#include <set>
    40 #include <OgrePrerequisites.h>
    4140#include "util/Math.h"
     41#include "util/OgreForwardRefs.h"
    4242#include "core/BaseObject.h"
    4343
  • code/branches/pch/src/orxonox/overlays/OverlayText.h

    r3144 r3192  
    3434#include <string>
    3535#include "util/Math.h"
     36#include "util/OgreForwardRefs.h"
    3637#include "OrxonoxOverlay.h"
    3738
  • code/branches/pch/src/orxonox/overlays/console/InGameConsole.h

    r3177 r3192  
    3434
    3535#include <string>
     36#include "util/OgreForwardRefs.h"
    3637#include "core/Shell.h"
    3738#include "interfaces/WindowEventListener.h"
  • code/branches/pch/src/orxonox/overlays/hud/HUDBar.cc

    r3144 r3192  
    7878        this->textureUnitState_->setTextureName("bar2.tga");
    7979        // use the default colour
    80         this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2, 0.7, 0.2));
     80        this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2f, 0.7f, 0.2f));
    8181
    8282        this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
  • code/branches/pch/src/orxonox/overlays/hud/HUDBar.h

    r3144 r3192  
    3636#include <map>
    3737#include <vector>
    38 #include <OgrePrerequisites.h>
    3938
    4039#include "util/Math.h"
     40#include "util/OgreForwardRefs.h"
    4141#include "core/BaseObject.h"
    4242#include "overlays/OrxonoxOverlay.h"
  • code/branches/pch/src/orxonox/overlays/hud/HUDNavigation.h

    r3177 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
    3535#include "interfaces/Tickable.h"
    3636#include "overlays/OrxonoxOverlay.h"
  • code/branches/pch/src/orxonox/overlays/hud/HUDRadar.h

    r3177 r3192  
    3535#include <map>
    3636#include <vector>
    37 #include <OgrePrerequisites.h>
    3837
     38#include "util/OgreForwardRefs.h"
    3939#include "interfaces/RadarListener.h"
    4040#include "interfaces/RadarViewable.h"
  • code/branches/pch/src/orxonox/overlays/hud/UnderAttackHealthBar.cc

    r3110 r3192  
    4747        this->text_ = new OverlayText(this);
    4848        this->text_->setFont("Monofur");
    49         this->text_->setTextSize(0.04);
     49        this->text_->setTextSize(0.04f);
    5050        this->text_->setAlignmentString("center");
    5151        this->text_->setColour(ColourValue::White);
  • code/branches/pch/src/orxonox/overlays/notifications/NotificationQueue.cc

    r3158 r3192  
    4848    const std::string NotificationQueue::DEFAULT_FONT = "VeraMono";
    4949    const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0);
    50     const float NotificationQueue::DEFAULT_FONT_SIZE  = 0.025;
     50    const float NotificationQueue::DEFAULT_FONT_SIZE  = 0.025f;
    5151
    5252    /**
  • code/branches/pch/src/orxonox/overlays/stats/Stats.h

    r3177 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "util/OgreForwardRefs.h"
    3435#include "interfaces/Tickable.h"
    3536#include "overlays/OrxonoxOverlay.h"
  • code/branches/pch/src/orxonox/tools/BillboardSet.h

    r3158 r3192  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    34 #include <OgrePrerequisites.h>
    35 #include "util/UtilPrereqs.h"
     33#include "util/OgreForwardRefs.h"
    3634
    3735namespace orxonox
  • code/branches/pch/src/orxonox/tools/Mesh.h

    r3158 r3192  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 
    34 #include <OgrePrerequisites.h>
     33#include "util/OgreForwardRefs.h"
    3534
    3635namespace orxonox
  • code/branches/pch/src/orxonox/tools/ParticleInterface.h

    r3177 r3192  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include <OgrePrerequisites.h>
     34#include "util/OgreForwardRefs.h"
    3535#include "interfaces/TimeFactorListener.h"
    3636
  • code/branches/pch/src/orxonox/tools/Shader.cc

    r3131 r3192  
    216216                return (*((float*)pointer->second));
    217217            else
    218                 return (*((int*)pointer->second));
     218                return static_cast<float>(*((int*)pointer->second));
    219219        }
    220220        else
  • code/branches/pch/src/orxonox/tools/Shader.h

    r3177 r3192  
    3535#include <string>
    3636#include <vector>
    37 #include <OgrePrerequisites.h>
    3837
     38#include "util/OgreForwardRefs.h"
    3939#include "interfaces/Tickable.h"
    4040
  • code/branches/pch/src/util/Convert.h

    r3189 r3192  
    307307    {
    308308        return ConverterExplicit<FromType, ToType>::convert(output, input);
    309     }
    310 
    311     // For compatibility reasons. The same, but with capital ConvertValue
    312     template<class FromType, class ToType>
    313     FORCEINLINE bool ConvertValue(ToType* output, const FromType& input)
    314     {
    315         return convertValue(output, input);
    316309    }
    317310
     
    372365    FORCEINLINE std::string convertToString(FromType value)
    373366    {
    374       return getConvertedValue<FromType, std::string>(value);
     367        return getConvertedValue<FromType, std::string>(value);
    375368    }
    376369
     
    379372    FORCEINLINE ToType convertFromString(std::string str)
    380373    {
    381       return getConvertedValue<std::string, ToType>(str);
     374        return getConvertedValue<std::string, ToType>(str);
    382375    }
    383376
  • code/branches/pch/src/util/Math.h

    r3163 r3192  
    229229    inline float rnd()
    230230    {
    231         return rand() / (RAND_MAX + 1.0);
     231        return rand() / (RAND_MAX + 1.0f);
    232232    }
    233233
     
    256256    inline float rndsgn()
    257257    {
    258         return ((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
     258        return static_cast<float>((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
    259259    }
    260260
Note: See TracChangeset for help on using the changeset viewer.