summaryrefslogtreecommitdiff
path: root/noncore/games
authormickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
committer mickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
commit16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff)
tree0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/games
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.cpp16
-rw-r--r--noncore/games/backgammon/moveengine.cpp2
-rw-r--r--noncore/games/bounce/bounce.pro5
-rw-r--r--noncore/games/bounce/game.cpp15
-rw-r--r--noncore/games/go/go.pro15
-rw-r--r--noncore/games/go/gowidget.cpp9
-rw-r--r--noncore/games/kpacman/kpacman.pro4
-rw-r--r--noncore/games/kpacman/kpacmanwidget.cpp5
-rw-r--r--noncore/games/kpacman/status.cpp5
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp2
-rw-r--r--noncore/games/oyatzee/oyatzee.cpp50
-rw-r--r--noncore/games/oyatzee/oyatzee.pro2
-rw-r--r--noncore/games/wordgame/wordgame.cpp2
13 files changed, 75 insertions, 57 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index 51020a0..bdb1c78 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -1,3 +1,2 @@
#include "backgammon.h"
-
#include "aidialog.h"
@@ -8,2 +7,10 @@
+/* OPIE */
+#include <opie2/odebug.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/config.h>
+#include <qpe/resource.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qfile.h>
@@ -12,6 +19,3 @@
#include <qtimer.h>
-#include <qpe/qpeapplication.h>
-#include <qpe/config.h>
#include <qmenubar.h>
-#include <qpe/resource.h>
@@ -35,3 +39,3 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
{
- qDebug("config file does not exist");
+ odebug << "config file does not exist" << oendl;
conf.setGroup("general");
@@ -80,3 +84,3 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
{
- qDebug("theme file does not exist");
+ odebug << "theme file does not exist" << oendl;
theme.setGroup("theme");
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp
index 7de7147..a4145cc 100644
--- a/noncore/games/backgammon/moveengine.cpp
+++ b/noncore/games/backgammon/moveengine.cpp
@@ -459,3 +459,3 @@ void MoveEngine::move(const int& from, int to, const int& dice)
{
- //qDebug("%d moves from %d to %d (%d) with dice %d",player,from,to,to-from,dice);
+ //odebug << "" << player << " moves from " << from << " to " << to << " (" << to-from << ") with dice " << dice << "" << oendl;
diff --git a/noncore/games/bounce/bounce.pro b/noncore/games/bounce/bounce.pro
index ba745c8..56a325c 100644
--- a/noncore/games/bounce/bounce.pro
+++ b/noncore/games/bounce/bounce.pro
@@ -1,3 +1,2 @@
-#CONFIG = qt warn_on
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = game.h kbounce.h
@@ -6,3 +5,3 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopiecore2
+LIBS += -lqpe -lopiecore2
TARGET = bounce
diff --git a/noncore/games/bounce/game.cpp b/noncore/games/bounce/game.cpp
index 1f1f8cd..bbd3d0b 100644
--- a/noncore/games/bounce/game.cpp
+++ b/noncore/games/bounce/game.cpp
@@ -19,7 +19,14 @@
-#include <stdlib.h>
-#include <qtimer.h>
+#include "game.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
+using namespace Opie::Core;
-#include "game.h"
+/* QT */
+#include <qtimer.h>
+
+/* STD */
+#include <stdlib.h>
@@ -369,3 +376,3 @@ void JezzGame::display( QString text, int size )
{
- qDebug("This function \"display\" shouldn't be called!!!");
+ odebug << "This function \"display\" shouldn't be called!!!" << oendl;
if ( !text.isEmpty() )
diff --git a/noncore/games/go/go.pro b/noncore/games/go/go.pro
index b73bbb0..72425a5 100644
--- a/noncore/games/go/go.pro
+++ b/noncore/games/go/go.pro
@@ -1,2 +1,2 @@
-CONFIG = qt warn_on quick-app
+CONFIG = qt warn_on quick-app
HEADERS = amigo.h \
@@ -6,8 +6,8 @@ HEADERS = amigo.h \
SOURCES = amigo.c \
- goplayer.c \
- goplayutils.c \
- killable.c \
- gowidget.cpp \
- main.cpp
-INCLUDEPATH += $(OPIEDIR)/include
+ goplayer.c \
+ goplayutils.c \
+ killable.c \
+ gowidget.cpp \
+ main.cpp
+INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
@@ -17,3 +17,2 @@ TARGET = go
-
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index d134540..ec03c1d 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -22,5 +22,9 @@
+/* OPIE */
+#include <opie2/odebug.h>
#include <qpe/config.h>
#include <qpe/resource.h>
+using namespace Opie::Core;
+/* QT */
#include <qpainter.h>
@@ -32,5 +36,2 @@
-//#include <stdio.h>
-
-
static const enum bVal computer_color = BLACK;
@@ -450,3 +451,3 @@ void intrMoveReport(enum bVal c ,char *coord ,char *reason )
{
- qDebug( "intrMoveReport colour %d, %s %s", c, coord, reason );
+ odebug << "intrMoveReport colour " << c << ", " << coord << " " << reason << "" << oendl;
}
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,5 +1,3 @@
TEMPLATE = app
-#CONFIG = qt warn_on
CONFIG = qt warn_on
-#TMAKE_CXXFLAGS +=
HEADERS = kpacmanwidget.h \
@@ -36,3 +34,3 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
DESTDIR = $(OPIEDIR)/bin
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
@@ -15,3 +15,4 @@
-
+#include <opie2/odebug.h>
+using namespace Opie::Core;
@@ -141,3 +142,3 @@ void KpacmanWidget::resizeEvent( QResizeEvent * )
{
- qWarning("Resize");
+ owarn << "Resize" << oendl;
referee->setGeometry(0, bitfont->height()*3, referee->width(), referee->height());
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
@@ -15,2 +15,5 @@
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
#include <qbitmap.h>
@@ -22,3 +25,3 @@ Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) :
{
- qWarning("Status::Status");
+ owarn << "Status::Status" << oendl;
actualLifes = 0;
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index 2b924c6..1f554d2 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -92,3 +92,3 @@ static void setupBoardSize(int w, int h)
-// qDebug("Adjusted width %d height %d", adjusted_board_width, adjusted_board_height);
+// odebug << "Adjusted width " << adjusted_board_width << " height " << adjusted_board_height << "" << oendl;
}
diff --git a/noncore/games/oyatzee/oyatzee.cpp b/noncore/games/oyatzee/oyatzee.cpp
index a55aa73..27c0a9f 100644
--- a/noncore/games/oyatzee/oyatzee.cpp
+++ b/noncore/games/oyatzee/oyatzee.cpp
@@ -2,2 +2,7 @@
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qmessagebox.h>
@@ -7,2 +12,3 @@
+/* STD */
#include <stdlib.h>
@@ -43,3 +49,3 @@ void OYatzee::slotEndRound( int item )
{
- qDebug( "Der User hat Nummer %d ausgewählt" , item );
+ odebug << "Der User hat Nummer " << item << " ausgewählt" << oendl;
@@ -111,3 +117,3 @@ void OYatzee::slotEndRound( int item )
- qDebug( "Punkte: %d" , points );
+ odebug << "Punkte: " << points << "" << oendl;
}
@@ -158,3 +164,3 @@ void OYatzee::detectPosibilities()
posibilities.clear();
- qDebug( "running detectPosibilities()" );
+ odebug << "running detectPosibilities()" << oendl;
@@ -263,3 +269,3 @@ void OYatzee::displayPossibilites()
//X {
-//X qDebug( QString::number( *it ) );
+//X odebug << QString::number( *it ) << oendl;
//X switch ( *it )
@@ -267,39 +273,39 @@ void OYatzee::displayPossibilites()
//X case Ones:
-//X qDebug( "1er" );
+//X odebug << "1er" << oendl;
//X break;
//X case Twos:
-//X qDebug( "2er" );
+//X odebug << "2er" << oendl;
//X break;
//X case Threes:
-//X qDebug( "3er" );
+//X odebug << "3er" << oendl;
//X break;
//X case Fours:
-//X qDebug( "4er" );
+//X odebug << "4er" << oendl;
//X break;
//X case Fives:
-//X qDebug( "5er" );
+//X odebug << "5er" << oendl;
//X break;
//X case Sixes:
-//X qDebug( "6er" );
+//X odebug << "6er" << oendl;
//X break;
//X case ThreeOfAKind:
-//X qDebug( "3oaK" );
+//X odebug << "3oaK" << oendl;
//X break;
//X case FourOfAKind:
-//X qDebug( "4oaK" );
+//X odebug << "4oaK" << oendl;
//X break;
//X case FullHouse:
-//X qDebug( "Full House" );
+//X odebug << "Full House" << oendl;
//X break;
//X case SStraight:
-//X qDebug( "Short S" );
+//X odebug << "Short S" << oendl;
//X break;
//X case LStraight:
-//X qDebug( "Long S" );
+//X odebug << "Long S" << oendl;
//X break;
//X case Yatzee:
-//X qDebug( "Yatzee!" );
+//X odebug << "Yatzee!" << oendl;
//X break;
//X case Chance:
-//X qDebug( "Chance" );
+//X odebug << "Chance" << oendl;
//X break;
@@ -337,3 +343,3 @@ void OYatzee::slotRollDices()
{
- qDebug( "Roll nummer: %d" , ps.at( currentPlayer-1 )->turn );
+ odebug << "Roll nummer: " << ps.at( currentPlayer-1 )->turn << "" << oendl;
@@ -355,5 +361,5 @@ void OYatzee::slotRollDices()
-// qDebug( "Roll nummer (vorher): %d" , ps.at( currentPlayer-1 )->turn );
+// odebug << "Roll nummer (vorher): " << ps.at( currentPlayer-1 )->turn << "" << oendl;
ps.at(currentPlayer-1)->turn++;
-// qDebug( "Roll nummer (nachher): %d" , ps.at( currentPlayer-1 )->turn );
+// odebug << "Roll nummer (nachher): " << ps.at( currentPlayer-1 )->turn << "" << oendl;
@@ -393,3 +399,3 @@ Resultboard* Scoreboard::nextRB( int currentPlayer )
- qDebug( "Anzahl: %d" , rbList.count() );
+ odebug << "Anzahl: " << rbList.count() << "" << oendl;
@@ -610,3 +616,3 @@ void Resultboard::paintEvent( QPaintEvent* )
int i = it.key();
- qDebug( "ok: %d , %d" , i , it.data() );
+ odebug << "ok: " << i << " , " << it.data() << "" << oendl;
p.drawText( 0, i*cell_height , cell_width , cell_height , Qt::AlignCenter , QString::number( it.data() ) );
diff --git a/noncore/games/oyatzee/oyatzee.pro b/noncore/games/oyatzee/oyatzee.pro
index 754abd2..f505c66 100644
--- a/noncore/games/oyatzee/oyatzee.pro
+++ b/noncore/games/oyatzee/oyatzee.pro
@@ -8,3 +8,3 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index a80bd35..47d6725 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -677,3 +677,3 @@ for ( int i=0; i<n; i++ )
st += tiles[i]->text();
-qDebug("%d,%d: %s (%d) for %d",current.x(),current.y(),st.latin1(),n,s);
+odebug << "" << current.x() << "," << current.y() << ": " << st.latin1() << " (" << n << ") for " << s << "" << oendl;
}