summaryrefslogtreecommitdiffstats
path: root/kbounce/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbounce/game.cpp')
-rw-r--r--kbounce/game.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kbounce/game.cpp b/kbounce/game.cpp
index 4b60df2e..4d5182a9 100644
--- a/kbounce/game.cpp
+++ b/kbounce/game.cpp
@@ -19,7 +19,7 @@
#include <stdlib.h>
#include <tqtimer.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tdeapplication.h>
#include <kdebug.h>
#include <tqimage.h>
@@ -326,13 +326,13 @@ JezzView::JezzView(TQCanvas* viewing, TQWidget* parent, const char* name, WFlags
void JezzView::viewportMouseReleaseEvent( TQMouseEvent *ev )
{
- if ( ev->button() & Qt::RightButton )
+ if ( ev->button() & TQt::RightButton )
{
m_vertical = !m_vertical;
if ( m_vertical ) setCursor( sizeVerCursor ); else setCursor( sizeHorCursor );
}
- if ( ev->button() & Qt::LeftButton )
+ if ( ev->button() & TQt::LeftButton )
{
emit buildWall( ev->x()/TILE_SIZE, ev->y()/TILE_SIZE, m_vertical );
}
@@ -344,7 +344,7 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
: TQWidget( parent, name ), m_wall1( 0 ), m_wall2( 0 ),
m_text( 0 ), m_running( false ), m_percent( 0 ), m_pictured( false )
{
- TQString path = kapp->dirs()->findResourceDir( "data", "kbounce/pics/ball0000.png" ) + "kbounce/pics/";
+ TQString path = tdeApp->dirs()->findResourceDir( "data", "kbounce/pics/ball0000.png" ) + "kbounce/pics/";
// load gfx
m_ballPixmaps = new TQCanvasPixmapArray( path + "ball%1.png", 25 );
@@ -359,11 +359,11 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
if ( m_artsServer->isNull() )
kdDebug(12008) << "Can't connect to aRts sound server" << endl;
#endif
- m_soundPath = kapp->dirs()->findResourceDir( "data", "kbounce/sounds/death.au" ) +
+ m_soundPath = tdeApp->dirs()->findResourceDir( "data", "kbounce/sounds/death.au" ) +
"kbounce/sounds/";
// create field
- m_field = new JezzField( tiles, background, TQT_TQOBJECT(this), "m_field" );
+ m_field = new JezzField( tiles, background, this, "m_field" );
m_field->resize( TILE_SIZE*FIELD_WIDTH, TILE_SIZE*FIELD_HEIGHT );
for ( int x=0; x<FIELD_WIDTH; x++ )
@@ -378,23 +378,23 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
for ( int x=0; x<FIELD_WIDTH; x++ )
m_field->setTile( x, FIELD_HEIGHT-1, TILE_BORDER );
- connect( m_field, TQT_SIGNAL(ballCollision(Ball *, int, int, int)), this, TQT_SLOT(ballCollision(Ball *, int, int, int)) );
+ connect( m_field, TQ_SIGNAL(ballCollision(Ball *, int, int, int)), this, TQ_SLOT(ballCollision(Ball *, int, int, int)) );
// create view
m_view = new JezzView( m_field, this, "m_view" );
m_view->move( 0, 0 );
m_view->adjustSize();
- connect( m_view, TQT_SIGNAL(buildWall(int, int, bool)), this, TQT_SLOT(buildWall(int, int, bool)) );
+ connect( m_view, TQ_SIGNAL(buildWall(int, int, bool)), this, TQ_SLOT(buildWall(int, int, bool)) );
// create balls
for ( int n=0; n<ballNum; n++ )
{
Ball *ball = new Ball( m_ballPixmaps, m_field );
m_balls.append( ball );
- ball->setVelocity( ((kapp->random() & 1)*2-1)*2, ((kapp->random() & 1)*2-1)*2 );
- ball->setFrame( kapp->random() % 25 );
- ball->move( 4*TILE_SIZE + kapp->random() % ( (FIELD_WIDTH-8)*TILE_SIZE ),
- 4*TILE_SIZE + kapp->random() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) );
+ ball->setVelocity( ((tdeApp->random() & 1)*2-1)*2, ((tdeApp->random() & 1)*2-1)*2 );
+ ball->setFrame( tdeApp->random() % 25 );
+ ball->move( 4*TILE_SIZE + tdeApp->random() % ( (FIELD_WIDTH-8)*TILE_SIZE ),
+ 4*TILE_SIZE + tdeApp->random() % ( (FIELD_HEIGHT-8)*TILE_SIZE ) );
ball->show();
}
@@ -403,7 +403,7 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
// create game clock
m_clock = new TQTimer( this );
- connect( m_clock, TQT_SIGNAL(timeout()), this, TQT_SLOT(tick()) );
+ connect( m_clock, TQ_SIGNAL(timeout()), this, TQ_SLOT(tick()) );
m_clock->start( GAME_DELAY );
// setup geometry
@@ -617,18 +617,18 @@ void JezzGame::buildWall( int x, int y, bool vertical )
m_wall1 = new Wall( m_field, x, y,
vertical? Wall::Up : Wall::Left,
vertical? TILE_WALLUP : TILE_WALLLEFT,
- TQT_TQOBJECT(this), "m_wall1" );
- connect( m_wall1, TQT_SIGNAL(finished(Wall *, int)),
- this, TQT_SLOT(wallFinished(Wall *, int)) ); }
+ this, "m_wall1" );
+ connect( m_wall1, TQ_SIGNAL(finished(Wall *, int)),
+ this, TQ_SLOT(wallFinished(Wall *, int)) ); }
if ( !m_wall2 )
{
m_wall2 = new Wall( m_field, x, y,
vertical? Wall::Down: Wall::Right,
vertical? TILE_WALLDOWN : TILE_WALLRIGHT,
- TQT_TQOBJECT(this), "m_wall2" );
- connect( m_wall2, TQT_SIGNAL(finished(Wall *, int)),
- this, TQT_SLOT(wallFinished(Wall *, int)) );
+ this, "m_wall2" );
+ connect( m_wall2, TQ_SIGNAL(finished(Wall *, int)),
+ this, TQ_SLOT(wallFinished(Wall *, int)) );
}
}
}
@@ -693,7 +693,7 @@ void JezzGame::tick()
if ( m_wall2 ) m_wall2->update();
}
- //kapp->syncX();
+ //tdeApp->syncX();
}
#include "game.moc"