summaryrefslogtreecommitdiff
path: root/noncore/games/bounce
authorzecke <zecke>2004-09-10 11:14:02 (UTC)
committer zecke <zecke>2004-09-10 11:14:02 (UTC)
commitb8baf551919868737c6f56a05e6efa1bad4d97ac (patch) (unidiff)
tree402c587e55356aff7f13990e1efcf57775bb9670 /noncore/games/bounce
parent046bff8abb6727f5522748a2dc8a259d27b5979b (diff)
downloadopie-b8baf551919868737c6f56a05e6efa1bad4d97ac.zip
opie-b8baf551919868737c6f56a05e6efa1bad4d97ac.tar.gz
opie-b8baf551919868737c6f56a05e6efa1bad4d97ac.tar.bz2
Remove unused parameter
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
@@ -30,7 +30,7 @@ using namespace Opie::Core;
30/* STD */ 30/* STD */
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))
36#define TILE_FREE (TILE_FIRST + 0) 36#define TILE_FREE (TILE_FIRST + 0)
@@ -67,7 +67,7 @@ void Arrow::changeDirection()
67 m_vertical = ! m_vertical; 67 m_vertical = ! m_vertical;
68 update(); 68 update();
69} 69}
70 70
71 71
72Ball::Ball(QCanvasPixmapArray* array, QCanvas* canvas) 72Ball::Ball(QCanvasPixmapArray* array, QCanvas* canvas)
73 : QCanvasSprite( array, canvas ), m_animDelay( 0 ), m_soundDelay( MS2TICKS(BALL_ANIM_DELAY)/2 ) 73 : QCanvasSprite( array, canvas ), m_animDelay( 0 ), m_soundDelay( MS2TICKS(BALL_ANIM_DELAY)/2 )
@@ -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 );
@@ -299,7 +299,7 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
299 : QWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ), 299 : QWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ),
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
305 m_ballPixmaps = new QCanvasPixmapArray( path + "ball%1.png", 25 ); 305 m_ballPixmaps = new QCanvasPixmapArray( path + "ball%1.png", 25 );
@@ -347,7 +347,7 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
347 4*TILE_SIZE + rand() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) ); 347 4*TILE_SIZE + rand() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) );
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 );
353 arrow->show(); 353 arrow->show();
@@ -374,7 +374,7 @@ JezzGame::~JezzGame()
374 374
375void JezzGame::display( QString text, int size ) 375void 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 {
380 QFont font( "Helvetica", size, QFont::Bold ); 380 QFont font( "Helvetica", size, QFont::Bold );
@@ -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++ )