diff options
Diffstat (limited to 'kblackbox')
-rw-r--r-- | kblackbox/kbbgame.cpp | 26 | ||||
-rw-r--r-- | kblackbox/kbbgfx.cpp | 6 |
2 files changed, 16 insertions, 16 deletions
diff --git a/kblackbox/kbbgame.cpp b/kblackbox/kbbgame.cpp index 6a4baae4..31e4b989 100644 --- a/kblackbox/kbbgame.cpp +++ b/kblackbox/kbbgame.cpp @@ -104,7 +104,7 @@ KBBGame::KBBGame() /* Game initializations */ - running = FALSE; + running = false; gameBoard = NULL; TDEConfig *kConf; @@ -141,7 +141,7 @@ KBBGame::KBBGame() } if (kConf->hasKey( "tutorial" )) { tutorial = (bool) kConf->readNumEntry( "tutorial" ); - } else tutorial = FALSE; + } else tutorial = false; tutorialAction->setChecked(tutorial); setCentralWidget( gr ); @@ -298,11 +298,11 @@ void KBBGame::newGame() randomBalls( balls ); remap( gameBoard, gr->getGraphicBoard() ); - gr->repaint( TRUE ); + gr->repaint( true ); setScore( 0 ); detourCounter = -1; ballsPlaced = 0; - running = TRUE; + running = true; updateStats(); emit gameRuns( running ); } @@ -370,7 +370,7 @@ void KBBGame::getResults() void KBBGame::abortGame() { if (running) { - running = FALSE; + running = false; ballsPlaced = 0; updateStats(); gr->clearFocus(); @@ -437,7 +437,7 @@ void KBBGame::setScore( int n ) bool KBBGame::setSize( int w, int h ) { - bool ok = FALSE; + bool ok = false; if (((w+4) != gr->numC()) || ((h+4) != gr->numR())) { if (running) { ok = KMessageBox::warningContinueCancel(0, @@ -445,7 +445,7 @@ bool KBBGame::setSize( int w, int h ) "This will be the end of the current game!"),TQString(),i18n("End Game")) == KMessageBox::Continue; - } else ok = TRUE; + } else ok = true; if (ok) { gr->setSize( w+4, h+4 ); // +4 is the space for "lasers" and an edge... setMinSize(); @@ -454,7 +454,7 @@ bool KBBGame::setSize( int w, int h ) gameBoard = new RectOnArray( gr->numC(), gr->numR() ); if (running) abortGame(); newGame(); - // gr->repaint( TRUE ); + // gr->repaint( true ); } } return ok; @@ -466,13 +466,13 @@ bool KBBGame::setSize( int w, int h ) bool KBBGame::setBalls( int n ) { - bool ok = FALSE; + bool ok = false; if (balls != n) { if (running) { ok = KMessageBox::warningContinueCancel(0, i18n("This will be the end of the current game!"),TQString(),i18n("End Game")) == KMessageBox::Continue; - } else ok = TRUE; + } else ok = true; if (ok) { balls = n; if (running) abortGame(); @@ -551,7 +551,7 @@ int KBBGame::traceRay( int startX, int startY, int *endX, int *endY ) sly = 1; scy = 0; sry = -1; break; } - directionChanged = FALSE; + directionChanged = false; if (gameBoard->get( x+scx, y+scy ) == LASERBBT) { type = DETOUR; *endX = x+scx; @@ -566,13 +566,13 @@ int KBBGame::traceRay( int startX, int startY, int *endX, int *endY ) if (gameBoard->get( x+slx, y+sly ) == BALLBBT) { type = REFLECTION; if (gameBoard->get( x, y ) == LASERBBT) break; - directionChanged = TRUE; + directionChanged = true; refl += 1; } if (gameBoard->get( x+srx, y+sry ) == BALLBBT) { type = REFLECTION; if (gameBoard->get( x, y ) == LASERBBT) break; - directionChanged = TRUE; + directionChanged = true; refl +=2; } // turn to the right diff --git a/kblackbox/kbbgfx.cpp b/kblackbox/kbbgfx.cpp index 3aff0369..b83aa292 100644 --- a/kblackbox/kbbgfx.cpp +++ b/kblackbox/kbbgfx.cpp @@ -32,7 +32,7 @@ KBBGraphic::KBBGraphic( TQPixmap **p, TQWidget* parent, const char* name ) setBackgroundColor( gray ); setCellWidth( CELLW ); // set width of cell in pixels setCellHeight( CELLH ); // set height of cell in pixels - setMouseTracking( FALSE ); + setMouseTracking( false ); pix = p; if (pix == NULL) pixScaled = NULL; @@ -434,7 +434,7 @@ void KBBGraphic::moveSelection(int drow, int dcol) void KBBGraphic::focusInEvent( TQFocusEvent* ) { - repaint( FALSE ); + repaint( false ); } @@ -444,7 +444,7 @@ void KBBGraphic::focusInEvent( TQFocusEvent* ) void KBBGraphic::focusOutEvent( TQFocusEvent* ) { - repaint( FALSE ); + repaint( false ); } /* |