summaryrefslogtreecommitdiff
path: root/noncore/games/bounce/game.cpp
Unidiff
Diffstat (limited to 'noncore/games/bounce/game.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/bounce/game.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/games/bounce/game.cpp b/noncore/games/bounce/game.cpp
index bbd3d0b..5ef9f15 100644
--- a/noncore/games/bounce/game.cpp
+++ b/noncore/games/bounce/game.cpp
@@ -100,7 +100,7 @@ void Ball::advance(int stage)
100 100
101 // emit collision 101 // emit collision
102 QRect r = boundingRect(); 102 QRect r = boundingRect();
103 r.moveBy( xVelocity(), yVelocity() ); 103 r.moveBy( static_cast<int>(xVelocity()), static_cast<int>( yVelocity() ) );
104 JezzField* field = (JezzField *)canvas(); 104 JezzField* field = (JezzField *)canvas();
105 105
106 int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE ); 106 int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE );
@@ -125,7 +125,7 @@ void Ball::advance(int stage)
125bool Ball::collide( double dx, double dy ) 125bool Ball::collide( double dx, double dy )
126{ 126{
127 QRect r = boundingRect(); 127 QRect r = boundingRect();
128 r.moveBy( dx, dy ); 128 r.moveBy( static_cast<int>( dx ), static_cast<int>( dy ) );
129 JezzField* field = (JezzField *)canvas(); 129 JezzField* field = (JezzField *)canvas();
130 130
131 int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE ); 131 int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE );
@@ -413,7 +413,8 @@ void JezzGame::makeBlack()
413 413
414 // fill areas that contains a ball 414 // fill areas that contains a ball
415 for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() ) 415 for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() )
416 fill( ball->x()/TILE_SIZE, ball->y()/TILE_SIZE ); 416 fill( static_cast<int>( ball->x()/TILE_SIZE ),
417 static_cast<int>( ball->y()/TILE_SIZE ) );
417 418
418 // areas still free can be blacked now 419 // areas still free can be blacked now
419 for ( int y=0; y<FIELD_HEIGHT; y++ ) 420 for ( int y=0; y<FIELD_HEIGHT; y++ )