author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/games/kpacman | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/games/kpacman/kpacman.pro | 4 | ||||
-rw-r--r-- | noncore/games/kpacman/kpacmanwidget.cpp | 5 | ||||
-rw-r--r-- | noncore/games/kpacman/status.cpp | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/noncore/games/kpacman/kpacman.pro b/noncore/games/kpacman/kpacman.pro index 8453f78..45314f9 100644 --- a/noncore/games/kpacman/kpacman.pro +++ b/noncore/games/kpacman/kpacman.pro | |||
@@ -1,16 +1,14 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | #CONFIG = qt warn_on | ||
3 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
4 | #TMAKE_CXXFLAGS+= | ||
5 | HEADERS = kpacmanwidget.h \ | 3 | HEADERS = kpacmanwidget.h \ |
6 | referee.h \ | 4 | referee.h \ |
7 | status.h \ | 5 | status.h \ |
8 | painter.h \ | 6 | painter.h \ |
9 | score.h \ | 7 | score.h \ |
10 | pacman.h \ | 8 | pacman.h \ |
11 | monster.h \ | 9 | monster.h \ |
12 | keys.h \ | 10 | keys.h \ |
13 | fruit.h \ | 11 | fruit.h \ |
14 | energizer.h \ | 12 | energizer.h \ |
15 | board.h \ | 13 | board.h \ |
16 | bitfont.h \ | 14 | bitfont.h \ |
@@ -25,17 +23,17 @@ SOURCES = kpacmanwidget.cpp \ | |||
25 | score.cpp \ | 23 | score.cpp \ |
26 | pacman.cpp \ | 24 | pacman.cpp \ |
27 | monster.cpp \ | 25 | monster.cpp \ |
28 | keys.cpp \ | 26 | keys.cpp \ |
29 | fruit.cpp \ | 27 | fruit.cpp \ |
30 | energizer.cpp \ | 28 | energizer.cpp \ |
31 | board.cpp \ | 29 | board.cpp \ |
32 | bitfont.cpp \ | 30 | bitfont.cpp \ |
33 | kpacman.cpp \ | 31 | kpacman.cpp \ |
34 | main.cpp | 32 | main.cpp |
35 | INCLUDEPATH+= $(OPIEDIR)/include | 33 | INCLUDEPATH+= $(OPIEDIR)/include |
36 | DEPENDPATH+= $(OPIEDIR)/include | 34 | DEPENDPATH+= $(OPIEDIR)/include |
37 | LIBS += -lqpe | 35 | LIBS += -lqpe -lopiecore2 |
38 | DESTDIR = $(OPIEDIR)/bin | 36 | DESTDIR = $(OPIEDIR)/bin |
39 | TARGET = kpacman | 37 | TARGET = kpacman |
40 | 38 | ||
41 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/games/kpacman/kpacmanwidget.cpp b/noncore/games/kpacman/kpacmanwidget.cpp index 9631495..b59dd02 100644 --- a/noncore/games/kpacman/kpacmanwidget.cpp +++ b/noncore/games/kpacman/kpacmanwidget.cpp | |||
@@ -4,25 +4,26 @@ | |||
4 | #if defined( KDE2_PORT ) | 4 | #if defined( KDE2_PORT ) |
5 | #include <kapp.h> | 5 | #include <kapp.h> |
6 | #include <kconfig.h> | 6 | #include <kconfig.h> |
7 | #include <kstddirs.h> | 7 | #include <kstddirs.h> |
8 | #include <kpacmanwidget.h> | 8 | #include <kpacmanwidget.h> |
9 | #include <kpacmanwidget.moc> | 9 | #include <kpacmanwidget.moc> |
10 | #elif defined( QPE_PORT ) | 10 | #elif defined( QPE_PORT ) |
11 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
12 | #include <qpe/config.h> | 12 | #include <qpe/config.h> |
13 | #include "kpacmanwidget.h" | 13 | #include "kpacmanwidget.h" |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | 16 | #include <opie2/odebug.h> | |
17 | using namespace Opie::Core; | ||
17 | 18 | ||
18 | KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name) | 19 | KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name) |
19 | : QWidget( parent, name ) | 20 | : QWidget( parent, name ) |
20 | { | 21 | { |
21 | score = 0l; | 22 | score = 0l; |
22 | referee = 0l; | 23 | referee = 0l; |
23 | status = 0l; | 24 | status = 0l; |
24 | bitfont = NULL; | 25 | bitfont = NULL; |
25 | fontName = ""; | 26 | fontName = ""; |
26 | 27 | ||
27 | scheme = mode = -1; | 28 | scheme = mode = -1; |
28 | confScheme(); | 29 | confScheme(); |
@@ -130,24 +131,24 @@ void KpacmanWidget::setScheme(int Scheme, int Mode) | |||
130 | 131 | ||
131 | score->setScheme(Scheme, Mode, bitfont); | 132 | score->setScheme(Scheme, Mode, bitfont); |
132 | referee->setScheme(Scheme, Mode, bitfont); | 133 | referee->setScheme(Scheme, Mode, bitfont); |
133 | status->setScheme(Scheme, Mode); | 134 | status->setScheme(Scheme, Mode); |
134 | 135 | ||
135 | score->repaint(FALSE); | 136 | score->repaint(FALSE); |
136 | referee->repaint(FALSE); | 137 | referee->repaint(FALSE); |
137 | status->repaint(FALSE); | 138 | status->repaint(FALSE); |
138 | } | 139 | } |
139 | 140 | ||
140 | void KpacmanWidget::resizeEvent( QResizeEvent * ) | 141 | void KpacmanWidget::resizeEvent( QResizeEvent * ) |
141 | { | 142 | { |
142 | qWarning("Resize"); | 143 | owarn << "Resize" << oendl; |
143 | referee->setGeometry(0, bitfont->height()*3, referee->width(), referee->height()); | 144 | referee->setGeometry(0, bitfont->height()*3, referee->width(), referee->height()); |
144 | referee->setBackgroundColor(BLACK); | 145 | referee->setBackgroundColor(BLACK); |
145 | 146 | ||
146 | if(!status ) return; | 147 | if(!status ) return; |
147 | status->setGeometry(0, bitfont->height()*3+referee->height(), referee->width(), | 148 | status->setGeometry(0, bitfont->height()*3+referee->height(), referee->width(), |
148 | status->height()); | 149 | status->height()); |
149 | status->setBackgroundColor(BLACK); | 150 | status->setBackgroundColor(BLACK); |
150 | 151 | ||
151 | score->setGeometry(0, 0, referee->width(), bitfont->height()*3+referee->height()+status->height()); | 152 | score->setGeometry(0, 0, referee->width(), bitfont->height()*3+referee->height()+status->height()); |
152 | score->setBackgroundColor(BLACK); | 153 | score->setBackgroundColor(BLACK); |
153 | } | 154 | } |
diff --git a/noncore/games/kpacman/status.cpp b/noncore/games/kpacman/status.cpp index 02ff63d..db6938e 100644 --- a/noncore/games/kpacman/status.cpp +++ b/noncore/games/kpacman/status.cpp | |||
@@ -4,32 +4,35 @@ | |||
4 | #if defined( KDE2_PORT ) | 4 | #if defined( KDE2_PORT ) |
5 | #include <kapp.h> | 5 | #include <kapp.h> |
6 | #include <klocale.h> | 6 | #include <klocale.h> |
7 | #include <kstddirs.h> | 7 | #include <kstddirs.h> |
8 | #include <status.h> | 8 | #include <status.h> |
9 | #include <status.moc> | 9 | #include <status.moc> |
10 | #elif defined( QPE_PORT ) | 10 | #elif defined( QPE_PORT ) |
11 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
12 | #include <qpe/config.h> | 12 | #include <qpe/config.h> |
13 | #include "status.h" | 13 | #include "status.h" |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #include <opie2/odebug.h> | ||
17 | using namespace Opie::Core; | ||
18 | |||
16 | #include <qbitmap.h> | 19 | #include <qbitmap.h> |
17 | #include <qmsgbox.h> | 20 | #include <qmsgbox.h> |
18 | #include <qfileinfo.h> | 21 | #include <qfileinfo.h> |
19 | 22 | ||
20 | Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) : | 23 | Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) : |
21 | QWidget( parent, name ) | 24 | QWidget( parent, name ) |
22 | { | 25 | { |
23 | qWarning("Status::Status"); | 26 | owarn << "Status::Status" << oendl; |
24 | actualLifes = 0; | 27 | actualLifes = 0; |
25 | actualLevel = 0; | 28 | actualLevel = 0; |
26 | 29 | ||
27 | lifesPix = NULL; | 30 | lifesPix = NULL; |
28 | levelPix = NULL; | 31 | levelPix = NULL; |
29 | 32 | ||
30 | scheme = Scheme; | 33 | scheme = Scheme; |
31 | mode = Mode; | 34 | mode = Mode; |
32 | level = 0; | 35 | level = 0; |
33 | 36 | ||
34 | confScheme(); | 37 | confScheme(); |
35 | } | 38 | } |