Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10239


Ignore:
Timestamp:
Feb 1, 2015, 8:50:08 PM (10 years ago)
Author:
landauf
Message:

fixed some warnings (MSVC)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hudHS14/src/modules/overlays/hud/HUDNavigation.cc

    r10163 r10239  
    377377
    378378                    //integer values from 0 to 10 (0 is no health and 10 is full health)
    379                     int discreteHealthScale = 10*relativHealthScale;
     379                    int discreteHealthScale = (int)(10*relativHealthScale);
    380380
    381381                    //calculate the HealthLevel (= OponentLevel or Strength) there are 5 Levels
     
    407407                        //it->second.health_->setMaterialName(TextureGenerator::getMaterialName("bar2_1.png", it->first->getRadarObjectColour()));
    408408                        it->second.health_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour()));
    409                         it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x , 0.75*this->healthMarkerSize_ * this->getActualSize().y);
     409                        it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x , 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
    410410                        it->second.wasOutOfView_ = false;
    411411
     
    414414                        if(1<=discreteHealthScale){
    415415                                it->second.health_->setTiling((float)discreteHealthScale , 1 ,0);
    416                                 it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1*discreteHealthScale, 0.75*this->healthMarkerSize_ * this->getActualSize().y);
     416                                it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
    417417                        }
    418418
     
    421421                        //healthLevel
    422422                        it->second.healthLevel_->setMaterialName(TextureGenerator::getMaterialName("barSquare.png", it->first->getRadarObjectColour()));
    423                         it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x , 0.75*this->healthLevelMarkerSize_ * this->getActualSize().y);
     423                        it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x , 0.75f*this->healthLevelMarkerSize_ * this->getActualSize().y);
    424424                        it->second.wasOutOfView_ = false;
    425425                        it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0);
    426                         it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1*HealthLevel, 0.25*this->healthLevelMarkerSize_ * this->getActualSize().y);
     426                        it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y);
    427427                    }
    428428
     
    439439                    if(1<=discreteHealthScale){
    440440                    it->second.health_->setTiling((float)discreteHealthScale , 1 ,0);
    441                     it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1*discreteHealthScale, 0.75*this->healthMarkerSize_ * this->getActualSize().y);
     441                    it->second.health_->setDimensions(this->healthMarkerSize_ * this->getActualSize().x *0.1f*discreteHealthScale, 0.75f*this->healthMarkerSize_ * this->getActualSize().y);
    442442                    }
    443443
     
    450450
    451451                    it->second.healthLevel_->setTiling((float)HealthLevel , 1 ,0);
    452                     it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1*HealthLevel, 0.25*this->healthLevelMarkerSize_ * this->getActualSize().y);
     452                    it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * this->getActualSize().x *0.1f*HealthLevel, 0.25f*this->healthLevelMarkerSize_ * this->getActualSize().y);
    453453
    454454
Note: See TracChangeset for help on using the changeset viewer.