author | mickeyl <mickeyl> | 2003-01-23 13:32:28 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-01-23 13:32:28 (UTC) |
commit | 5100d4dc5012d5ff65bf1afc814e0552fe2d98fa (patch) (unidiff) | |
tree | af63cda30bb372a080f9533c2bf5e5e882264298 | |
parent | c50f0f454936d5552bd05e55ac6934d2e63d1743 (diff) | |
download | opie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.zip opie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.tar.gz opie-5100d4dc5012d5ff65bf1afc814e0552fe2d98fa.tar.bz2 |
g++ 3.2 fix... repeat after me: "I won't hide method parameters"
-rw-r--r-- | noncore/games/chess/chess.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/games/chess/chess.cpp b/noncore/games/chess/chess.cpp index 96a838a..29c96bb 100644 --- a/noncore/games/chess/chess.cpp +++ b/noncore/games/chess/chess.cpp | |||
@@ -8,32 +8,34 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | 21 | ||
22 | // human is not offered a promotion yet | 22 | // human is not offered a promotion yet |
23 | 23 | ||
24 | #include <stdlib.h> | ||
25 | |||
24 | #include <qcanvas.h> | 26 | #include <qcanvas.h> |
25 | #include <qmainwindow.h> | 27 | #include <qmainwindow.h> |
26 | #include <qlist.h> | 28 | #include <qlist.h> |
27 | #include <qimage.h> | 29 | #include <qimage.h> |
28 | #include <qpainter.h> | 30 | #include <qpainter.h> |
29 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
30 | #include <qregexp.h> | 32 | #include <qregexp.h> |
31 | 33 | ||
32 | #include <qpe/config.h> | 34 | #include <qpe/config.h> |
33 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
34 | 36 | ||
35 | #include "chess.h" | 37 | #include "chess.h" |
36 | 38 | ||
37 | #define CHESS_DEBUG | 39 | #define CHESS_DEBUG |
38 | 40 | ||
39 | int pieceSize = 40; | 41 | int pieceSize = 40; |
@@ -325,34 +327,34 @@ void BoardView::swapSides() | |||
325 | { | 327 | { |
326 | if (activeSide == humanSide && playingGame) { | 328 | if (activeSide == humanSide && playingGame) { |
327 | humanSide = !humanSide; | 329 | humanSide = !humanSide; |
328 | crafty->writeToStdin("savepos\ngo\n"); | 330 | crafty->writeToStdin("savepos\ngo\n"); |
329 | } else | 331 | } else |
330 | emitErrorMessage(); | 332 | emitErrorMessage(); |
331 | } | 333 | } |
332 | 334 | ||
333 | BoardView::BoardView(QCanvas *c, QWidget *w, const char *name) | 335 | BoardView::BoardView(QCanvas *c, QWidget *w, const char *name) |
334 | : QCanvasView(c, w, name) { | 336 | : QCanvasView(c, w, name) { |
335 | humanSide = sideWhite; | 337 | humanSide = sideWhite; |
336 | activeSide = sideWhite; | 338 | activeSide = sideWhite; |
337 | playingGame = TRUE; | 339 | playingGame = TRUE; |
338 | activePiece = 0; | 340 | activePiece = 0; |
339 | list.setAutoDelete(TRUE); | 341 | list.setAutoDelete(TRUE); |
340 | setCanvas(new QCanvas()); | 342 | setCanvas(new QCanvas()); |
341 | Config c("Chess", Config::User); | 343 | Config conf("Chess", Config::User); |
342 | c.setGroup("Theme"); | 344 | conf.setGroup("Theme"); |
343 | QString theme = c.readEntry("imagefile", "simple-28"); | 345 | QString theme = conf.readEntry("imagefile", "simple-28"); |
344 | setTheme(theme); | 346 | setTheme(theme); |
345 | crafty = new CraftyProcess(this); | 347 | crafty = new CraftyProcess(this); |
346 | crafty->addArgument("crafty"); | 348 | crafty->addArgument("crafty"); |
347 | if (!crafty->start()) { | 349 | if (!crafty->start()) { |
348 | QMessageBox::critical(0, | 350 | QMessageBox::critical(0, |
349 | tr("Could not find crafty chess engine"), | 351 | tr("Could not find crafty chess engine"), |
350 | tr("Quit")); | 352 | tr("Quit")); |
351 | exit(-1); | 353 | exit(-1); |
352 | } | 354 | } |
353 | 355 | ||
354 | connect(crafty, SIGNAL(readyReadStdout()), this, SLOT(readStdout())); | 356 | connect(crafty, SIGNAL(readyReadStdout()), this, SLOT(readStdout())); |
355 | connect(crafty, SIGNAL(processExited()), this, SLOT(craftyDied())); | 357 | connect(crafty, SIGNAL(processExited()), this, SLOT(craftyDied())); |
356 | // crafty->writeToStdin("xboard\nics\nkibitz=2\n"); | 358 | // crafty->writeToStdin("xboard\nics\nkibitz=2\n"); |
357 | newGame(); | 359 | newGame(); |
358 | } | 360 | } |