Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9322


Ignore:
Timestamp:
Jul 21, 2012, 6:29:07 PM (12 years ago)
Author:
landauf
Message:

fixed some warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/tetris/Tetris.cc

    r9286 r9322  
    202202            if((position.x == currentStonePosition.x) && (position.y < currentStonePosition.y + this->center_->getStoneSize()))
    203203            {
    204                 int y_offset = static_cast<int>((this->activeBrick_->getPosition().y-currentStonePosition.y+10)/10)*10 + currentStonePosition.y;
     204                float y_offset = static_cast<int>((this->activeBrick_->getPosition().y-currentStonePosition.y+10)/10)*10 + currentStonePosition.y;
    205205                if(y_offset < 0) //filter out extreme cases (very rare bug)
    206206                        y_offset = 0;
     
    213213        if(position.y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
    214214        {
    215                 int yOffset = stone->getPosition().y + this->center_->getStoneSize()/2.0f;//calculate offset
     215                float yOffset = stone->getPosition().y + this->center_->getStoneSize()/2.0f;//calculate offset
    216216                if(yOffset < 0) //catch brake-throughs
    217217                    yOffset = 0;
     
    246246    Vector3 Tetris::rotateVector(Vector3 position, unsigned int amount)
    247247    {
    248         int temp = 0;
     248        float temp = 0;
    249249        for(unsigned int i = 0; i < amount; i++)
    250250        {
     
    383383        // Attach the brick to the Centerpoint and set the position of the brick to be at the left side.
    384384        this->center_->attach(this->futureBrick_);
    385         float xPos = (this->center_->getWidth()*1.6 + ((this->center_->getWidth() % 2)*2-1)/2.0f)*this->center_->getStoneSize();
     385        float xPos = (this->center_->getWidth()*1.6f + ((this->center_->getWidth() % 2)*2-1)/2.0f)*this->center_->getStoneSize();
    386386        float yPos = (this->center_->getHeight()-5.1f)*this->center_->getStoneSize();
    387387        this->futureBrick_->setPosition(xPos, yPos, 0.0f);
Note: See TracChangeset for help on using the changeset viewer.