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 | |||
@@ -31,5 +31,5 @@ using namespace Opie::Core; | |||
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | 32 | ||
33 | #define TILE_SIZE 9 | 33 | #define TILE_SIZE 9 |
34 | 34 | ||
35 | #define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2)) | 35 | #define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2)) |
@@ -68,5 +68,5 @@ void Arrow::changeDirection() | |||
68 | update(); | 68 | update(); |
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | Ball::Ball(QCanvasPixmapArray* array, QCanvas* canvas) | 72 | Ball::Ball(QCanvasPixmapArray* array, QCanvas* canvas) |
@@ -101,5 +101,5 @@ void Ball::advance(int stage) | |||
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 | ||
@@ -126,5 +126,5 @@ bool 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 | ||
@@ -300,5 +300,5 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name ) | |||
300 | m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false ) | 300 | m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false ) |
301 | { | 301 | { |
302 | QString path = QPEApplication::qpeDir()+"pics/bounce/"; | 302 | QString path = QPEApplication::qpeDir()+"pics/bounce/"; |
303 | 303 | ||
304 | // load gfx | 304 | // load gfx |
@@ -348,5 +348,5 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name ) | |||
348 | ball->show(); | 348 | ball->show(); |
349 | } | 349 | } |
350 | 350 | ||
351 | // create arrow | 351 | // create arrow |
352 | arrow = new Arrow( m_arrowPixmaps, m_field ); | 352 | arrow = new Arrow( m_arrowPixmaps, m_field ); |
@@ -375,5 +375,5 @@ JezzGame::~JezzGame() | |||
375 | void JezzGame::display( QString text, int size ) | 375 | void JezzGame::display( QString text, int size ) |
376 | { | 376 | { |
377 | odebug << "This function \"display\" shouldn't be called!!!" << oendl; | 377 | odebug << "This function \"display\" shouldn't be called!!!" << oendl; |
378 | if ( !text.isEmpty() ) | 378 | if ( !text.isEmpty() ) |
379 | { | 379 | { |
@@ -414,5 +414,6 @@ void JezzGame::makeBlack() | |||
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 |