author | imm <imm> | 2002-09-20 21:17:49 (UTC) |
---|---|---|
committer | imm <imm> | 2002-09-20 21:17:49 (UTC) |
commit | 20c93734a4eada53d056f13558cbf60d6eff5bac (patch) (side-by-side diff) | |
tree | 6ee73a9d1e5f9f5426ada0cb58ff60ad74bc876b | |
parent | 7027b4c29de455d457b7d62f52511216a8b76b9c (diff) | |
download | opie-20c93734a4eada53d056f13558cbf60d6eff5bac.zip opie-20c93734a4eada53d056f13558cbf60d6eff5bac.tar.gz opie-20c93734a4eada53d056f13558cbf60d6eff5bac.tar.bz2 |
changed keys
-rw-r--r-- | noncore/games/kpacman/referee.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/games/kpacman/referee.cpp b/noncore/games/kpacman/referee.cpp index 9edaabd..70916f0 100644 --- a/noncore/games/kpacman/referee.cpp +++ b/noncore/games/kpacman/referee.cpp @@ -701,65 +701,69 @@ void Referee::setScheme(int Scheme, int Mode, Bitfont *font) scheme = Scheme; confScheme(); pix->setScheme(scheme, mode, font); pacman->setMaxPixmaps(pix->maxPixmaps(PacmanPix)); fruit->setMaxPixmaps(pix->maxPixmaps(FruitPix)); for (Monster *m = monsters->first(); m != 0; m = monsters->next()) if (m) m->setMaxPixmaps(pix->maxPixmaps(MonsterPix), pix->maxPixmaps(EyesPix)); for (Energizer *e = energizers->first(); e != 0; e = energizers->next()) if (e) e->setMaxPixmaps(pix->maxPixmaps(EnergizerPix)); if (gameState.testBit(Introducing)) for (int i = 0; i < (gameState.testBit(Init) ? timerCount : 15); i++) introPaint(i); setFixedSize(pix->levelPix().size()); repaint(); } void Referee::keyPressEvent( QKeyEvent *k ) { uint key = k->key(); #ifdef QWS // "OK" => new game if ( key == Key_F33 || key == Key_F2 || key == Key_Enter ) play(); - else if ( !gameState.testBit(Playing) && key == Key_Space ) + else if ( !gameState.testBit(Playing) && + key == Key_Up || + key == Key_Down || + key == Key_Right || + key == Key_Left ) play(); // "Space" => pause //else if ( key == Key_Space || key == Key_F3 ) // pause(); // "Menu" => hall of fame //else if ( key == Key_F11 || key == Key_F4 ) // toggleHallOfFame(); #endif if (gameState.testBit(Paused) || gameState.testBit(HallOfFame) || gameState.testBit(Demonstration) || gameState.testBit(Dying) || gameState.testBit(Ready) || gameState.testBit(LevelDone) || !gameState.testBit(Playing)) return; if (key == UpKey) pacman->setDirection(N); else if (key == DownKey) pacman->setDirection(S); else if (key == RightKey) pacman->setDirection(E); else if (key == LeftKey) pacman->setDirection(W); #ifdef CHEATS else if (key == Key_L) { printf("levelUp()\n"); levelUp(); } else if (key == Key_F) { printf("fruit->move(TRUE)\n"); fruit->move(TRUE); repaint(FALSE); } else if (key == Key_E) { printf("setLifes(++lifes)\n"); emit setLifes(++lifes); } #endif else { k->ignore(); @@ -917,65 +921,66 @@ void Referee::introPaint(int t) case 3 : repaint(pix->draw(38, 10, RoomPix, tr("\"BLINKY\""), RED, QColor(), AlignLeft), FALSE); break; case 4 : introMonster(1); break; case 5 : repaint(pix->draw(16, 16, RoomPix, tr("-SPEEDY"), PINK, QColor(), AlignLeft), FALSE); break; case 6 : repaint(pix->draw(38, 16, RoomPix, tr("\"PINKY\""), PINK, QColor(), AlignLeft), FALSE); break; case 7 : introMonster(2); break; case 8 : repaint(pix->draw(16, 22, RoomPix, tr("-BASHFUL"), CYAN, QColor(), AlignLeft), FALSE); break; case 9 : repaint(pix->draw(38, 22, RoomPix, tr("\"INKY\""), CYAN, QColor(), AlignLeft), FALSE); break; case 10 : introMonster(3); break; case 11 : repaint(pix->draw(16, 28, RoomPix, tr("-POKEY"), ORANGE, QColor(), AlignLeft), FALSE); break; case 12 : repaint(pix->draw(38, 28, RoomPix, tr("\"CLYDE\""), ORANGE, QColor(), AlignLeft), FALSE); break; case 13 : pts.sprintf("%d", pointScore); repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE); repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE); pts.sprintf("%d", energizerScore); repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, QColor(), AlignRight), FALSE); repaint(pix->draw(31, 48, RoomPix, "\x1C\x1D\x1E", WHITE, QColor(), AlignLeft), FALSE); break; case 14 : // "@ 1980 MIDWAY MFG.CO." #if defined( KDE2_PORT ) repaint(pix->draw(30, 58, RoomPix, "© 1998-2002 J.THÖNNISSEN", PINK), FALSE); #elif defined( QPE_PORT ) repaint(pix->draw(30, 55, RoomPix, "© 1998-2002 J.THÖNNISSEN", PINK), FALSE); - repaint(pix->draw(29, 60, RoomPix, "Qtopia port: Catalin CLIMOV", GREEN), FALSE); + repaint(pix->draw(29, 58, RoomPix, tr("QTOPIA PORT: CATALIN CLIMOV"), GREEN), FALSE); + repaint(pix->draw(29, 61, RoomPix, tr("PRESS CURSOR TO START"), GREEN), FALSE); #endif break; } } void Referee::introPlay() { if (!gameState.testBit(Introducing) || gameState.testBit(Ready)) return; if (gameState.testBit(Paused) || gameState.testBit(HallOfFame)) { QTimer::singleShot(afterPauseMS, this, SLOT(introPlay())); return; } if (!gameState.testBit(Init)) { if (monstersEaten == 4) { stop(); QTimer::singleShot(introPostAnimationMS, this, SLOT(demo())); } if (pacman->direction() == W) { int id = -1; if (pacman->position() == 37*BoardWidth-6) id = 0; else if (board->isMonster(37*BoardWidth-6)) for (Monster *m = monsters->first(); m != 0; m = monsters->next()) if (m && m->position() == 37*BoardWidth-6) { id = m->id(); id++; break; } |