Diffstat (limited to 'noncore/games/snake/obstacle.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/snake/obstacle.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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 | |||
@@ -18,25 +18,23 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "obstacle.h" | 21 | #include "obstacle.h" |
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) |
29 | : QCanvasSprite(0,canvas) | 27 | : QCanvasSprite(0,canvas) |
30 | { | 28 | { |
31 | newObstacle(y); | 29 | newObstacle(y); |
32 | } | 30 | } |
33 | 31 | ||
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 ) { |
39 | int w = canvas()->width()*3/5; | 37 | int w = canvas()->width()*3/5; |
40 | w = w - w % 16; | 38 | w = w - w % 16; |
41 | obstaclePix.resize( w, obstaclePix.height() ); | 39 | obstaclePix.resize( w, obstaclePix.height() ); |
42 | } | 40 | } |