diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
| commit | b87533f9904c10f24d6b2e8177c00944e3efe15b (patch) | |
| tree | c1106a381c851b51e86004698457aef1211b77be /doc/html/t13-cannon-cpp.html | |
| parent | 894037c3e68e1573a34183d936171f8cda5085f3 (diff) | |
| download | tqt-r14.1.x.tar.gz tqt-r14.1.x.zip | |
Replace TRUE/FALSE with boolean values true/false - part 4r14.1.x
Manually cherry-picked from commit 4d495175
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/t13-cannon-cpp.html')
| -rw-r--r-- | doc/html/t13-cannon-cpp.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/html/t13-cannon-cpp.html b/doc/html/t13-cannon-cpp.html index 591ab8b01..8e8071f5f 100644 --- a/doc/html/t13-cannon-cpp.html +++ b/doc/html/t13-cannon-cpp.html @@ -60,7 +60,7 @@ body { background: #ffffff; color: black; } shoot_ang = 0; shoot_f = 0; target = TQPoint( 0, 0 ); - gameEnded = FALSE; + gameEnded = false; <a href="ntqwidget.html#setPalette">setPalette</a>( TQPalette( TQColor( 250, 250, 200) ) ); newTarget(); } @@ -75,7 +75,7 @@ void <a name="f95"></a>CannonField::setAngle( int degrees ) if ( ang == degrees ) return; ang = degrees; - <a href="ntqwidget.html#repaint">repaint</a>( cannonRect(), FALSE ); + <a href="ntqwidget.html#repaint">repaint</a>( cannonRect(), false ); emit angleChanged( ang ); } @@ -99,15 +99,15 @@ void <a name="f97"></a>CannonField::shoot() shoot_ang = ang; shoot_f = f; autoShootTimer-><a href="ntqtimer.html#start">start</a>( 50 ); - emit canShoot( FALSE ); + emit canShoot( false ); } void <a name="f98"></a>CannonField::newTarget() { - static bool first_time = TRUE; + static bool first_time = true; if ( first_time ) { - first_time = FALSE; + first_time = false; <a href="qtime.html">TQTime</a> midnight( 0, 0, 0 ); srand( midnight.<a href="qtime.html#secsTo">secsTo</a>(TQTime::<a href="qtime.html#currentTime">currentTime</a>()) ); } @@ -123,7 +123,7 @@ void <a name="f99"></a>CannonField::setGameOver() return; if ( isShooting() ) autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); - gameEnded = TRUE; + gameEnded = true; <a href="ntqwidget.html#repaint">repaint</a>(); } @@ -131,9 +131,9 @@ void <a name="f100"></a>CannonField::restartGame() { if ( isShooting() ) autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); - gameEnded = FALSE; + gameEnded = false; <a href="ntqwidget.html#repaint">repaint</a>(); - emit canShoot( TRUE ); + emit canShoot( true ); } void <a name="f101"></a>CannonField::moveShot() @@ -146,11 +146,11 @@ void <a name="f101"></a>CannonField::moveShot() if ( shotR.<a href="ntqrect.html#intersects">intersects</a>( targetRect() ) ) { autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); emit hit(); - emit canShoot( TRUE ); + emit canShoot( true ); } else if ( shotR.<a href="ntqrect.html#x">x</a>() > width() || shotR.<a href="ntqrect.html#y">y</a>() > height() ) { autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); emit missed(); - emit canShoot( TRUE ); + emit canShoot( true ); } else { r = r.<a href="ntqrect.html#unite">unite</a>( TQRegion( shotR ) ); } |
