author | drw <drw> | 2005-05-18 14:28:05 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-18 14:28:05 (UTC) |
commit | cb243f00d12c5fc40de02e7f9f20009b52303a66 (patch) (unidiff) | |
tree | f85e840af4db55a67a2a057d6a7f4ef59bfb4385 | |
parent | 600f14a61969ec2edd6d89efecaac997b1c6464f (diff) | |
download | opie-cb243f00d12c5fc40de02e7f9f20009b52303a66.zip opie-cb243f00d12c5fc40de02e7f9f20009b52303a66.tar.gz opie-cb243f00d12c5fc40de02e7f9f20009b52303a66.tar.bz2 |
Resource -> OResource
-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 | |||
@@ -25,10 +25,11 @@ | |||
25 | 25 | ||
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> |
34 | #include <qlcdnumber.h> | 35 | #include <qlcdnumber.h> |
@@ -184,9 +185,9 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
184 | 185 | ||
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 ); |
192 | 193 | ||
@@ -199,9 +200,9 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
199 | 200 | ||
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 ); |
207 | 208 | ||
@@ -214,9 +215,9 @@ KAstTopLevel::KAstTopLevel( QWidget *parent, const char *_name, WFlags fl ) | |||
214 | 215 | ||
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 ); |
222 | 223 | ||
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 | |||
@@ -23,15 +23,15 @@ | |||
23 | */ | 23 | */ |
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 |
37 | #define MISSILE_SPEED 10.0 | 37 | #define MISSILE_SPEED 10.0 |
@@ -94,10 +94,9 @@ KAsteroidsView::KAsteroidsView( QWidget *parent, const char *name ) | |||
94 | bits.setAutoDelete( TRUE ); | 94 | bits.setAutoDelete( TRUE ); |
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 ); |
103 | textSprite->setFont( font ); | 102 | textSprite->setFont( font ); |
@@ -247,12 +246,9 @@ void KAsteroidsView::brake( bool b ) | |||
247 | // - - - | 246 | // - - - |
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 ) |
258 | { | 254 | { |