summaryrefslogtreecommitdiff
authorimm <imm>2002-09-22 18:30:29 (UTC)
committer imm <imm>2002-09-22 18:30:29 (UTC)
commit4904161b6b043e1397db4affd7930fd999ff742e (patch) (unidiff)
treebb46b289fb71af969cf48810c1795ad023252bf9
parentf8aeb3c2e6b32600329ebbaeb0b4b7a2f371eca2 (diff)
downloadopie-4904161b6b043e1397db4affd7930fd999ff742e.zip
opie-4904161b6b043e1397db4affd7930fd999ff742e.tar.gz
opie-4904161b6b043e1397db4affd7930fd999ff742e.tar.bz2
better ?
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/referee.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/noncore/games/kpacman/referee.cpp b/noncore/games/kpacman/referee.cpp
index 81f331b..6d8f3fb 100644
--- a/noncore/games/kpacman/referee.cpp
+++ b/noncore/games/kpacman/referee.cpp
@@ -717,41 +717,27 @@ void Referee::setScheme(int Scheme, int Mode, Bitfont *font)
717 717
718 if (gameState.testBit(Introducing)) 718 if (gameState.testBit(Introducing))
719 for (int i = 0; i < (gameState.testBit(Init) ? timerCount : 15); i++) 719 for (int i = 0; i < (gameState.testBit(Init) ? timerCount : 15); i++)
720 introPaint(i); 720 introPaint(i);
721 721
722 setFixedSize(pix->levelPix().size()); 722 setFixedSize(pix->levelPix().size());
723 repaint(); 723 repaint();
724} 724}
725 725
726void Referee::keyPressEvent( QKeyEvent *k ) 726void Referee::keyPressEvent( QKeyEvent *k )
727{ 727{
728 uint key = k->key(); 728 uint key = k->key();
729#ifdef QWS 729
730 // "OK" => new game 730 if ( !gameState.testBit(Playing) && ( key == Key_Up || key == Key_Down || key == Key_Left || key == Key_Right ) )
731 if ( key == Key_F33 || key == Key_F2 || key == Key_Enter )
732 play();
733 else if ( !gameState.testBit(Playing) &&
734 ( key == Key_Up ||
735 key == Key_Down ||
736 key == Key_Right ||
737 key == Key_Left ))
738 play(); 731 play();
739 // "Space" => pause
740 //else if ( key == Key_Space || key == Key_F3 )
741 // pause();
742 // "Menu" => hall of fame
743 //else if ( key == Key_F11 || key == Key_F4 )
744 // toggleHallOfFame();
745#endif
746 732
747 if (gameState.testBit(Paused) || gameState.testBit(HallOfFame) || 733 if (gameState.testBit(Paused) || gameState.testBit(HallOfFame) ||
748 gameState.testBit(Demonstration) || gameState.testBit(Dying) || 734 gameState.testBit(Demonstration) || gameState.testBit(Dying) ||
749 gameState.testBit(Ready) || gameState.testBit(LevelDone) || 735 gameState.testBit(Ready) || gameState.testBit(LevelDone) ||
750 !gameState.testBit(Playing)) 736 !gameState.testBit(Playing))
751 return; 737 return;
752 738
753 if (key == UpKey) 739 if (key == UpKey)
754 pacman->setDirection(N); 740 pacman->setDirection(N);
755 else if (key == DownKey) 741 else if (key == DownKey)
756 pacman->setDirection(S); 742 pacman->setDirection(S);
757 else if (key == RightKey) 743 else if (key == RightKey)