author | chicken <chicken> | 2004-03-01 20:30:56 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 20:30:56 (UTC) |
commit | 7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc (patch) (unidiff) | |
tree | 0ec283bce345770910a2630e868afcde3d7c3dc9 /noncore/games/snake | |
parent | 054b3c3e032bdb0a6061a3345487b4ff877eebfd (diff) | |
download | opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.zip opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.gz opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.bz2 |
fix includes
-rw-r--r-- | noncore/games/snake/interface.cpp | 4 | ||||
-rw-r--r-- | noncore/games/snake/main.cpp | 1 | ||||
-rw-r--r-- | noncore/games/snake/snake.cpp | 2 |
3 files changed, 0 insertions, 7 deletions
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp index 2c60693..b5fb5bf 100644 --- a/noncore/games/snake/interface.cpp +++ b/noncore/games/snake/interface.cpp | |||
@@ -12,31 +12,27 @@ | |||
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 | #include "interface.h" | 21 | #include "interface.h" |
22 | 22 | ||
23 | #include <qpe/resource.h> | 23 | #include <qpe/resource.h> |
24 | #include <qpe/qpeapplication.h> | ||
25 | 24 | ||
26 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
27 | #include <qtoolbutton.h> | 26 | #include <qtoolbutton.h> |
28 | #include <qstyle.h> | ||
29 | #include <qapplication.h> | ||
30 | #include <qmessagebox.h> | ||
31 | 27 | ||
32 | SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : | 28 | SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : |
33 | QMainWindow(parent,name,f), | 29 | QMainWindow(parent,name,f), |
34 | canvas(232, 258) | 30 | canvas(232, 258) |
35 | { | 31 | { |
36 | setCaption( tr("Snake") ); | 32 | setCaption( tr("Snake") ); |
37 | QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); | 33 | QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); |
38 | QPixmap bg = Resource::loadPixmap("snake/grass"); | 34 | QPixmap bg = Resource::loadPixmap("snake/grass"); |
39 | canvas.setBackgroundPixmap(bg); | 35 | canvas.setBackgroundPixmap(bg); |
40 | canvas.setUpdatePeriod(100); | 36 | canvas.setUpdatePeriod(100); |
41 | snake = 0; | 37 | snake = 0; |
42 | 38 | ||
diff --git a/noncore/games/snake/main.cpp b/noncore/games/snake/main.cpp index 77a2769..9a9b167 100644 --- a/noncore/games/snake/main.cpp +++ b/noncore/games/snake/main.cpp | |||
@@ -11,19 +11,18 @@ | |||
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 | #include "interface.h" | 21 | #include "interface.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | ||
24 | #include <opie/oapplicationfactory.h> | 23 | #include <opie/oapplicationfactory.h> |
25 | 24 | ||
26 | 25 | ||
27 | OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> ) | 26 | OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> ) |
28 | 27 | ||
29 | 28 | ||
diff --git a/noncore/games/snake/snake.cpp b/noncore/games/snake/snake.cpp index 9f19841..8a683ab 100644 --- a/noncore/games/snake/snake.cpp +++ b/noncore/games/snake/snake.cpp | |||
@@ -11,29 +11,27 @@ | |||
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 | #include "snake.h" | 21 | #include "snake.h" |
22 | #include "target.h" | 22 | #include "target.h" |
23 | #include "codes.h" | ||
24 | 23 | ||
25 | #include <qpe/resource.h> | 24 | #include <qpe/resource.h> |
26 | 25 | ||
27 | #include <qregexp.h> | ||
28 | 26 | ||
29 | static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; | 27 | static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; |
30 | 28 | ||
31 | Snake::Snake(QCanvas* c) | 29 | Snake::Snake(QCanvas* c) |
32 | { | 30 | { |
33 | canvas = c; | 31 | canvas = c; |
34 | score = 0; | 32 | score = 0; |
35 | snakelist.setAutoDelete(true); | 33 | snakelist.setAutoDelete(true); |
36 | autoMoveTimer = new QTimer(this); | 34 | autoMoveTimer = new QTimer(this); |
37 | connect( autoMoveTimer, SIGNAL(timeout()), this, SLOT(moveSnake()) ); | 35 | connect( autoMoveTimer, SIGNAL(timeout()), this, SLOT(moveSnake()) ); |
38 | createSnake(); | 36 | createSnake(); |
39 | } | 37 | } |