summaryrefslogtreecommitdiff
path: root/noncore/games/kpacman
Side-by-side diff
Diffstat (limited to 'noncore/games/kpacman') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/board.cpp3
-rw-r--r--noncore/games/kpacman/keys.cpp5
-rw-r--r--noncore/games/kpacman/kpacman.cpp5
-rw-r--r--noncore/games/kpacman/kpacmanwidget.cpp5
-rw-r--r--noncore/games/kpacman/monster.cpp1
-rw-r--r--noncore/games/kpacman/pacman.cpp1
-rw-r--r--noncore/games/kpacman/painter.cpp10
-rw-r--r--noncore/games/kpacman/referee.cpp9
-rw-r--r--noncore/games/kpacman/score.cpp6
-rw-r--r--noncore/games/kpacman/status.cpp2
10 files changed, 1 insertions, 46 deletions
diff --git a/noncore/games/kpacman/board.cpp b/noncore/games/kpacman/board.cpp
index f95f699..f82b5f9 100644
--- a/noncore/games/kpacman/board.cpp
+++ b/noncore/games/kpacman/board.cpp
@@ -1,22 +1,19 @@
-#include "portable.h"
#if defined( KDE2_PORT )
#include <kapp.h>
#include <klocale.h>
#endif
-#include <qrect.h>
-#include <qregexp.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qtextstream.h>
#include "board.h"
#include "bitmaps.h"
Board::Board(int size) : QArray<int> (size)
{
sz = size; // set size of board
map = "";
diff --git a/noncore/games/kpacman/keys.cpp b/noncore/games/kpacman/keys.cpp
index 07ce135..5200bc2 100644
--- a/noncore/games/kpacman/keys.cpp
+++ b/noncore/games/kpacman/keys.cpp
@@ -9,29 +9,24 @@
#include <kaccel.h>
#include <keys.h>
#include <keys.moc>
#elif defined( QPE_PORT )
#include <qaccel.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include "keys.h"
#endif
#include <qpushbt.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qkeycode.h>
-#include <qpixmap.h>
-#include <qstring.h>
Keys::Keys( QWidget *parent, const char *name)
: QDialog( parent, name, TRUE )
{
//KStandardDirs *dirs = KGlobal::dirs();
QPushButton *okButton = new QPushButton(this);
okButton->setText(tr("Ok"));
okButton->setFixedSize(okButton->size());
connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) );
okButton->move(20,210);
diff --git a/noncore/games/kpacman/kpacman.cpp b/noncore/games/kpacman/kpacman.cpp
index df27c76..be2e46d 100644
--- a/noncore/games/kpacman/kpacman.cpp
+++ b/noncore/games/kpacman/kpacman.cpp
@@ -3,29 +3,24 @@
#if defined( KDE2_PORT )
#include <kpacman.h>
#include <kpacman.moc>
#include <kcolordlg.h>
#elif defined( QPE_PORT )
#include <qmenubar.h>
#include <qpe/config.h>
#include <qapplication.h>
#include "kpacman.h"
#endif
-#include <qkeycode.h>
-#include <qcolor.h>
-#include <qstring.h>
-#include <qpopmenu.h>
-#include <qmsgbox.h>
Kpacman::Kpacman(QWidget *parent, const char *name)
: KTMainWindow(parent, name)
{
schemesPopup = new QList<QPopupMenu>;
schemesPopup->setAutoDelete(TRUE);
menu();
m_view = new QWidget( this, "m_view" );
m_view->setBackgroundColor( black );
m_layout = new QGridLayout( m_view );
diff --git a/noncore/games/kpacman/kpacmanwidget.cpp b/noncore/games/kpacman/kpacmanwidget.cpp
index 823d2bf..9631495 100644
--- a/noncore/games/kpacman/kpacmanwidget.cpp
+++ b/noncore/games/kpacman/kpacmanwidget.cpp
@@ -4,30 +4,25 @@
#if defined( KDE2_PORT )
#include <kapp.h>
#include <kconfig.h>
#include <kstddirs.h>
#include <kpacmanwidget.h>
#include <kpacmanwidget.moc>
#elif defined( QPE_PORT )
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include "kpacmanwidget.h"
#endif
-#include <qmessagebox.h>
-#include "bitfont.h"
-#include "score.h"
-#include "referee.h"
-#include "status.h"
KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name)
: QWidget( parent, name )
{
score = 0l;
referee = 0l;
status = 0l;
bitfont = NULL;
fontName = "";
scheme = mode = -1;
confScheme();
diff --git a/noncore/games/kpacman/monster.cpp b/noncore/games/kpacman/monster.cpp
index 2f402b4..80b4655 100644
--- a/noncore/games/kpacman/monster.cpp
+++ b/noncore/games/kpacman/monster.cpp
@@ -1,14 +1,13 @@
#include "monster.h"
-#include "board.h"
Monster::Monster(Board *b, int mid)
{
board = b;
ID = mid;
setREM(0);
setHarmless(0, 0, 0);
setArrested(0, 0);
setFreedom(board->position(prisonexit));
if (mid == 0)
setPrison(board->position(prisonentry));
diff --git a/noncore/games/kpacman/pacman.cpp b/noncore/games/kpacman/pacman.cpp
index 40f60a8..82524b4 100644
--- a/noncore/games/kpacman/pacman.cpp
+++ b/noncore/games/kpacman/pacman.cpp
@@ -1,14 +1,13 @@
#include "pacman.h"
-#include "board.h"
Pacman::Pacman(Board *b)
{
board = b;
setDemo(FALSE);
setAlive(0);
actualPosition = lastPosition = OUT;
mouthPosition = 0;
lastPix = 0;
maxPixmaps = 0;
}
diff --git a/noncore/games/kpacman/painter.cpp b/noncore/games/kpacman/painter.cpp
index d8c7460..410d3f5 100644
--- a/noncore/games/kpacman/painter.cpp
+++ b/noncore/games/kpacman/painter.cpp
@@ -1,36 +1,28 @@
#include "portable.h"
#if defined( KDE2_PORT )
#include <kapp.h>
#include <kconfig.h>
#include <kstddirs.h>
#elif defined( QPE_PORT )
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#endif
-#include <qcolor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qrect.h>
-#include <qstring.h>
-
-#include <qmessagebox.h>
+
#include <qfileinfo.h>
#include "painter.h"
-#include "board.h"
Painter::Painter( Board *b, QWidget *parent, int Scheme, int Mode, Bitfont *font)
{
w = parent;
board = b;
pointPix = NULL;
wallPix = NULL;
prisonPix = NULL;
energizerPix = NULL;
fruitPix = NULL;
pacmanPix = NULL;
diff --git a/noncore/games/kpacman/referee.cpp b/noncore/games/kpacman/referee.cpp
index 1b810d8..2d0f3be 100644
--- a/noncore/games/kpacman/referee.cpp
+++ b/noncore/games/kpacman/referee.cpp
@@ -6,37 +6,28 @@
#include <kconfig.h>
#include <kstddirs.h>
#include <kaccel.h>
#include <referee.h>
#include <referee.moc>
#elif defined( QPE_PORT )
#include <qaccel.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include "referee.h"
#endif
-#include <qdatetm.h>
#include <stdlib.h>
#include <qtimer.h>
-#include <qevent.h>
-#include <qcolor.h>
-#include <qkeycode.h>
#include <qfileinfo.h>
-#include "board.h"
-#include "pacman.h"
-#include "monster.h"
-#include "fruit.h"
-#include "painter.h"
Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font)
: QWidget( parent, name )
{
gameState.resize(12);
gameTimer = 0;
energizerTimer = 0;
focusedPause = FALSE;
setFocusPolicy(QWidget::StrongFocus);
initKeys();
diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp
index e91771b..6878b81 100644
--- a/noncore/games/kpacman/score.cpp
+++ b/noncore/games/kpacman/score.cpp
@@ -10,32 +10,26 @@
#include <kconfig.h>
#include <kstddirs.h>
#include <kmessagebox.h>
#elif defined( QPE_PORT )
#include <qaccel.h>
#include <qpe/config.h>
#include "score.h"
#endif
#include <stdlib.h>
#include <ctype.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qdstream.h>
-#include <qkeycode.h>
#include <qtimer.h>
-#include <qfileinfo.h>
-#include "bitfont.h"
Score::Score(QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) : QWidget(parent, name)
{
setFocusPolicy(QWidget::StrongFocus);
paused = FALSE;
lastScore = -1;
lastPlayer = -1;
cursorBlinkTimer = 0;
cursorBlinkMS = -1;
diff --git a/noncore/games/kpacman/status.cpp b/noncore/games/kpacman/status.cpp
index 2a17c21..02ff63d 100644
--- a/noncore/games/kpacman/status.cpp
+++ b/noncore/games/kpacman/status.cpp
@@ -4,27 +4,25 @@
#if defined( KDE2_PORT )
#include <kapp.h>
#include <klocale.h>
#include <kstddirs.h>
#include <status.h>
#include <status.moc>
#elif defined( QPE_PORT )
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include "status.h"
#endif
-#include <qpixmap.h>
#include <qbitmap.h>
-#include <qstring.h>
#include <qmsgbox.h>
#include <qfileinfo.h>
Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) :
QWidget( parent, name )
{
qWarning("Status::Status");
actualLifes = 0;
actualLevel = 0;
lifesPix = NULL;
levelPix = NULL;