Diffstat (limited to 'noncore/games/bounce/game.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/bounce/game.cpp | 17 |
1 files changed, 9 insertions, 8 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 @@ -32,3 +32,3 @@ using namespace Opie::Core; -#define TILE_SIZE 9 +#define TILE_SIZE 9 @@ -69,3 +69,3 @@ void Arrow::changeDirection() } - + @@ -102,3 +102,3 @@ void Ball::advance(int stage) QRect r = boundingRect(); - r.moveBy( xVelocity(), yVelocity() ); + r.moveBy( static_cast<int>(xVelocity()), static_cast<int>( yVelocity() ) ); JezzField* field = (JezzField *)canvas(); @@ -127,3 +127,3 @@ bool Ball::collide( double dx, double dy ) QRect r = boundingRect(); - r.moveBy( dx, dy ); + r.moveBy( static_cast<int>( dx ), static_cast<int>( dy ) ); JezzField* field = (JezzField *)canvas(); @@ -301,3 +301,3 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name ) { - QString path = QPEApplication::qpeDir()+"pics/bounce/"; + QString path = QPEApplication::qpeDir()+"pics/bounce/"; @@ -349,3 +349,3 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name ) } - + // create arrow @@ -376,3 +376,3 @@ void JezzGame::display( QString text, int size ) { - odebug << "This function \"display\" shouldn't be called!!!" << oendl; + odebug << "This function \"display\" shouldn't be called!!!" << oendl; if ( !text.isEmpty() ) @@ -415,3 +415,4 @@ void JezzGame::makeBlack() for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() ) - fill( ball->x()/TILE_SIZE, ball->y()/TILE_SIZE ); + fill( static_cast<int>( ball->x()/TILE_SIZE ), + static_cast<int>( ball->y()/TILE_SIZE ) ); |