author | drw <drw> | 2005-05-20 21:17:24 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-20 21:17:24 (UTC) |
commit | 5e7bbe42671f565bef961b44862ddbf68beed774 (patch) (unidiff) | |
tree | ccf157157cec64314bae8cbdf846dd9ccefdd4a6 | |
parent | 3394f57eac978fa97ad60fb96bebc67b3783cfc6 (diff) | |
download | opie-5e7bbe42671f565bef961b44862ddbf68beed774.zip opie-5e7bbe42671f565bef961b44862ddbf68beed774.tar.gz opie-5e7bbe42671f565bef961b44862ddbf68beed774.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/games/snake/interface.cpp | 8 | ||||
-rw-r--r-- | noncore/games/snake/obstacle.cpp | 6 | ||||
-rw-r--r-- | noncore/games/snake/snake.cpp | 5 | ||||
-rw-r--r-- | noncore/games/snake/target.cpp | 4 |
4 files changed, 10 insertions, 13 deletions
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp index 9d9550a..1eeb337 100644 --- a/noncore/games/snake/interface.cpp +++ b/noncore/games/snake/interface.cpp | |||
@@ -21,5 +21,5 @@ | |||
21 | #include "interface.h" | 21 | #include "interface.h" |
22 | 22 | ||
23 | #include <qpe/resource.h> | 23 | #include <opie2/oresource.h> |
24 | 24 | ||
25 | #include <qtoolbar.h> | 25 | #include <qtoolbar.h> |
@@ -32,5 +32,5 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : | |||
32 | setCaption( tr("Snake") ); | 32 | setCaption( tr("Snake") ); |
33 | QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); | 33 | QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); |
34 | QPixmap bg = Resource::loadPixmap("snake/grass"); | 34 | QPixmap bg = Opie::Core::OResource::loadPixmap("snake/grass"); |
35 | canvas.setBackgroundPixmap(bg); | 35 | canvas.setBackgroundPixmap(bg); |
36 | canvas.setUpdatePeriod(100); | 36 | canvas.setUpdatePeriod(100); |
@@ -47,5 +47,5 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : | |||
47 | toolbar->setHorizontalStretchable( TRUE ); | 47 | toolbar->setHorizontalStretchable( TRUE ); |
48 | 48 | ||
49 | QPixmap newicon = Resource::loadPixmap("ksnake"); | 49 | QPixmap newicon = Opie::Core::OResource::loadPixmap("ksnake"); |
50 | setIcon(newicon); | 50 | setIcon(newicon); |
51 | (void)new QToolButton(newicon, tr("New Game"), 0, | 51 | (void)new QToolButton(newicon, tr("New Game"), 0, |
@@ -87,5 +87,5 @@ void SnakeGame::welcomescreen() | |||
87 | title->move(canvas.width()/2 -w/2, canvas.height()/2-110); | 87 | title->move(canvas.width()/2 -w/2, canvas.height()/2-110); |
88 | title->show(); | 88 | title->show(); |
89 | QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title")); | 89 | QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("snake/title")); |
90 | QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas); | 90 | QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas); |
91 | titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85); | 91 | titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85); |
diff --git a/noncore/games/snake/obstacle.cpp b/noncore/games/snake/obstacle.cpp index 4bdefa5..4639f5c 100644 --- a/noncore/games/snake/obstacle.cpp +++ b/noncore/games/snake/obstacle.cpp | |||
@@ -22,7 +22,5 @@ | |||
22 | #include "codes.h" | 22 | #include "codes.h" |
23 | 23 | ||
24 | #include <qpe/resource.h> | 24 | #include <opie2/oresource.h> |
25 | |||
26 | |||
27 | 25 | ||
28 | Obstacle::Obstacle(QCanvas* canvas, int y) | 26 | Obstacle::Obstacle(QCanvas* canvas, int y) |
@@ -34,5 +32,5 @@ Obstacle::Obstacle(QCanvas* canvas, int y) | |||
34 | void Obstacle::newObstacle(int y) | 32 | void Obstacle::newObstacle(int y) |
35 | { | 33 | { |
36 | QPixmap obstaclePix( Resource::findPixmap("snake/wall.png") ); | 34 | QPixmap obstaclePix( Opie::Core::OResource::findPixmap("snake/wall") ); |
37 | 35 | ||
38 | if ( obstaclePix.width() > canvas()->width()*3/5 ) { | 36 | if ( obstaclePix.width() > canvas()->width()*3/5 ) { |
diff --git a/noncore/games/snake/snake.cpp b/noncore/games/snake/snake.cpp index 8a683ab..802951c 100644 --- a/noncore/games/snake/snake.cpp +++ b/noncore/games/snake/snake.cpp | |||
@@ -22,6 +22,5 @@ | |||
22 | #include "target.h" | 22 | #include "target.h" |
23 | 23 | ||
24 | #include <qpe/resource.h> | 24 | #include <opie2/oresource.h> |
25 | |||
26 | 25 | ||
27 | static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; | 26 | static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; |
@@ -40,5 +39,5 @@ void Snake::createSnake() | |||
40 | { | 39 | { |
41 | snakeparts = new QCanvasPixmapArray(); | 40 | snakeparts = new QCanvasPixmapArray(); |
42 | QString s0 = Resource::findPixmap("snake/s0001"); | 41 | QString s0 = Opie::Core::OResource::findPixmap("snake/s0001"); |
43 | s0.replace(QRegExp("0001"),"%1"); | 42 | s0.replace(QRegExp("0001"),"%1"); |
44 | snakeparts->readPixmaps(s0, 15); | 43 | snakeparts->readPixmaps(s0, 15); |
diff --git a/noncore/games/snake/target.cpp b/noncore/games/snake/target.cpp index a09af69..f20eb93 100644 --- a/noncore/games/snake/target.cpp +++ b/noncore/games/snake/target.cpp | |||
@@ -22,5 +22,5 @@ | |||
22 | #include "codes.h" | 22 | #include "codes.h" |
23 | 23 | ||
24 | #include <qpe/resource.h> | 24 | #include <opie2/oresource.h> |
25 | 25 | ||
26 | #include <stdlib.h> | 26 | #include <stdlib.h> |
@@ -29,5 +29,5 @@ Target::Target(QCanvas* canvas) | |||
29 | : QCanvasSprite(0, canvas) | 29 | : QCanvasSprite(0, canvas) |
30 | { | 30 | { |
31 | mouse = new QCanvasPixmapArray(Resource::findPixmap("snake/mouse")); | 31 | mouse = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("snake/mouse")); |
32 | setSequence(mouse); | 32 | setSequence(mouse); |
33 | newTarget(); | 33 | newTarget(); |