summaryrefslogtreecommitdiff
path: root/noncore/games
authordrw <drw>2005-05-18 14:28:05 (UTC)
committer drw <drw>2005-05-18 14:28:05 (UTC)
commitcb243f00d12c5fc40de02e7f9f20009b52303a66 (patch) (side-by-side diff)
treef85e840af4db55a67a2a057d6a7f4ef59bfb4385 /noncore/games
parent600f14a61969ec2edd6d89efecaac997b1c6464f (diff)
downloadopie-cb243f00d12c5fc40de02e7f9f20009b52303a66.zip
opie-cb243f00d12c5fc40de02e7f9f20009b52303a66.tar.gz
opie-cb243f00d12c5fc40de02e7f9f20009b52303a66.tar.bz2
Resource -> OResource
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/qasteroids/toplevel.cpp9
-rw-r--r--noncore/games/qasteroids/view.cpp14
2 files changed, 10 insertions, 13 deletions
diff --git a/noncore/games/qasteroids/toplevel.cpp b/noncore/games/qasteroids/toplevel.cpp
index 9053d3d..d1e1fac 100644
--- a/noncore/games/qasteroids/toplevel.cpp
+++ b/noncore/games/qasteroids/toplevel.cpp
@@ -26,8 +26,9 @@
#include "toplevel.h"
#include "ledmeter.h"
+#include <opie2/oresource.h>
+
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
#include <qlabel.h>
#include <qlayout.h>
@@ -185,7 +186,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl )
hbd->addSpacing( 10 );
*/
label = new QLabel( mainWin );
- label->setPixmap( Resource::loadPixmap("qasteroids/powerups/brake.png") );
+ label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/brake.png") );
label->setFixedWidth( 16 );
label->setPalette( pal );
hbd->addWidget( label );
@@ -200,7 +201,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl )
hbd->addSpacing( 5 );
label = new QLabel( mainWin );
- label->setPixmap( Resource::loadPixmap("qasteroids/powerups/shield.png") );
+ label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/shield.png") );
label->setFixedWidth( 16 );
label->setPalette( pal );
hbd->addWidget( label );
@@ -215,7 +216,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl )
hbd->addSpacing( 5 );
label = new QLabel( mainWin );
- label->setPixmap( Resource::loadPixmap("qasteroids/powerups/shoot.png") );
+ label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/shoot.png") );
label->setFixedWidth( 16 );
label->setPalette( pal );
hbd->addWidget( label );
diff --git a/noncore/games/qasteroids/view.cpp b/noncore/games/qasteroids/view.cpp
index 3a4d410..6cab700 100644
--- a/noncore/games/qasteroids/view.cpp
+++ b/noncore/games/qasteroids/view.cpp
@@ -24,13 +24,13 @@
#include "view.h"
-#include <qpe/resource.h>
-
+#include <opie2/oresource.h>
+#include <qpe/qpeapplication.h>
#include <stdlib.h>
#include <math.h>
-#define IMG_BACKGROUND "qasteroids/bg.png"
+#define IMG_BACKGROUND "qasteroids/bg"
#define REFRESH_DELAY 33
#define SHIP_SPEED 0.3
@@ -95,8 +95,7 @@ KAsteroidsView::KAsteroidsView( QWidget *parent, const char *name )
powerups.setAutoDelete( TRUE );
exhaust.setAutoDelete( TRUE );
- QPixmap pm( Resource::loadPixmap(IMG_BACKGROUND) );
- field.setBackgroundPixmap( pm );
+ field.setBackgroundPixmap( Opie::Core::OResource::loadPixmap(IMG_BACKGROUND) );
textSprite = new QCanvasText( &field );
QFont font( "helvetica", 14 );
@@ -248,10 +247,7 @@ void KAsteroidsView::brake( bool b )
void KAsteroidsView::readSprites()
{
- QString sprites_prefix = Resource::findPixmap( IMG_BACKGROUND );
- int sep = sprites_prefix.findRev( "/" );
-
- sprites_prefix.truncate( sep );
+ QString sprites_prefix = QPEApplication::qpeDir() + "pics/qasteroids";
int i = 0;
while ( kas_animations[i].id )