diff options
Diffstat (limited to 'ksmiletris/gamewidget.cpp')
-rw-r--r-- | ksmiletris/gamewidget.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ksmiletris/gamewidget.cpp b/ksmiletris/gamewidget.cpp index f10f9b36..3ba3051a 100644 --- a/ksmiletris/gamewidget.cpp +++ b/ksmiletris/gamewidget.cpp @@ -43,8 +43,8 @@ this software. #include <kmessagebox.h> #include <klocale.h> -GameWidget::GameWidget(TQWidget *parent, const char *name) - : TQWidget(parent, name) +GameWidget::GameWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { in_game = false; in_pause = false; @@ -131,12 +131,12 @@ void GameWidget::setPieces(PiecesType type) sprites[Sprite_Broken1 + i] = pm; } - if (in_game) repaintChilds(); + if (in_game) tqrepaintChilds(); } void GameWidget::loadSprites() { - sprites = new QPixmap[num_sprites]; + sprites = new TQPixmap[num_sprites]; loadSprite(Sprite_Bg1, "bg1.bmp"); loadSprite(Sprite_Bg2, "bg2.bmp"); loadSprite(Sprite_Bg3, "bg3.bmp"); @@ -153,7 +153,7 @@ void GameWidget::loadSprites() loadSprite(Sprite_Bg14, "bg14.bmp"); loadSprite(Sprite_Bg15, "bg15.bmp"); loadSprite(Sprite_Bg16, "bg16.bmp"); - loadMaskedSprite(Sprite_Broken, "broken.bmp", "broken-mask.bmp"); + loadMaskedSprite(Sprite_Broken, "broken.bmp", "broken-tqmask.bmp"); } void GameWidget::loadSprite(Sprite spr, const TQString & path) @@ -198,17 +198,17 @@ void GameWidget::newGame() updateMirror(); in_game = true; - repaintChilds(); + tqrepaintChilds(); emit changedStats(num_level, num_points); timer_interval = 700; timer->start(timer_interval); } -void GameWidget::repaintChilds() +void GameWidget::tqrepaintChilds() { - screen->repaint(false); - mirror->repaint(false); - next->repaint(false); + screen->tqrepaint(false); + mirror->tqrepaint(false); + next->tqrepaint(false); } void GameWidget::putPiece() @@ -218,7 +218,7 @@ void GameWidget::putPiece() if (piece[2] != bg_sprite) ref(xpos + 0, ypos + 1) = piece[2]; if (piece[3] != bg_sprite) ref(xpos + 1, ypos + 1) = piece[3]; updateMirror(); - screen->repaint(false); + screen->tqrepaint(false); } void GameWidget::getPiece() @@ -241,7 +241,7 @@ void GameWidget::newPiece() next_piece[i] = (Sprite)(Sprite_Block1 + random.getLong(num_pieces_level)); else next_piece[i] = bg_sprite; - next->repaint(false); + next->tqrepaint(false); } void GameWidget::nextPiece() @@ -258,7 +258,7 @@ void GameWidget::nextPiece() || (piece[2] != bg_sprite && ref(xpos + 0, ypos + 1) != bg_sprite) || (piece[3] != bg_sprite && ref(xpos + 1, ypos + 1) != bg_sprite)) { in_game = false; - repaintChilds(); + tqrepaintChilds(); KMessageBox::sorry(this, i18n("Game Over")); emit gameOver(); } @@ -272,7 +272,7 @@ void GameWidget::updateMirror() mirror_sprites[x] = bg_sprite; mirror_sprites[xpos] = piece[2] == bg_sprite ? piece[0] : piece[2]; mirror_sprites[xpos+1] = piece[3] == bg_sprite ? piece[1] : piece[3]; - mirror->repaint(false); + mirror->tqrepaint(false); } void GameWidget::keyUp() @@ -390,7 +390,7 @@ void GameWidget::broke(int x, int y, bool *xmap) emit changedStats(num_level, num_points); #ifdef HAVE_USLEEP - screen->repaint(false); + screen->tqrepaint(false); usleep(75 * 1000); #endif } |