author | drw <drw> | 2005-05-20 21:17:24 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-20 21:17:24 (UTC) |
commit | 5e7bbe42671f565bef961b44862ddbf68beed774 (patch) (side-by-side diff) | |
tree | ccf157157cec64314bae8cbdf846dd9ccefdd4a6 /noncore | |
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 @@ -20,7 +20,7 @@ #include "interface.h" -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <qtoolbar.h> #include <qtoolbutton.h> @@ -31,7 +31,7 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : { setCaption( tr("Snake") ); QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); - QPixmap bg = Resource::loadPixmap("snake/grass"); + QPixmap bg = Opie::Core::OResource::loadPixmap("snake/grass"); canvas.setBackgroundPixmap(bg); canvas.setUpdatePeriod(100); snake = 0; @@ -46,7 +46,7 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : QToolBar* toolbar = new QToolBar( this); toolbar->setHorizontalStretchable( TRUE ); - QPixmap newicon = Resource::loadPixmap("ksnake"); + QPixmap newicon = Opie::Core::OResource::loadPixmap("ksnake"); setIcon(newicon); (void)new QToolButton(newicon, tr("New Game"), 0, this, SLOT(newGame()), toolbar, "New Game"); @@ -86,7 +86,7 @@ void SnakeGame::welcomescreen() int w = title->boundingRect().width(); title->move(canvas.width()/2 -w/2, canvas.height()/2-110); title->show(); - QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title")); + QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("snake/title")); QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas); titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85); titlepic->show(); 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 @@ -21,9 +21,7 @@ #include "obstacle.h" #include "codes.h" -#include <qpe/resource.h> - - +#include <opie2/oresource.h> Obstacle::Obstacle(QCanvas* canvas, int y) : QCanvasSprite(0,canvas) @@ -33,7 +31,7 @@ Obstacle::Obstacle(QCanvas* canvas, int y) void Obstacle::newObstacle(int y) { - QPixmap obstaclePix( Resource::findPixmap("snake/wall.png") ); + QPixmap obstaclePix( Opie::Core::OResource::findPixmap("snake/wall") ); if ( obstaclePix.width() > canvas()->width()*3/5 ) { int w = 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 @@ -21,8 +21,7 @@ #include "snake.h" #include "target.h" -#include <qpe/resource.h> - +#include <opie2/oresource.h> static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; @@ -39,7 +38,7 @@ Snake::Snake(QCanvas* c) void Snake::createSnake() { snakeparts = new QCanvasPixmapArray(); - QString s0 = Resource::findPixmap("snake/s0001"); + QString s0 = Opie::Core::OResource::findPixmap("snake/s0001"); s0.replace(QRegExp("0001"),"%1"); 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 @@ -21,14 +21,14 @@ #include "target.h" #include "codes.h" -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <stdlib.h> Target::Target(QCanvas* canvas) : QCanvasSprite(0, canvas) { - mouse = new QCanvasPixmapArray(Resource::findPixmap("snake/mouse")); + mouse = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("snake/mouse")); setSequence(mouse); newTarget(); } |