-rw-r--r-- | noncore/games/qasteroids/toplevel.cpp | 9 | ||||
-rw-r--r-- | noncore/games/qasteroids/view.cpp | 14 |
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 @@ | |||
26 | #include "toplevel.h" | 26 | #include "toplevel.h" |
27 | #include "ledmeter.h" | 27 | #include "ledmeter.h" |
28 | 28 | ||
29 | #include <opie2/oresource.h> | ||
30 | |||
29 | #include <qpe/qpeapplication.h> | 31 | #include <qpe/qpeapplication.h> |
30 | #include <qpe/resource.h> | ||
31 | 32 | ||
32 | #include <qlabel.h> | 33 | #include <qlabel.h> |
33 | #include <qlayout.h> | 34 | #include <qlayout.h> |
@@ -185,7 +186,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
185 | hbd->addSpacing( 10 ); | 186 | hbd->addSpacing( 10 ); |
186 | */ | 187 | */ |
187 | label = new QLabel( mainWin ); | 188 | label = new QLabel( mainWin ); |
188 | label->setPixmap( Resource::loadPixmap("qasteroids/powerups/brake.png") ); | 189 | label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/brake.png") ); |
189 | label->setFixedWidth( 16 ); | 190 | label->setFixedWidth( 16 ); |
190 | label->setPalette( pal ); | 191 | label->setPalette( pal ); |
191 | hbd->addWidget( label ); | 192 | hbd->addWidget( label ); |
@@ -200,7 +201,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
200 | hbd->addSpacing( 5 ); | 201 | hbd->addSpacing( 5 ); |
201 | 202 | ||
202 | label = new QLabel( mainWin ); | 203 | label = new QLabel( mainWin ); |
203 | label->setPixmap( Resource::loadPixmap("qasteroids/powerups/shield.png") ); | 204 | label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/shield.png") ); |
204 | label->setFixedWidth( 16 ); | 205 | label->setFixedWidth( 16 ); |
205 | label->setPalette( pal ); | 206 | label->setPalette( pal ); |
206 | hbd->addWidget( label ); | 207 | hbd->addWidget( label ); |
@@ -215,7 +216,7 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
215 | hbd->addSpacing( 5 ); | 216 | hbd->addSpacing( 5 ); |
216 | 217 | ||
217 | label = new QLabel( mainWin ); | 218 | label = new QLabel( mainWin ); |
218 | label->setPixmap( Resource::loadPixmap("qasteroids/powerups/shoot.png") ); | 219 | label->setPixmap( Opie::Core::OResource::loadPixmap("qasteroids/powerups/shoot.png") ); |
219 | label->setFixedWidth( 16 ); | 220 | label->setFixedWidth( 16 ); |
220 | label->setPalette( pal ); | 221 | label->setPalette( pal ); |
221 | hbd->addWidget( label ); | 222 | 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 @@ | |||
24 | 24 | ||
25 | #include "view.h" | 25 | #include "view.h" |
26 | 26 | ||
27 | #include <qpe/resource.h> | 27 | #include <opie2/oresource.h> |
28 | 28 | #include <qpe/qpeapplication.h> | |
29 | 29 | ||
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | #include <math.h> | 31 | #include <math.h> |
32 | 32 | ||
33 | #define IMG_BACKGROUND "qasteroids/bg.png" | 33 | #define IMG_BACKGROUND "qasteroids/bg" |
34 | 34 | ||
35 | #define REFRESH_DELAY 33 | 35 | #define REFRESH_DELAY 33 |
36 | #define SHIP_SPEED 0.3 | 36 | #define SHIP_SPEED 0.3 |
@@ -95,8 +95,7 @@ KAsteroidsView::KAsteroidsView( QWidget *parent, const char *name ) | |||
95 | powerups.setAutoDelete( TRUE ); | 95 | powerups.setAutoDelete( TRUE ); |
96 | exhaust.setAutoDelete( TRUE ); | 96 | exhaust.setAutoDelete( TRUE ); |
97 | 97 | ||
98 | QPixmap pm( Resource::loadPixmap(IMG_BACKGROUND) ); | 98 | field.setBackgroundPixmap( Opie::Core::OResource::loadPixmap(IMG_BACKGROUND) ); |
99 | field.setBackgroundPixmap( pm ); | ||
100 | 99 | ||
101 | textSprite = new QCanvasText( &field ); | 100 | textSprite = new QCanvasText( &field ); |
102 | QFont font( "helvetica", 14 ); | 101 | QFont font( "helvetica", 14 ); |
@@ -248,10 +247,7 @@ void KAsteroidsView::brake( bool b ) | |||
248 | 247 | ||
249 | void KAsteroidsView::readSprites() | 248 | void KAsteroidsView::readSprites() |
250 | { | 249 | { |
251 | QString sprites_prefix = Resource::findPixmap( IMG_BACKGROUND ); | 250 | QString sprites_prefix = QPEApplication::qpeDir() + "pics/qasteroids"; |
252 | int sep = sprites_prefix.findRev( "/" ); | ||
253 | |||
254 | sprites_prefix.truncate( sep ); | ||
255 | 251 | ||
256 | int i = 0; | 252 | int i = 0; |
257 | while ( kas_animations[i].id ) | 253 | while ( kas_animations[i].id ) |