summaryrefslogtreecommitdiff
path: root/noncore/games/bounce
Side-by-side diff
Diffstat (limited to 'noncore/games/bounce') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/bounce/game.cpp17
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;
#include <stdlib.h>
-#define TILE_SIZE 9
+#define TILE_SIZE 9
#define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2))
@@ -68,5 +68,5 @@ void Arrow::changeDirection()
update();
}
-
+
Ball::Ball(QCanvasPixmapArray* array, QCanvas* canvas)
@@ -101,5 +101,5 @@ void Ball::advance(int stage)
// emit collision
QRect r = boundingRect();
- r.moveBy( xVelocity(), yVelocity() );
+ r.moveBy( static_cast<int>(xVelocity()), static_cast<int>( yVelocity() ) );
JezzField* field = (JezzField *)canvas();
@@ -126,5 +126,5 @@ 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();
@@ -300,5 +300,5 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false )
{
- QString path = QPEApplication::qpeDir()+"pics/bounce/";
+ QString path = QPEApplication::qpeDir()+"pics/bounce/";
// load gfx
@@ -348,5 +348,5 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
ball->show();
}
-
+
// create arrow
arrow = new Arrow( m_arrowPixmaps, m_field );
@@ -375,5 +375,5 @@ JezzGame::~JezzGame()
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() )
{
@@ -414,5 +414,6 @@ void JezzGame::makeBlack()
// fill areas that contains a ball
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 ) );
// areas still free can be blacked now