summaryrefslogtreecommitdiffstats
path: root/tutorial/t13/cannon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/t13/cannon.cpp')
-rw-r--r--tutorial/t13/cannon.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tutorial/t13/cannon.cpp b/tutorial/t13/cannon.cpp
index 1e1ed63fb..51849bb23 100644
--- a/tutorial/t13/cannon.cpp
+++ b/tutorial/t13/cannon.cpp
@@ -26,7 +26,7 @@ CannonField::CannonField( TQWidget *parent, const char *name )
shoot_ang = 0;
shoot_f = 0;
target = TQPoint( 0, 0 );
- gameEnded = FALSE;
+ gameEnded = false;
setPalette( TQPalette( TQColor( 250, 250, 200) ) );
newTarget();
}
@@ -41,7 +41,7 @@ void CannonField::setAngle( int degrees )
if ( ang == degrees )
return;
ang = degrees;
- repaint( cannonRect(), FALSE );
+ repaint( cannonRect(), false );
emit angleChanged( ang );
}
@@ -65,15 +65,15 @@ void CannonField::shoot()
shoot_ang = ang;
shoot_f = f;
autoShootTimer->start( 50 );
- emit canShoot( FALSE );
+ emit canShoot( false );
}
void CannonField::newTarget()
{
- static bool first_time = TRUE;
+ static bool first_time = true;
if ( first_time ) {
- first_time = FALSE;
+ first_time = false;
TQTime midnight( 0, 0, 0 );
srand( midnight.secsTo(TQTime::currentTime()) );
}
@@ -89,7 +89,7 @@ void CannonField::setGameOver()
return;
if ( isShooting() )
autoShootTimer->stop();
- gameEnded = TRUE;
+ gameEnded = true;
repaint();
}
@@ -97,9 +97,9 @@ void CannonField::restartGame()
{
if ( isShooting() )
autoShootTimer->stop();
- gameEnded = FALSE;
+ gameEnded = false;
repaint();
- emit canShoot( TRUE );
+ emit canShoot( true );
}
void CannonField::moveShot()
@@ -112,11 +112,11 @@ void CannonField::moveShot()
if ( shotR.intersects( targetRect() ) ) {
autoShootTimer->stop();
emit hit();
- emit canShoot( TRUE );
+ emit canShoot( true );
} else if ( shotR.x() > width() || shotR.y() > height() ) {
autoShootTimer->stop();
emit missed();
- emit canShoot( TRUE );
+ emit canShoot( true );
} else {
r = r.unite( TQRegion( shotR ) );
}